### GET /queue/{id} Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Get a queue ```markdown ### Parameters - **id** (string, path, required): The queue ID ### Responses #### 200 - Successful response - **queue** (object) (required) - **id** (string) (required) - **name** (string) (required) - **description** (string) (required) - **filter** (object) (required) - **conversationIds** (array (string)) - **filterLabels** (array (object)) Array items: - **label** (string) (required) - **type** (string (FLAGGED|NOT_FLAGGED|THRESHOLDS)) (required) ("FLAGGED"|"NOT_FLAGGED"|"THRESHOLDS") - **minThreshold** (number) - **maxThreshold** (number) - **labels** (array (string)) - **afterDate** (string) - **beforeDate** (string) - **showChecked** (boolean) - **authorID** (string) - **filteredActionIds** (array (string)) - **filteredChannelIds** (array (string)) - **recommendationActions** (array (string (review|allow|reject))) - **unresolvedItemsCount** (number) (required) - **resolvedItemsCount** (number) (required) - **totalItemsCount** (number) (required) #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/queue/{id}" ``` ``` -------------------------------- ### GET /account Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Get account details ```markdown ### Responses #### 200 - Account details retrieved successfully - **id** (string) (required): ID of the account - **paid_plan_name** (string) (required): Name of the paid plan - **text_api_quota** (number) (required): Text API quota - **remaining_quota** (number) (required): Remaining quota - **current_project** (object) - **id** (string) (required): ID of the current project - **name** (string) (required): Name of the current project #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/account" ``` ``` -------------------------------- ### GET /auth Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml API endpoint for GET /auth ```markdown ### Responses #### 200 - Successful response - **status** (string) (required): Status of the authentication - **message** (string) (required): Message of the authentication #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/auth" ``` ``` -------------------------------- ### GET /actions/{id} Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Get an action by ID. ```markdown ### Parameters - **id** (string, path, required): The ID of the action to get. ### Responses #### 200 - Action retrieved successfully - **id** (string) (required): The ID of the action. - **key** (string) - **createdAt** (string) (required): The date the action was created. - **name** (string) (required): The name of the action. - **description** (string) - **type** (string (AUTHOR_BLOCK|AUTHOR_BLOCK_TEMP|AUTHOR_UNBLOCK|AUTHOR_DELETE|AUTHOR_REPORT|AUTHOR_WARN|AUTHOR_CUSTOM|ITEM_REJECT|ITEM_ALLOW|ITEM_CUSTOM)) ("AUTHOR_BLOCK"|"AUTHOR_BLOCK_TEMP"|"AUTHOR_UNBLOCK"|"AUTHOR_DELETE"|"AUTHOR_REPORT"|"AUTHOR_WARN"|"AUTHOR_CUSTOM"|"ITEM_REJECT"|"ITEM_ALLOW"|"ITEM_CUSTOM") - **builtIn** (boolean) (required) - **queueBehaviour** (string (REMOVE|ADD|NO_CHANGE)) (required): Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. ("REMOVE"|"ADD"|"NO_CHANGE") - **filterInQueueIds** (array (string)) (required): The IDs of the queues the action is available in. - **position** (string (ALL_QUEUES|SOME_QUEUES|HIDDEN)) (required): Show the action in all queues, selected queues or no queues (to use via API only). ("ALL_QUEUES"|"SOME_QUEUES"|"HIDDEN") - **possibleValues** (array (object)) (required): The possible values of the action. The user will be prompted to select one of these values when executing the action. Array items: - **value** (string) (required): The value of the action. - **valueRequired** (boolean) (required): Whether the action requires a value to be executed. - **freeText** (boolean) (required): Whether the action allows any text to be entered as a value or if it must be one of the possible values. - **webhooks** (array (object)) (required): The action's webhooks. Array items: - **name** (string) (required): The webhook's name, used to identify it in the dashboard - **description** (string) - **url** (string (uri)) (required): The webhook's URL. We'll call this URL when the event occurs. - **moderationActionId** (string) - **id** (string) (required): The ID of the webhook. #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/actions/{id}" ``` ``` -------------------------------- ### GET /actions Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml List all available moderation actions for the authenticated organization. ```markdown ### Parameters - **queueId** (string, query, optional) ### Responses #### 200 - Successful response - Array of object - **id** (string) (required): The ID of the action. - **key** (string) - **createdAt** (string) (required): The date the action was created. - **name** (string) (required): The name of the action. - **description** (string) - **type** (string (AUTHOR_BLOCK|AUTHOR_BLOCK_TEMP|AUTHOR_UNBLOCK|AUTHOR_DELETE|AUTHOR_REPORT|AUTHOR_WARN|AUTHOR_CUSTOM|ITEM_REJECT|ITEM_ALLOW|ITEM_CUSTOM)) ("AUTHOR_BLOCK"|"AUTHOR_BLOCK_TEMP"|"AUTHOR_UNBLOCK"|"AUTHOR_DELETE"|"AUTHOR_REPORT"|"AUTHOR_WARN"|"AUTHOR_CUSTOM"|"ITEM_REJECT"|"ITEM_ALLOW"|"ITEM_CUSTOM") - **builtIn** (boolean) (required) - **queueBehaviour** (string (REMOVE|ADD|NO_CHANGE)) (required): Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. ("REMOVE"|"ADD"|"NO_CHANGE") - **filterInQueueIds** (array (string)) (required): The IDs of the queues the action is available in. - **position** (string (ALL_QUEUES|SOME_QUEUES|HIDDEN)) (required): Show the action in all queues, selected queues or no queues (to use via API only). ("ALL_QUEUES"|"SOME_QUEUES"|"HIDDEN") - **possibleValues** (array (object)) (required): The possible values of the action. The user will be prompted to select one of these values when executing the action. Array items: - **value** (string) (required): The value of the action. - **valueRequired** (boolean) (required): Whether the action requires a value to be executed. - **freeText** (boolean) (required): Whether the action allows any text to be entered as a value or if it must be one of the possible values. - **webhooks** (array (object)) (required): The action's webhooks. Array items: - **name** (string) (required): The webhook's name, used to identify it in the dashboard - **description** (string) - **url** (string (uri)) (required): The webhook's URL. We'll call this URL when the event occurs. - **moderationActionId** (string) - **id** (string) (required): The ID of the webhook. #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/actions?queueId=string" ``` ``` -------------------------------- ### GET /wordlist Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml List all wordlists for the authenticated organization ```markdown ### Responses #### 200 - Successful response - Array of object - **id** (string) (required): Unique identifier of the wordlist - **name** (string) (required) - **description** (string) (required) - **createdAt** (string) (required) - **userId** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/wordlist" ``` ``` -------------------------------- ### GET /authors Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Get a paginated list of authors with their activity metrics and reputation ```markdown ### Parameters - **pageSize** (number, query, optional) - **pageNumber** (number, query, optional) - **sortBy** (string (trustLevel|violationCount|reportCount|memberSince|lastActive|contentCount|flaggedContentRatio|averageSentiment), query, optional) - **sortDirection** (string (asc|desc), query, optional) - **memberSinceDate** (string, query, optional) - **lastActiveDate** (string, query, optional) - **contentTypes** (string, query, optional) ### Responses #### 200 - Successful response - **authors** (array (object)) (required) Array items: - **id** (string) (required): Author ID in Moderation API - **external_id** (string) - **profile_picture** (string (uri)) - **external_link** (string (uri)) - **name** (string) - **email** (string (email)) - **first_seen** (number) (required): Timestamp when author first appeared - **last_seen** (number) (required): Timestamp of last activity - **last_incident** (number) - **status** (string (enabled|suspended|blocked)) (required): Current author status ("enabled"|"suspended"|"blocked") - **trust_level** (object) (required) - **level** (number) (required): Author trust level (-1, 0, 1, 2, 3, or 4) - **manual** (boolean) (required): True if the trust level was set manually by a moderator - **block** (object) (required) - **until** (number) - **reason** (string) - **risk_evaluation** (object) (required) - **risk_level** (number) - **metrics** (object) (required) - **total_content** (number) (required): Total pieces of content - **flagged_content** (number) (required): Number of flagged content pieces - **average_sentiment** (number) - **metadata** (object) (required): Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. - **email_verified** (boolean) - **phone_verified** (boolean) - **identity_verified** (boolean) - **is_paying_customer** (boolean) - **pagination** (object) (required) - **total** (number) (required) - **pageSize** (number) (required) - **pageNumber** (number) (required) - **hasNextPage** (boolean) (required) - **hasPreviousPage** (boolean) (required) #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/authors?pageSize=20&pageNumber=1&sortBy=trustLevel&sortDirection=desc&memberSinceDate=string&lastActiveDate=string&contentTypes=string" ``` ``` -------------------------------- ### GET /wordlist/{id} Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Get a specific wordlist by ID ```markdown ### Parameters - **id** (string, path, required): ID of the wordlist to get ### Responses #### 200 - Successful response - **id** (string) (required): ID of the wordlist - **name** (string) (required): Name of the wordlist - **words** (array (string)) (required): Words in the wordlist - **createdAt** (string) (required): Creation date of the wordlist - **organizationId** (string) (required): ID of the organization - **userId** (string) (required): ID of the user - **strict** (boolean) (required): Strict mode #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/wordlist/{id}" ``` ``` -------------------------------- ### POST /actions Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Create an action. ```markdown ### Request Body **Content-Type:** application/json - **key** (string) - **name** (string) (required): The name of the action. - **description** (string) - **type** (string (AUTHOR_BLOCK|AUTHOR_BLOCK_TEMP|AUTHOR_UNBLOCK|AUTHOR_DELETE|AUTHOR_REPORT|AUTHOR_WARN|AUTHOR_CUSTOM|ITEM_REJECT|ITEM_ALLOW|ITEM_CUSTOM)) ("AUTHOR_BLOCK"|"AUTHOR_BLOCK_TEMP"|"AUTHOR_UNBLOCK"|"AUTHOR_DELETE"|"AUTHOR_REPORT"|"AUTHOR_WARN"|"AUTHOR_CUSTOM"|"ITEM_REJECT"|"ITEM_ALLOW"|"ITEM_CUSTOM") - **builtIn** (boolean) - **queueBehaviour** (string (REMOVE|ADD|NO_CHANGE)): Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. ("REMOVE"|"ADD"|"NO_CHANGE") - **filterInQueueIds** (array (string)): The IDs of the queues the action is available in. - **position** (string (ALL_QUEUES|SOME_QUEUES|HIDDEN)): Show the action in all queues, selected queues or no queues (to use via API only). ("ALL_QUEUES"|"SOME_QUEUES"|"HIDDEN") - **possibleValues** (array (object)): The possible values of the action. The user will be prompted to select one of these values when executing the action. Array items: - **value** (string) (required): The value of the action. - **valueRequired** (boolean): Whether the action requires a value to be executed. - **freeText** (boolean): Whether the action allows any text to be entered as a value or if it must be one of the possible values. - **webhooks** (array (object)): The action's webhooks. Array items: - **name** (string) (required): The webhook's name, used to identify it in the dashboard - **description** (string) - **url** (string (uri)) (required): The webhook's URL. We'll call this URL when the event occurs. - **id** (string): ID of an existing webhook or undefined if this is a new webhook. ### Responses #### 200 - Action created successfully - **id** (string) (required): The ID of the action. - **key** (string) - **createdAt** (string) (required): The date the action was created. - **name** (string) (required): The name of the action. - **description** (string) - **type** (string (AUTHOR_BLOCK|AUTHOR_BLOCK_TEMP|AUTHOR_UNBLOCK|AUTHOR_DELETE|AUTHOR_REPORT|AUTHOR_WARN|AUTHOR_CUSTOM|ITEM_REJECT|ITEM_ALLOW|ITEM_CUSTOM)) ("AUTHOR_BLOCK"|"AUTHOR_BLOCK_TEMP"|"AUTHOR_UNBLOCK"|"AUTHOR_DELETE"|"AUTHOR_REPORT"|"AUTHOR_WARN"|"AUTHOR_CUSTOM"|"ITEM_REJECT"|"ITEM_ALLOW"|"ITEM_CUSTOM") - **builtIn** (boolean) (required) - **queueBehaviour** (string (REMOVE|ADD|NO_CHANGE)) (required): Whether the action resolves and removes the item, unresolves and re-add it to the queue, or does not change the resolve status. ("REMOVE"|"ADD"|"NO_CHANGE") - **filterInQueueIds** (array (string)) (required): The IDs of the queues the action is available in. - **position** (string (ALL_QUEUES|SOME_QUEUES|HIDDEN)) (required): Show the action in all queues, selected queues or no queues (to use via API only). ("ALL_QUEUES"|"SOME_QUEUES"|"HIDDEN") - **possibleValues** (array (object)) (required): The possible values of the action. The user will be prompted to select one of these values when executing the action. Array items: - **value** (string) (required): The value of the action. - **valueRequired** (boolean) (required): Whether the action requires a value to be executed. - **freeText** (boolean) (required): Whether the action allows any text to be entered as a value or if it must be one of the possible values. #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 409 - Action with this key already exists **error.CONFLICT** - **message** (string) (required): The error message (example: "Action with this key already exists") - **code** (string) (required): The error code (example: "CONFLICT") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X POST "https://api.moderationapi.com/v1/actions" \ -H "Content-Type: application/json" \ -d '{ "key": "string", "name": "string", "description": "string", "type": "AUTHOR_BLOCK", "builtIn": "true", "queueBehaviour": "NO_CHANGE", "filterInQueueIds": [ "string" ], "position": "ALL_QUEUES", "possibleValues": [ { "value": "string" } ], "valueRequired": "false", "freeText": "false", "webhooks": [ { "name": "string", "description": "string", "url": "string", "id": "string" } ] }' ``` ``` -------------------------------- ### Schema: Authorization not provided error (401) Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml The error information ```markdown ## Schema: Authorization not provided error (401) The error information **Type:** object - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ``` -------------------------------- ### Schema: Not found error (404) Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml The error information ```markdown ## Schema: Not found error (404) The error information **Type:** object - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ``` -------------------------------- ### Schema: Action with this key already exists error (409) Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml The error information ```markdown ## Schema: Action with this key already exists error (409) The error information **Type:** object - **message** (string) (required): The error message (example: "Action with this key already exists") - **code** (string) (required): The error code (example: "CONFLICT") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ``` -------------------------------- ### POST /actions/{actionId}/execute Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Execute an action on a set of content items in a queue. ```markdown ### Parameters - **actionId** (string, path, required): The ID or key of the action to execute. ### Request Body **Content-Type:** application/json - **contentIds** (array (string)): The IDs of the content items to perform the action on. - **authorIds** (array (string)): IDs of the authors to apply the action to - **queueId** (string): The ID of the queue the action was performed from if any. - **value** (string): The value of the action. Useful to set a reason for the action etc. ### Responses #### 200 - Action executed successfully - **success** (boolean) (required): Action executed successfully. - **actionId** (string) (required): The ID of the action. - **ids** (array (string)) (required): The IDs of the content items. #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X POST "https://api.moderationapi.com/v1/actions/{actionId}/execute" \ -H "Content-Type: application/json" \ -d '{ "contentIds": [ "string" ], "authorIds": [ "string" ], "queueId": "string", "value": "string" }' ``` ``` -------------------------------- ### GET /wordlist/{id}/embedding-status Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Get the current embedding progress status for a wordlist ```markdown ### Parameters - **id** (string, path, required): ID of the wordlist to check embedding status for ### Responses #### 200 - Successful response - **progress** (number) (required): Percentage of words that have been embedded (0-100) - **totalWords** (number) (required): Total number of words in the wordlist - **remainingWords** (number) (required): Number of words still waiting to be embedded #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/wordlist/{id}/embedding-status" ``` ``` -------------------------------- ### GET /authors/{id} Source: https://app.stainless.com/api/spec/documented/moderation-api/openapi.documented.yml Get detailed information about a specific author including historical data and analysis ```markdown ### Parameters - **id** (string, path, required): Either external ID or the ID assigned by moderation API. ### Responses #### 200 - Successful response - **id** (string) (required): Author ID in Moderation API - **external_id** (string) - **profile_picture** (string (uri)) - **external_link** (string (uri)) - **name** (string) - **email** (string (email)) - **first_seen** (number) (required): Timestamp when author first appeared - **last_seen** (number) (required): Timestamp of last activity - **last_incident** (number) - **status** (string (enabled|suspended|blocked)) (required): Current author status ("enabled"|"suspended"|"blocked") - **trust_level** (object) (required) - **level** (number) (required): Author trust level (-1, 0, 1, 2, 3, or 4) - **manual** (boolean) (required): True if the trust level was set manually by a moderator - **block** (object) (required) - **until** (number) - **reason** (string) - **risk_evaluation** (object) (required) - **risk_level** (number) - **metrics** (object) (required) - **total_content** (number) (required): Total pieces of content - **flagged_content** (number) (required): Number of flagged content pieces - **average_sentiment** (number) - **metadata** (object) (required): Additional metadata provided by your system. We recommend including any relevant information that may assist in the moderation process. - **email_verified** (boolean) - **phone_verified** (boolean) - **identity_verified** (boolean) - **is_paying_customer** (boolean) #### 400 - Invalid input data **error.BAD_REQUEST** - **message** (string) (required): The error message (example: "Invalid input data") - **code** (string) (required): The error code (example: "BAD_REQUEST") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 401 - Authorization not provided **error.UNAUTHORIZED** - **message** (string) (required): The error message (example: "Authorization not provided") - **code** (string) (required): The error code (example: "UNAUTHORIZED") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 403 - Insufficient access **error.FORBIDDEN** - **message** (string) (required): The error message (example: "Insufficient access") - **code** (string) (required): The error code (example: "FORBIDDEN") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 404 - Not found **error.NOT_FOUND** - **message** (string) (required): The error message (example: "Not found") - **code** (string) (required): The error code (example: "NOT_FOUND") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) #### 500 - Internal server error **error.INTERNAL_SERVER_ERROR** - **message** (string) (required): The error message (example: "Internal server error") - **code** (string) (required): The error code (example: "INTERNAL_SERVER_ERROR") - **issues** (array (object)): An array of issues that were responsible for the error (example: []) Array items: - **message** (string) (required) ### Example Usage ```bash curl -X GET "https://api.moderationapi.com/v1/authors/{id}" ``` ```