openapi: 3.1.0
info:
  title: Moderation API
  description: API for automated content moderation
  version: 1.1.0
servers:
  - url: https://api.moderationapi.com/v1
tags:
  - name: Actions
  - name: Queues
  - name: Webhooks
  - name: Wordlist
  - name: UserReports
  - name: Voice
    description: Real-time voice moderation over WebSocket.
externalDocs:
  url: https://docs.moderationapi.com
paths:
  /authors:
    get:
      operationId: author-openListAuthors
      summary: List authors
      description: >-
        Get a paginated list of authors with their activity metrics and
        reputation
      tags:
        - author
      security:
        - Authorization: []
      parameters:
        - in: query
          name: pageSize
          schema:
            default: 20
            description: Number of authors per page
            type: number
        - in: query
          name: pageNumber
          schema:
            default: 1
            description: Page number to fetch
            type: number
        - in: query
          name: sortBy
          schema:
            type: string
            enum:
              - trustLevel
              - violationCount
              - reportCount
              - memberSince
              - lastActive
              - contentCount
              - flaggedContentRatio
              - averageSentiment
        - in: query
          name: sortDirection
          schema:
            default: desc
            description: Sort direction
            type: string
            enum:
              - asc
              - desc
        - in: query
          name: memberSinceDate
          schema:
            type: string
        - in: query
          name: lastActiveDate
          schema:
            type: string
        - in: query
          name: contentTypes
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  authors:
                    type: array
                    items:
                      $ref: '#/components/schemas/PublicAuthor'
                  pagination:
                    type: object
                    properties:
                      total:
                        type: number
                      pageSize:
                        type: number
                      pageNumber:
                        type: number
                      hasNextPage:
                        type: boolean
                      hasPreviousPage:
                        type: boolean
                    required:
                      - total
                      - pageSize
                      - pageNumber
                      - hasNextPage
                      - hasPreviousPage
                    additionalProperties: false
                required:
                  - authors
                  - pagination
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const authors = await client.authors.list();

            console.log(authors.authors);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            authors = client.authors.list()
            print(authors.authors)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            authors = moderation_api.authors.list


            puts(authors)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $authors = $client->authors->list(
                contentTypes: 'contentTypes',
                lastActiveDate: 'lastActiveDate',
                memberSinceDate: 'memberSinceDate',
                pageNumber: 0,
                pageSize: 0,
                sortBy: 'trustLevel',
                sortDirection: 'asc',
              );

              var_dump($authors);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Authors;

            ModerationApiClient client = new();

            AuthorListParams parameters = new();

            var authors = await client.Authors.List(parameters);

            Console.WriteLine(authors);
    post:
      operationId: author-openCreate
      summary: Create a new author
      description: >-
        Create a new author. Typically not needed as authors are created
        automatically when content is moderated.
      tags:
        - author
      security:
        - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                profile_picture:
                  description: URL of the author's profile picture
                  anyOf:
                    - type: string
                      format: uri
                    - type: 'null'
                external_link:
                  description: URL of the author's external profile
                  anyOf:
                    - type: string
                      format: uri
                    - type: 'null'
                name:
                  description: Author name or identifier
                  anyOf:
                    - type: string
                    - type: 'null'
                email:
                  description: Author email address
                  anyOf:
                    - type: string
                      format: email
                      pattern: >-
                        ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                    - type: 'null'
                company:
                  description: The author's company or organization
                  anyOf:
                    - type: string
                    - type: 'null'
                metadata:
                  type: object
                  properties:
                    email_verified:
                      description: Whether the author's email is verified
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    phone_verified:
                      description: Whether the author's phone number is verified
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    identity_verified:
                      description: Whether the author's identity is verified
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    is_paying_customer:
                      description: Whether the author is a paying customer
                      anyOf:
                        - type: boolean
                        - type: 'null'
                  additionalProperties: {}
                  description: >-
                    Additional metadata provided by your system. We recommend
                    including any relevant information that may assist in the
                    moderation process.
                first_seen:
                  type: number
                  description: Timestamp when author first appeared
                last_seen:
                  type: number
                  description: Timestamp of last activity
                manual_trust_level:
                  anyOf:
                    - type: number
                      minimum: -1
                      maximum: 4
                    - type: 'null'
                external_id:
                  type: string
                  description: >-
                    External ID of the user, typically the ID of the author in
                    your database.
              required:
                - external_id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAuthor'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const author = await client.authors.create({ external_id:
            'external_id' });


            console.log(author.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            author = client.authors.create(
                external_id="external_id",
            )
            print(author.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            author = moderation_api.authors.create(external_id: "external_id")


            puts(author)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $author = $client->authors->create(
                externalID: 'external_id',
                company: 'company',
                email: 'dev@stainless.com',
                externalLink: 'https://example.com',
                firstSeen: 0,
                lastSeen: 0,
                manualTrustLevel: -1,
                metadata: [
                  'emailVerified' => true,
                  'identityVerified' => true,
                  'isPayingCustomer' => true,
                  'phoneVerified' => true,
                ],
                name: 'name',
                profilePicture: 'https://example.com',
              );

              var_dump($author);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: >-
            using System;

            using ModerationApi;

            using ModerationApi.Models.Authors;


            ModerationApiClient client = new();


            AuthorCreateParams parameters = new() { ExternalID = "external_id"
            };


            var author = await client.Authors.Create(parameters);


            Console.WriteLine(author);
  /authors/{id}:
    get:
      operationId: author-openGetAuthorDetails
      summary: Get author details
      description: >-
        Get detailed information about a specific author including historical
        data and analysis
      tags:
        - author
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: Either external ID or the ID assigned by moderation API.
          required: true
          description: Either external ID or the ID assigned by moderation API.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAuthor'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const author = await client.authors.retrieve('id');

            console.log(author.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            author = client.authors.retrieve(
                "id",
            )
            print(author.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            author = moderation_api.authors.retrieve("id")


            puts(author)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $author = $client->authors->retrieve('id');

              var_dump($author);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Authors;

            ModerationApiClient client = new();

            AuthorRetrieveParams parameters = new() { ID = "id" };

            var author = await client.Authors.Retrieve(parameters);

            Console.WriteLine(author);
    put:
      operationId: author-openUpdate
      summary: Update author details
      description: Update the details of a specific author
      tags:
        - author
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: Either external ID or the ID assigned by moderation API.
          required: true
          description: Either external ID or the ID assigned by moderation API.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                profile_picture:
                  description: URL of the author's profile picture
                  anyOf:
                    - type: string
                      format: uri
                    - type: 'null'
                external_link:
                  description: URL of the author's external profile
                  anyOf:
                    - type: string
                      format: uri
                    - type: 'null'
                name:
                  description: Author name or identifier
                  anyOf:
                    - type: string
                    - type: 'null'
                email:
                  description: Author email address
                  anyOf:
                    - type: string
                      format: email
                      pattern: >-
                        ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                    - type: 'null'
                company:
                  description: The author's company or organization
                  anyOf:
                    - type: string
                    - type: 'null'
                metadata:
                  type: object
                  properties:
                    email_verified:
                      description: Whether the author's email is verified
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    phone_verified:
                      description: Whether the author's phone number is verified
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    identity_verified:
                      description: Whether the author's identity is verified
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    is_paying_customer:
                      description: Whether the author is a paying customer
                      anyOf:
                        - type: boolean
                        - type: 'null'
                  additionalProperties: {}
                  description: >-
                    Additional metadata provided by your system. We recommend
                    including any relevant information that may assist in the
                    moderation process.
                first_seen:
                  type: number
                  description: Timestamp when author first appeared
                last_seen:
                  type: number
                  description: Timestamp of last activity
                manual_trust_level:
                  anyOf:
                    - type: number
                      minimum: -1
                      maximum: 4
                    - type: 'null'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAuthor'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const author = await client.authors.update('id');

            console.log(author.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            author = client.authors.update(
                id="id",
            )
            print(author.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            author = moderation_api.authors.update("id")


            puts(author)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $author = $client->authors->update(
                'id',
                company: 'company',
                email: 'dev@stainless.com',
                externalLink: 'https://example.com',
                firstSeen: 0,
                lastSeen: 0,
                manualTrustLevel: -1,
                metadata: [
                  'emailVerified' => true,
                  'identityVerified' => true,
                  'isPayingCustomer' => true,
                  'phoneVerified' => true,
                ],
                name: 'name',
                profilePicture: 'https://example.com',
              );

              var_dump($author);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Authors;

            ModerationApiClient client = new();

            AuthorUpdateParams parameters = new() { ID = "id" };

            var author = await client.Authors.Update(parameters);

            Console.WriteLine(author);
    delete:
      operationId: author-delete
      summary: Delete an author
      description: Delete a specific author
      tags:
        - author
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const author = await client.authors.delete('id');

            console.log(author.success);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            author = client.authors.delete(
                "id",
            )
            print(author.success)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            author = moderation_api.authors.delete("id")


            puts(author)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $author = $client->authors->delete('id');

              var_dump($author);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Authors;

            ModerationApiClient client = new();

            AuthorDeleteParams parameters = new() { ID = "id" };

            var author = await client.Authors.Delete(parameters);

            Console.WriteLine(author);
  /queue/{id}:
    get:
      operationId: queueView-openGetQueue
      summary: Get a queue
      description: Get a queue
      tags:
        - review-queues
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The queue ID
          required: true
          description: The queue ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  queue:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                      filter:
                        type: object
                        properties:
                          conversationIds:
                            type: array
                            items:
                              anyOf:
                                - type: string
                                - type: 'null'
                          filterLabels:
                            type: array
                            items:
                              type: object
                              properties:
                                label:
                                  type: string
                                type:
                                  type: string
                                  enum:
                                    - FLAGGED
                                    - NOT_FLAGGED
                                    - THRESHOLDS
                                minThreshold:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 100
                                    - type: 'null'
                                maxThreshold:
                                  anyOf:
                                    - type: number
                                      minimum: 0
                                      maximum: 100
                                    - type: 'null'
                              required:
                                - label
                                - type
                              additionalProperties: false
                          labels:
                            type: array
                            items:
                              type: string
                          afterDate:
                            type: string
                          beforeDate:
                            type: string
                          showChecked:
                            type: boolean
                          authorID:
                            type: string
                          filteredActionIds:
                            type: array
                            items:
                              type: string
                          filteredChannelIds:
                            type: array
                            items:
                              type: string
                          recommendationActions:
                            type: array
                            items:
                              type: string
                              enum:
                                - review
                                - allow
                                - reject
                        additionalProperties: false
                      unresolvedItemsCount:
                        type: number
                      resolvedItemsCount:
                        type: number
                      totalItemsCount:
                        type: number
                    required:
                      - id
                      - name
                      - description
                      - filter
                      - unresolvedItemsCount
                      - resolvedItemsCount
                      - totalItemsCount
                    additionalProperties: false
                required:
                  - queue
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const queue = await client.queue.retrieve('id');

            console.log(queue.queue);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            queue = client.queue.retrieve(
                "id",
            )
            print(queue.queue)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            queue = moderation_api.queue.retrieve("id")


            puts(queue)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $queue = $client->queue->retrieve('id');

              var_dump($queue);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Queue;

            ModerationApiClient client = new();

            QueueRetrieveParams parameters = new() { ID = "id" };

            var queue = await client.Queue.Retrieve(parameters);

            Console.WriteLine(queue);
  /queue/{id}/stats:
    get:
      operationId: queueView-openGetStats
      summary: Get queue statistics
      description: >-
        Get detailed statistics about a moderation queue including review times,
        action counts, and trends
      tags:
        - review-queues
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The queue ID
          required: true
          description: The queue ID
        - in: query
          name: withinDays
          schema:
            default: '30'
            description: Number of days to analyze statistics for
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reviewStats:
                    type: object
                    properties:
                      averageTimeToReview:
                        type: number
                        description: Average time in milliseconds to review an item
                      totalReviewed:
                        type: number
                        description: Total number of items reviewed
                      totalPending:
                        type: number
                        description: Total number of items pending review
                    required:
                      - averageTimeToReview
                      - totalReviewed
                      - totalPending
                    additionalProperties: false
                  actionStats:
                    type: array
                    items:
                      type: object
                      properties:
                        actionId:
                          type: string
                          description: ID of the moderation action
                        actionName:
                          type: string
                          description: Name of the moderation action
                        count:
                          type: number
                          description: Number of times this action was taken
                        percentageOfTotal:
                          type: number
                          description: Percentage this action represents of all actions
                      required:
                        - actionId
                        - actionName
                        - count
                        - percentageOfTotal
                      additionalProperties: false
                  topReviewers:
                    type: array
                    items:
                      type: object
                      properties:
                        userId:
                          type: string
                          description: ID of the reviewer
                        name:
                          type: string
                          description: Name of the reviewer
                        reviewCount:
                          type: number
                          description: Number of items reviewed
                        averageTimePerReview:
                          type: number
                          description: Average review time in milliseconds
                        accuracyScore:
                          description: >-
                            Optional accuracy score based on review quality
                            metrics
                          type: number
                        topActions:
                          type: array
                          items:
                            type: object
                            properties:
                              actionId:
                                type: string
                                description: Most used action by this reviewer
                              actionName:
                                type: string
                                description: Name of the most used action
                              count:
                                type: number
                                description: Number of times this action was used
                            required:
                              - actionId
                              - actionName
                              - count
                            additionalProperties: false
                          description: Most common actions taken by this reviewer
                      required:
                        - userId
                        - name
                        - reviewCount
                        - averageTimePerReview
                        - topActions
                      additionalProperties: false
                    description: List of top reviewers and their statistics
                  trends:
                    type: object
                    properties:
                      dailyReviewCounts:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              description: Date in YYYY-MM-DD format
                            count:
                              type: number
                              description: Number of reviews on this date
                          required:
                            - date
                            - count
                          additionalProperties: false
                      flaggedContentTrends:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                              description: Content flag/label
                            trend:
                              type: number
                              description: >-
                                Trend indicator (-1 to 1) showing if this type
                                of flagged content is increasing or decreasing
                          required:
                            - label
                            - trend
                          additionalProperties: false
                    required:
                      - dailyReviewCounts
                      - flaggedContentTrends
                    additionalProperties: false
                required:
                  - reviewStats
                  - actionStats
                  - topReviewers
                  - trends
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const response = await client.queue.getStats('id');

            console.log(response.actionStats);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.queue.get_stats(
                id="id",
            )
            print(response.action_stats)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.queue.get_stats("id")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->queue->getStats('id', withinDays: 'withinDays');

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Queue;

            ModerationApiClient client = new();

            QueueGetStatsParams parameters = new() { ID = "id" };

            var response = await client.Queue.GetStats(parameters);

            Console.WriteLine(response);
  /queue/{id}/items:
    get:
      operationId: queueView-openGetItems
      summary: Get queue items
      description: Get paginated list of items in a moderation queue with filtering options
      tags:
        - review-queues
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The queue ID
          required: true
          description: The queue ID
        - in: query
          name: pageSize
          schema:
            default: 20
            description: Number of items per page
            type: number
        - in: query
          name: pageNumber
          schema:
            default: 1
            description: Page number to fetch
            type: number
        - in: query
          name: sortField
          schema:
            type: string
            enum:
              - createdAt
              - severity
              - reviewedAt
        - in: query
          name: sortDirection
          schema:
            default: desc
            description: Sort direction
            type: string
            enum:
              - asc
              - desc
        - in: query
          name: conversationIds
          schema:
            type: string
        - in: query
          name: labels
          schema:
            type: string
        - in: query
          name: afterDate
          schema:
            type: string
        - in: query
          name: beforeDate
          schema:
            type: string
        - in: query
          name: includeResolved
          schema:
            type: string
        - in: query
          name: authorId
          schema:
            type: string
        - in: query
          name: filteredActionIds
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Content ID
                        content:
                          type: string
                          description: The content to be moderated
                        language:
                          description: Content language
                          type: string
                        labels:
                          type: array
                          items:
                            type: object
                            properties:
                              label:
                                type: string
                                description: Label name
                              score:
                                type: number
                                description: Confidence score of the label
                              flagged:
                                type: boolean
                                description: Whether this label caused a flag
                            required:
                              - label
                              - score
                              - flagged
                            additionalProperties: false
                        conversationId:
                          description: Conversation ID
                          type: string
                        authorId:
                          description: Author ID
                          type: string
                        actions:
                          description: Action IDs taken on this item
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: Action ID
                              name:
                                type: string
                                description: Action name
                              comment:
                                description: Action comment
                                type: string
                              timestamp:
                                type: number
                                description: Unix timestamp of when the action was taken
                              reviewer:
                                description: Moderator userID
                                type: string
                            required:
                              - id
                              - name
                              - timestamp
                            additionalProperties: false
                        flagged:
                          type: boolean
                          description: Whether the item is flagged by any label
                        status:
                          type: string
                          enum:
                            - pending
                            - resolved
                          description: Status of the item
                        timestamp:
                          type: number
                          description: Unix timestamp of when the item was created
                        contentType:
                          description: Type of the content object
                          type: string
                      required:
                        - id
                        - content
                        - labels
                        - flagged
                        - status
                        - timestamp
                      additionalProperties: false
                  pagination:
                    type: object
                    properties:
                      totalItems:
                        type: number
                      totalPages:
                        type: number
                      currentPage:
                        type: number
                      hasNextPage:
                        type: boolean
                      hasPreviousPage:
                        type: boolean
                    required:
                      - totalItems
                      - totalPages
                      - currentPage
                      - hasNextPage
                      - hasPreviousPage
                    additionalProperties: false
                required:
                  - items
                  - pagination
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const items = await client.queue.items.list('id');

            console.log(items.items);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            items = client.queue.items.list(
                id="id",
            )
            print(items.items)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            items = moderation_api.queue.items.list("id")


            puts(items)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $items = $client->queue->items->list(
                'id',
                afterDate: 'afterDate',
                authorID: 'authorId',
                beforeDate: 'beforeDate',
                conversationIDs: 'conversationIds',
                filteredActionIDs: 'filteredActionIds',
                includeResolved: 'includeResolved',
                labels: 'labels',
                pageNumber: 0,
                pageSize: 0,
                sortDirection: 'asc',
                sortField: 'createdAt',
              );

              var_dump($items);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Queue.Items;

            ModerationApiClient client = new();

            ItemListParams parameters = new() { ID = "id" };

            var items = await client.Queue.Items.List(parameters);

            Console.WriteLine(items);
  /queue/{id}/items/{itemId}/resolve:
    post:
      operationId: queueView-openResolveItem
      summary: Resolve a queue item
      description: Mark a queue item as resolved with a specific moderation action
      tags:
        - review-queues
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The queue ID
          required: true
          description: The queue ID
        - in: path
          name: itemId
          schema:
            type: string
            description: The item ID to resolve
          required: true
          description: The item ID to resolve
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  description: Optional comment
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  resolvedAt:
                    type: string
                    description: Timestamp when the item was resolved
                  comment:
                    description: Optional comment
                    type: string
                required:
                  - success
                  - resolvedAt
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const response = await client.queue.items.resolve('itemId', { id:
            'id' });


            console.log(response.resolvedAt);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.queue.items.resolve(
                item_id="itemId",
                id="id",
            )
            print(response.resolved_at)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.queue.items.resolve("itemId", id: "id")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->queue->items->resolve(
                'itemId', id: 'id', comment: 'comment'
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Queue.Items;

            ModerationApiClient client = new();

            ItemResolveParams parameters = new()
            {
                ID = "id",
                ItemID = "itemId",
            };

            var response = await client.Queue.Items.Resolve(parameters);

            Console.WriteLine(response);
  /queue/{id}/items/{itemId}/unresolve:
    post:
      operationId: queueView-openUnresolveItem
      summary: Unresolve a queue item
      description: Mark a previously resolved queue item as unresolved/pending
      tags:
        - review-queues
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The queue ID
          required: true
          description: The queue ID
        - in: path
          name: itemId
          schema:
            type: string
            description: The item ID to unresolve
          required: true
          description: The item ID to unresolve
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  description: Optional reason for unresolving the item
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                    description: New status of the item
                  unresolvedAt:
                    type: string
                    description: Timestamp when the item was unresolved
                required:
                  - success
                  - status
                  - unresolvedAt
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const response = await client.queue.items.unresolve('itemId', { id:
            'id' });


            console.log(response.status);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.queue.items.unresolve(
                item_id="itemId",
                id="id",
            )
            print(response.status)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.queue.items.unresolve("itemId", id: "id")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->queue->items->unresolve(
                'itemId', id: 'id', comment: 'comment'
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Queue.Items;

            ModerationApiClient client = new();

            ItemUnresolveParams parameters = new()
            {
                ID = "id",
                ItemID = "itemId",
            };

            var response = await client.Queue.Items.Unresolve(parameters);

            Console.WriteLine(response);
  /actions:
    get:
      operationId: actions-list
      summary: List moderation actions
      description: >-
        List all available moderation actions for the authenticated
        organization.
      tags:
        - Actions
      security:
        - Authorization: []
      parameters:
        - in: query
          name: queueId
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: The ID of the action.
                    key:
                      description: User defined key of the action.
                      anyOf:
                        - type: string
                        - type: 'null'
                    createdAt:
                      description: The date the action was created.
                      type: string
                    name:
                      type: string
                      description: The name of the action.
                    description:
                      description: The description of the action.
                      anyOf:
                        - type: string
                        - type: 'null'
                    type:
                      description: The type of the action.
                      anyOf:
                        - type: string
                          enum:
                            - AUTHOR_BLOCK
                            - AUTHOR_BLOCK_TEMP
                            - AUTHOR_UNBLOCK
                            - AUTHOR_DELETE
                            - AUTHOR_REPORT
                            - AUTHOR_WARN
                            - AUTHOR_CUSTOM
                            - ITEM_REJECT
                            - ITEM_ALLOW
                            - ITEM_CUSTOM
                        - type: 'null'
                    builtIn:
                      default: false
                      description: Whether the action is a built-in action or a custom one.
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    queueBehaviour:
                      default: NO_CHANGE
                      description: >-
                        Whether the action resolves and removes the item,
                        unresolves and re-add it to the queue, or does not
                        change the resolve status.
                      type: string
                      enum:
                        - REMOVE
                        - ADD
                        - NO_CHANGE
                    filterInQueueIds:
                      default: []
                      description: The IDs of the queues the action is available in.
                      type: array
                      items:
                        type: string
                    position:
                      default: ALL_QUEUES
                      description: >-
                        Show the action in all queues, selected queues or no
                        queues (to use via API only).
                      type: string
                      enum:
                        - ALL_QUEUES
                        - SOME_QUEUES
                        - HIDDEN
                    possibleValues:
                      default: []
                      description: >-
                        The possible values of the action. The user will be
                        prompted to select one of these values when executing
                        the action.
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                            description: The value of the action.
                        required:
                          - value
                        additionalProperties: false
                    valueRequired:
                      default: false
                      description: Whether the action requires a value to be executed.
                      type: boolean
                    freeText:
                      default: false
                      description: >-
                        Whether the action allows any text to be entered as a
                        value or if it must be one of the possible values.
                      type: boolean
                  required:
                    - id
                    - createdAt
                    - name
                    - builtIn
                    - queueBehaviour
                    - filterInQueueIds
                    - position
                    - possibleValues
                    - valueRequired
                    - freeText
                  additionalProperties: false
                description: List of moderation actions with their associated webhooks
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const actions = await client.actions.list();

            console.log(actions);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            actions = client.actions.list()
            print(actions)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            actions = moderation_api.actions.list


            puts(actions)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $actions = $client->actions->list(queueID: 'queueId');

              var_dump($actions);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Actions;

            ModerationApiClient client = new();

            ActionListParams parameters = new();

            var actions = await client.Actions.List(parameters);

            Console.WriteLine(actions);
    post:
      operationId: actions-create
      summary: Create an action
      description: Create an action.
      tags:
        - Actions
      security:
        - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  description: User defined key of the action.
                  anyOf:
                    - type: string
                    - type: 'null'
                name:
                  type: string
                  description: The name of the action.
                description:
                  description: The description of the action.
                  anyOf:
                    - type: string
                    - type: 'null'
                type:
                  description: The type of the action.
                  anyOf:
                    - type: string
                      enum:
                        - AUTHOR_BLOCK
                        - AUTHOR_BLOCK_TEMP
                        - AUTHOR_UNBLOCK
                        - AUTHOR_DELETE
                        - AUTHOR_REPORT
                        - AUTHOR_WARN
                        - AUTHOR_CUSTOM
                        - ITEM_REJECT
                        - ITEM_ALLOW
                        - ITEM_CUSTOM
                    - type: 'null'
                builtIn:
                  default: false
                  description: Whether the action is a built-in action or a custom one.
                  anyOf:
                    - type: boolean
                    - type: 'null'
                queueBehaviour:
                  default: NO_CHANGE
                  description: >-
                    Whether the action resolves and removes the item, unresolves
                    and re-add it to the queue, or does not change the resolve
                    status.
                  type: string
                  enum:
                    - REMOVE
                    - ADD
                    - NO_CHANGE
                filterInQueueIds:
                  default: []
                  description: The IDs of the queues the action is available in.
                  type: array
                  items:
                    type: string
                position:
                  default: ALL_QUEUES
                  description: >-
                    Show the action in all queues, selected queues or no queues
                    (to use via API only).
                  type: string
                  enum:
                    - ALL_QUEUES
                    - SOME_QUEUES
                    - HIDDEN
                possibleValues:
                  default: []
                  description: >-
                    The possible values of the action. The user will be prompted
                    to select one of these values when executing the action.
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                        description: The value of the action.
                    required:
                      - value
                valueRequired:
                  default: false
                  description: Whether the action requires a value to be executed.
                  type: boolean
                freeText:
                  default: false
                  description: >-
                    Whether the action allows any text to be entered as a value
                    or if it must be one of the possible values.
                  type: boolean
              required:
                - name
      responses:
        '200':
          description: Action created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the action.
                  key:
                    description: User defined key of the action.
                    anyOf:
                      - type: string
                      - type: 'null'
                  createdAt:
                    description: The date the action was created.
                    type: string
                  name:
                    type: string
                    description: The name of the action.
                  description:
                    description: The description of the action.
                    anyOf:
                      - type: string
                      - type: 'null'
                  type:
                    description: The type of the action.
                    anyOf:
                      - type: string
                        enum:
                          - AUTHOR_BLOCK
                          - AUTHOR_BLOCK_TEMP
                          - AUTHOR_UNBLOCK
                          - AUTHOR_DELETE
                          - AUTHOR_REPORT
                          - AUTHOR_WARN
                          - AUTHOR_CUSTOM
                          - ITEM_REJECT
                          - ITEM_ALLOW
                          - ITEM_CUSTOM
                      - type: 'null'
                  builtIn:
                    default: false
                    description: Whether the action is a built-in action or a custom one.
                    anyOf:
                      - type: boolean
                      - type: 'null'
                  queueBehaviour:
                    default: NO_CHANGE
                    description: >-
                      Whether the action resolves and removes the item,
                      unresolves and re-add it to the queue, or does not change
                      the resolve status.
                    type: string
                    enum:
                      - REMOVE
                      - ADD
                      - NO_CHANGE
                  filterInQueueIds:
                    default: []
                    description: The IDs of the queues the action is available in.
                    type: array
                    items:
                      type: string
                  position:
                    default: ALL_QUEUES
                    description: >-
                      Show the action in all queues, selected queues or no
                      queues (to use via API only).
                    type: string
                    enum:
                      - ALL_QUEUES
                      - SOME_QUEUES
                      - HIDDEN
                  possibleValues:
                    default: []
                    description: >-
                      The possible values of the action. The user will be
                      prompted to select one of these values when executing the
                      action.
                    type: array
                    items:
                      type: object
                      properties:
                        value:
                          type: string
                          description: The value of the action.
                      required:
                        - value
                      additionalProperties: false
                  valueRequired:
                    default: false
                    description: Whether the action requires a value to be executed.
                    type: boolean
                  freeText:
                    default: false
                    description: >-
                      Whether the action allows any text to be entered as a
                      value or if it must be one of the possible values.
                    type: boolean
                required:
                  - id
                  - createdAt
                  - name
                  - builtIn
                  - queueBehaviour
                  - filterInQueueIds
                  - position
                  - possibleValues
                  - valueRequired
                  - freeText
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '409':
          description: Action with this key already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.CONFLICT'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const action = await client.actions.create({ name: 'name' });

            console.log(action.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            action = client.actions.create(
                name="name",
            )
            print(action.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            action = moderation_api.actions.create(name: "name")


            puts(action)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $action = $client->actions->create(
                name: 'name',
                builtIn: true,
                description: 'description',
                filterInQueueIDs: ['string'],
                freeText: true,
                key: 'key',
                position: 'ALL_QUEUES',
                possibleValues: [['value' => 'value']],
                queueBehaviour: 'REMOVE',
                type: 'AUTHOR_BLOCK',
                valueRequired: true,
              );

              var_dump($action);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Actions;

            ModerationApiClient client = new();

            ActionCreateParams parameters = new() { Name = "name" };

            var action = await client.Actions.Create(parameters);

            Console.WriteLine(action);
  /actions/{id}:
    get:
      operationId: actions-get
      summary: Get an action
      description: Get an action by ID.
      tags:
        - Actions
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The ID of the action to get.
          required: true
          description: The ID of the action to get.
      responses:
        '200':
          description: Action retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the action.
                  key:
                    description: User defined key of the action.
                    anyOf:
                      - type: string
                      - type: 'null'
                  createdAt:
                    description: The date the action was created.
                    type: string
                  name:
                    type: string
                    description: The name of the action.
                  description:
                    description: The description of the action.
                    anyOf:
                      - type: string
                      - type: 'null'
                  type:
                    description: The type of the action.
                    anyOf:
                      - type: string
                        enum:
                          - AUTHOR_BLOCK
                          - AUTHOR_BLOCK_TEMP
                          - AUTHOR_UNBLOCK
                          - AUTHOR_DELETE
                          - AUTHOR_REPORT
                          - AUTHOR_WARN
                          - AUTHOR_CUSTOM
                          - ITEM_REJECT
                          - ITEM_ALLOW
                          - ITEM_CUSTOM
                      - type: 'null'
                  builtIn:
                    default: false
                    description: Whether the action is a built-in action or a custom one.
                    anyOf:
                      - type: boolean
                      - type: 'null'
                  queueBehaviour:
                    default: NO_CHANGE
                    description: >-
                      Whether the action resolves and removes the item,
                      unresolves and re-add it to the queue, or does not change
                      the resolve status.
                    type: string
                    enum:
                      - REMOVE
                      - ADD
                      - NO_CHANGE
                  filterInQueueIds:
                    default: []
                    description: The IDs of the queues the action is available in.
                    type: array
                    items:
                      type: string
                  position:
                    default: ALL_QUEUES
                    description: >-
                      Show the action in all queues, selected queues or no
                      queues (to use via API only).
                    type: string
                    enum:
                      - ALL_QUEUES
                      - SOME_QUEUES
                      - HIDDEN
                  possibleValues:
                    default: []
                    description: >-
                      The possible values of the action. The user will be
                      prompted to select one of these values when executing the
                      action.
                    type: array
                    items:
                      type: object
                      properties:
                        value:
                          type: string
                          description: The value of the action.
                      required:
                        - value
                      additionalProperties: false
                  valueRequired:
                    default: false
                    description: Whether the action requires a value to be executed.
                    type: boolean
                  freeText:
                    default: false
                    description: >-
                      Whether the action allows any text to be entered as a
                      value or if it must be one of the possible values.
                    type: boolean
                required:
                  - id
                  - createdAt
                  - name
                  - builtIn
                  - queueBehaviour
                  - filterInQueueIds
                  - position
                  - possibleValues
                  - valueRequired
                  - freeText
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const action = await client.actions.retrieve('id');

            console.log(action.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            action = client.actions.retrieve(
                "id",
            )
            print(action.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            action = moderation_api.actions.retrieve("id")


            puts(action)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $action = $client->actions->retrieve('id');

              var_dump($action);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Actions;

            ModerationApiClient client = new();

            ActionRetrieveParams parameters = new() { ID = "id" };

            var action = await client.Actions.Retrieve(parameters);

            Console.WriteLine(action);
    put:
      operationId: actions-update
      summary: Update an action
      description: Update an action.
      tags:
        - Actions
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The ID of the action to update.
          required: true
          description: The ID of the action to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  description: User defined key of the action.
                  anyOf:
                    - type: string
                    - type: 'null'
                name:
                  type: string
                  description: The name of the action.
                description:
                  description: The description of the action.
                  anyOf:
                    - type: string
                    - type: 'null'
                type:
                  description: The type of the action.
                  anyOf:
                    - type: string
                      enum:
                        - AUTHOR_BLOCK
                        - AUTHOR_BLOCK_TEMP
                        - AUTHOR_UNBLOCK
                        - AUTHOR_DELETE
                        - AUTHOR_REPORT
                        - AUTHOR_WARN
                        - AUTHOR_CUSTOM
                        - ITEM_REJECT
                        - ITEM_ALLOW
                        - ITEM_CUSTOM
                    - type: 'null'
                builtIn:
                  default: false
                  description: Whether the action is a built-in action or a custom one.
                  anyOf:
                    - type: boolean
                    - type: 'null'
                queueBehaviour:
                  default: NO_CHANGE
                  description: >-
                    Whether the action resolves and removes the item, unresolves
                    and re-add it to the queue, or does not change the resolve
                    status.
                  type: string
                  enum:
                    - REMOVE
                    - ADD
                    - NO_CHANGE
                filterInQueueIds:
                  default: []
                  description: The IDs of the queues the action is available in.
                  type: array
                  items:
                    type: string
                position:
                  default: ALL_QUEUES
                  description: >-
                    Show the action in all queues, selected queues or no queues
                    (to use via API only).
                  type: string
                  enum:
                    - ALL_QUEUES
                    - SOME_QUEUES
                    - HIDDEN
                possibleValues:
                  default: []
                  description: >-
                    The possible values of the action. The user will be prompted
                    to select one of these values when executing the action.
                  type: array
                  items:
                    type: object
                    properties:
                      value:
                        type: string
                        description: The value of the action.
                    required:
                      - value
                valueRequired:
                  default: false
                  description: Whether the action requires a value to be executed.
                  type: boolean
                freeText:
                  default: false
                  description: >-
                    Whether the action allows any text to be entered as a value
                    or if it must be one of the possible values.
                  type: boolean
      responses:
        '200':
          description: Action updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the action.
                  key:
                    description: User defined key of the action.
                    anyOf:
                      - type: string
                      - type: 'null'
                  createdAt:
                    description: The date the action was created.
                    type: string
                  name:
                    type: string
                    description: The name of the action.
                  description:
                    description: The description of the action.
                    anyOf:
                      - type: string
                      - type: 'null'
                  type:
                    description: The type of the action.
                    anyOf:
                      - type: string
                        enum:
                          - AUTHOR_BLOCK
                          - AUTHOR_BLOCK_TEMP
                          - AUTHOR_UNBLOCK
                          - AUTHOR_DELETE
                          - AUTHOR_REPORT
                          - AUTHOR_WARN
                          - AUTHOR_CUSTOM
                          - ITEM_REJECT
                          - ITEM_ALLOW
                          - ITEM_CUSTOM
                      - type: 'null'
                  builtIn:
                    default: false
                    description: Whether the action is a built-in action or a custom one.
                    anyOf:
                      - type: boolean
                      - type: 'null'
                  queueBehaviour:
                    default: NO_CHANGE
                    description: >-
                      Whether the action resolves and removes the item,
                      unresolves and re-add it to the queue, or does not change
                      the resolve status.
                    type: string
                    enum:
                      - REMOVE
                      - ADD
                      - NO_CHANGE
                  filterInQueueIds:
                    default: []
                    description: The IDs of the queues the action is available in.
                    type: array
                    items:
                      type: string
                  position:
                    default: ALL_QUEUES
                    description: >-
                      Show the action in all queues, selected queues or no
                      queues (to use via API only).
                    type: string
                    enum:
                      - ALL_QUEUES
                      - SOME_QUEUES
                      - HIDDEN
                  possibleValues:
                    default: []
                    description: >-
                      The possible values of the action. The user will be
                      prompted to select one of these values when executing the
                      action.
                    type: array
                    items:
                      type: object
                      properties:
                        value:
                          type: string
                          description: The value of the action.
                      required:
                        - value
                      additionalProperties: false
                  valueRequired:
                    default: false
                    description: Whether the action requires a value to be executed.
                    type: boolean
                  freeText:
                    default: false
                    description: >-
                      Whether the action allows any text to be entered as a
                      value or if it must be one of the possible values.
                    type: boolean
                required:
                  - id
                  - createdAt
                  - name
                  - builtIn
                  - queueBehaviour
                  - filterInQueueIds
                  - position
                  - possibleValues
                  - valueRequired
                  - freeText
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '409':
          description: Action with this key already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.CONFLICT'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const action = await client.actions.update('id');

            console.log(action.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            action = client.actions.update(
                id="id",
            )
            print(action.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            action = moderation_api.actions.update("id")


            puts(action)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $action = $client->actions->update(
                'id',
                builtIn: true,
                description: 'description',
                filterInQueueIDs: ['string'],
                freeText: true,
                key: 'key',
                name: 'name',
                position: 'ALL_QUEUES',
                possibleValues: [['value' => 'value']],
                queueBehaviour: 'REMOVE',
                type: 'AUTHOR_BLOCK',
                valueRequired: true,
              );

              var_dump($action);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Actions;

            ModerationApiClient client = new();

            ActionUpdateParams parameters = new() { ID = "id" };

            var action = await client.Actions.Update(parameters);

            Console.WriteLine(action);
    delete:
      operationId: actions-delete
      summary: Delete an action
      description: Delete an action and all of its webhooks.
      tags:
        - Actions
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: The ID of the action to delete.
          required: true
          description: The ID of the action to delete.
      responses:
        '200':
          description: Action deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  deleted:
                    type: boolean
                    description: Whether the action was deleted.
                  id:
                    type: string
                    description: The ID of the action.
                required:
                  - deleted
                  - id
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const action = await client.actions.delete('id');

            console.log(action.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            action = client.actions.delete(
                "id",
            )
            print(action.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            action = moderation_api.actions.delete("id")


            puts(action)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $action = $client->actions->delete('id');

              var_dump($action);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Actions;

            ModerationApiClient client = new();

            ActionDeleteParams parameters = new() { ID = "id" };

            var action = await client.Actions.Delete(parameters);

            Console.WriteLine(action);
  /actions/execute:
    post:
      operationId: actions-execute
      summary: Execute moderation action
      description: Execute a moderation action on one or more content items.
      tags:
        - Actions
      security:
        - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                actionKey:
                  type: string
                  description: ID or key of the action to execute
                contentIds:
                  description: >-
                    IDs of the content items to apply the action to. Provide
                    this or authorIds.
                  type: array
                  items:
                    type: string
                authorIds:
                  description: >-
                    IDs of the authors to apply the action to. Provide this or
                    contentIds.
                  type: array
                  items:
                    type: string
                value:
                  description: Optional value to provide with the action
                  type: string
                queueId:
                  description: Optional queue ID if the action is queue-specific
                  type: string
                duration:
                  description: Optional duration in milliseconds for actions with timeouts
                  type: number
                  minimum: 0
              required:
                - actionKey
              description: Input parameters
      responses:
        '200':
          description: Action executed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the action was executed successfully
                required:
                  - success
                additionalProperties: false
                description: Execution result
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const response = await client.actions.execute.execute({ actionKey:
            'actionKey' });


            console.log(response.success);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.actions.execute.execute(
                action_key="actionKey",
            )
            print(response.success)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.actions.execute.execute(action_key:
            "actionKey")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->actions->execute->execute(
                actionKey: 'actionKey',
                authorIDs: ['string'],
                contentIDs: ['string'],
                duration: 0,
                queueID: 'queueId',
                value: 'value',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Actions.Execute;

            ModerationApiClient client = new();

            ExecuteExecuteParams parameters = new() { ActionKey = "actionKey" };

            var response = await client.Actions.Execute.Execute(parameters);

            Console.WriteLine(response);
  /actions/{actionId}/execute:
    post:
      operationId: actions-executeDeprecated
      summary: Execute an action
      description: Execute an action on a set of content items in a queue.
      tags:
        - Actions
      security:
        - Authorization: []
      deprecated: true
      parameters:
        - in: path
          name: actionId
          schema:
            type: string
            description: The ID or key of the action to execute.
          required: true
          description: The ID or key of the action to execute.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contentIds:
                  description: The IDs of the content items to perform the action on.
                  type: array
                  items:
                    type: string
                authorIds:
                  description: IDs of the authors to apply the action to
                  type: array
                  items:
                    type: string
                queueId:
                  description: The ID of the queue the action was performed from if any.
                  type: string
                value:
                  description: >-
                    The value of the action. Useful to set a reason for the
                    action etc.
                  type: string
      responses:
        '200':
          description: Action executed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Action executed successfully.
                  actionId:
                    type: string
                    description: The ID of the action.
                  ids:
                    type: array
                    items:
                      type: string
                    description: The IDs of the content items.
                required:
                  - success
                  - actionId
                  - ids
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.actions.execute.executeByID('actionId');


            console.log(response.ids);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.actions.execute.execute_by_id(
                action_id="actionId",
            )
            print(response.ids)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.actions.execute.execute_by_id("actionId")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->actions->execute->executeByID(
                'actionId',
                authorIDs: ['string'],
                contentIDs: ['string'],
                queueID: 'queueId',
                value: 'value',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: >-
            using System;

            using ModerationApi;

            using ModerationApi.Models.Actions.Execute;


            ModerationApiClient client = new();


            ExecuteExecuteByIDParams parameters = new() { ActionID = "actionId"
            };


            var response = await client.Actions.Execute.ExecuteByID(parameters);


            Console.WriteLine(response);
  /moderate/text:
    post:
      operationId: moderation-text
      summary: Analyze text
      description: >-
        (Deprecated use https://api.moderationapi.com/v1/moderate) Analyze text
        content with your configured moderation models and filters.
      tags:
        - Moderate
      security:
        - Authorization: []
      deprecated: true
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contentId:
                  description: The unique ID of the content in your database.
                  type: string
                  minLength: 1
                  maxLength: 100
                value:
                  type: string
                  maxLength: 100000
                  description: >-
                    The text you'd like to analyze. We recommend to submit plain
                    text or HTML
                channelKey:
                  description: The key of the channel.
                  type: string
                doNotStore:
                  description: >-
                    Do not store the content. The content won't enter the review
                    queue
                  type: boolean
                authorId:
                  description: The author of the content.
                  type: string
                contextId:
                  description: For example the ID of a chat room or a post
                  type: string
                metadata:
                  description: Any metadata you want to store with the content
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
              required:
                - value
              description: Input parameters for text moderation
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        description: Success if the request was successful
                      error:
                        description: Error message if the request failed
                      contentId:
                        description: >-
                          The ID of the content. Only returned if the content
                          was stored.
                        type: string
                      request:
                        type: object
                        properties:
                          timestamp:
                            type: number
                            description: The timestamp of the request
                          quota_usage:
                            type: number
                            description: The quota usage of the request
                        required:
                          - timestamp
                          - quota_usage
                        additionalProperties: false
                        description: Information about the request
                      flagged:
                        type: boolean
                        description: Whether the content was flagged by any models
                      author:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                description: Author ID in Moderation API
                              external_id:
                                description: The author's ID from your system
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              block:
                                anyOf:
                                  - type: object
                                    properties:
                                      until:
                                        description: >-
                                          The timestamp until which they are
                                          blocked if the author is suspended.
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      reason:
                                        description: >-
                                          The moderators reason why the author was
                                          blocked or suspended.
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    additionalProperties: false
                                  - type: 'null'
                                description: >-
                                  Block or suspension details, if applicable.
                                  Null if the author is enabled.
                              status:
                                type: string
                                enum:
                                  - enabled
                                  - suspended
                                  - blocked
                                description: Current author status
                              trust_level:
                                type: object
                                properties:
                                  level:
                                    type: number
                                    description: Author trust level (-1, 0, 1, 2, 3, or 4)
                                  manual:
                                    type: boolean
                                    description: >-
                                      True if the trust level was set manually
                                      by a moderator
                                required:
                                  - level
                                  - manual
                                additionalProperties: false
                            required:
                              - id
                              - block
                              - status
                              - trust_level
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The author of the content if your account has authors
                          enabled. Requires you to send authorId when submitting
                          content.
                      content_moderated:
                        type: boolean
                        description: >-
                          Whether the content was moderated or not. Same as
                          `content` !== `original`
                      unicode_spoofing:
                        type: boolean
                        description: >-
                          Whether the content is using look-alike characters.
                          Often used by spammers.
                      data_found:
                        type: boolean
                        description: Whether any entity matchers found data for the content
                      original:
                        type: string
                        description: The original content
                      content:
                        type: string
                        description: >-
                          The content after moderation. With all mask
                          replacements applied and look-alike characters
                          replaced with the original characters.
                      nsfw:
                        description: >-
                          The NSFW model output if enabled in your project. Read
                          more at https://docs.moderationapi.com/models/nsfw
                        type: object
                        properties:
                          label:
                            description: The label of the model
                            type: string
                          score:
                            description: The confidence of the model
                            type: number
                          error:
                            description: Indicates an error with the model
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate
                            type: string
                          label_scores:
                            description: The confidence of all labels
                            type: object
                            properties:
                              SENSITIVE:
                                description: >-
                                  Mentions religion, politics, race, etc., but
                                  is neutral or positive.
                                type: number
                              UNSAFE:
                                description: >-
                                  Sexual, hateful, profane, and inappropriate
                                  content.
                                type: number
                              NEUTRAL:
                                description: ''
                                type: number
                            additionalProperties: false
                        additionalProperties: false
                      toxicity:
                        description: >-
                          The toxicity model output if enabled in your project.
                          Read more at
                          https://docs.moderationapi.com/models/toxicity
                        type: object
                        properties:
                          label:
                            description: The label of the model
                            type: string
                          score:
                            description: The confidence of the model
                            type: number
                          error:
                            description: Indicates an error with the model
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate
                            type: string
                          label_scores:
                            description: The confidence of all labels
                            type: object
                            properties:
                              TOXICITY:
                                description: Rude or disrespectful content.
                                type: number
                              PROFANITY:
                                description: >-
                                  Swearing, curse words, and other obscene
                                  language.
                                type: number
                              DISCRIMINATION:
                                description: Discrimination of race, religion, gender, etc.
                                type: number
                              SEVERE_TOXICITY:
                                description: Very hateful and aggressive content.
                                type: number
                              INSULT:
                                description: >-
                                  Negative comments about looks or personality
                                  etc.
                                type: number
                              THREAT:
                                description: >-
                                  Content containing intention to harm or
                                  violence.
                                type: number
                              NEUTRAL:
                                description: ''
                                type: number
                            additionalProperties: false
                        additionalProperties: false
                      quality:
                        description: >-
                          The spam model output if enabled in your project. Read
                          more at https://docs.moderationapi.com/models/spam
                        type: object
                        properties:
                          label:
                            description: The label of the model
                            type: string
                          score:
                            description: The confidence of the model
                            type: number
                          error:
                            description: Indicates an error with the model
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate
                            type: string
                          label_scores:
                            description: The confidence of all labels
                            type: object
                            properties:
                              UNSUBSTANTIAL:
                                description: Trivial or short content.
                                type: number
                              INCOHERENT:
                                description: Difficult to understand, nonsensical.
                                type: number
                              SPAM:
                                description: Irrelevant and unsolicited commercial content.
                                type: number
                              NEUTRAL:
                                description: ''
                                type: number
                            additionalProperties: false
                        additionalProperties: false
                      sentiment:
                        description: >-
                          The sentiment model output if enabled in your project.
                          Read more at
                          https://docs.moderationapi.com/models/sentiment
                        type: object
                        properties:
                          label:
                            description: The label of the model
                            type: string
                          score:
                            description: The confidence of the model
                            type: number
                          error:
                            description: Indicates an error with the model
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate
                            type: string
                          label_scores:
                            description: The confidence of all labels
                            type: object
                            properties:
                              POSITIVE:
                                description: Positive sentiment.
                                type: number
                              NEGATIVE:
                                description: Negative sentiment.
                                type: number
                              NEUTRAL:
                                description: ''
                                type: number
                            additionalProperties: false
                        additionalProperties: false
                      propriety:
                        description: >-
                          The propriety model output if enabled in your project.
                          Read more at
                          https://docs.moderationapi.com/models/propriety
                        type: object
                        properties:
                          label:
                            description: The label of the model
                            type: string
                          score:
                            description: The confidence of the model
                            type: number
                          error:
                            description: Indicates an error with the model
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate
                            type: string
                          label_scores:
                            description: The confidence of all labels
                            type: object
                            properties:
                              FLIRTATION:
                                description: Pickup lines, compliments on appearance, etc.
                                type: number
                              SEXUALLY_EXPLICIT:
                                description: References to sexual acts, body parts, etc.
                                type: number
                              NEUTRAL:
                                description: ''
                                type: number
                            additionalProperties: false
                        additionalProperties: false
                      email:
                        description: >-
                          The email entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/email
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      phone:
                        description: >-
                          The phone entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/phone
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      url:
                        description: >-
                          The url entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/url
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      address:
                        description: >-
                          The address entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/address
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      name:
                        description: >-
                          The name entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/name
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      username:
                        description: >-
                          The username entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/username
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      profanity:
                        description: >-
                          The profanity entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/profanity
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      sensitive:
                        description: >-
                          The sensitive numbers entity matcher output if enabled
                          in your project. Read more at
                          https://docs.moderationapi.com/models/sensitive
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      wordlist:
                        description: >-
                          The wordlist entity matcher output if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/word
                        type: object
                        properties:
                          mode:
                            description: The detection mode.
                            type: string
                            enum:
                              - NORMAL
                              - SUSPICIOUS
                              - PARANOID
                          found:
                            description: Whether a match was found or not.
                            type: boolean
                          matches:
                            description: The matches of the entity matcher.
                            type: array
                            items:
                              type: string
                          components:
                            description: The components of the matcher.
                          error:
                            description: Indicates an error with the matcher.
                            type: string
                          warning:
                            description: >-
                              Indicates a warning from the model, e.g. if the
                              text is too short or long and the model might not
                              be accurate.
                            type: string
                        additionalProperties: false
                      wordlists:
                        description: >-
                          The wordlist entity matcher outputs if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/word
                        type: array
                        items:
                          type: object
                          properties:
                            mode:
                              type: string
                              enum:
                                - BLOCK_LIST
                                - REQUIRE_LIST
                                - PASS_LIST
                              description: The flagging mode.
                            found:
                              description: Whether a match was found or not.
                              type: boolean
                            matches:
                              description: The matches of the entity matcher.
                              type: array
                              items:
                                type: string
                            components:
                              description: The components of the matcher.
                            error:
                              description: Indicates an error with the matcher.
                              type: string
                            warning:
                              description: >-
                                Indicates a warning from the model, e.g. if the
                                text is too short or long and the model might
                                not be accurate.
                              type: string
                            flagged:
                              type: boolean
                              description: Whether the wordlists flagged the content.
                            name:
                              type: string
                              description: The name of the wordlist
                            id:
                              type: string
                              description: The ID of the wordlist
                            score:
                              type: number
                              description: The score of the wordlist
                          required:
                            - mode
                            - flagged
                            - name
                            - id
                            - score
                          additionalProperties: false
                    required:
                      - status
                      - request
                      - flagged
                      - author
                      - content_moderated
                      - unicode_spoofing
                      - data_found
                      - original
                      - content
                    additionalProperties: false
                  - type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                description: >-
                  Moderation analysis results including model outputs and
                  detected patterns
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /moderate/object:
    post:
      operationId: moderation-object
      summary: Analyze object.
      description: >-
        (Deprecated use https://api.moderationapi.com/v1/moderate) Analyze an
        object with multiple fields including text, images, video, audio. Use to
        moderate a post, a profile, a form submission or anything that have
        multiple fields.
      tags:
        - Moderate
      security:
        - Authorization: []
      deprecated: true
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contentId:
                  description: The unique ID of the content in your database.
                  type: string
                  minLength: 1
                  maxLength: 100
                channelKey:
                  description: The key of the channel.
                  type: string
                doNotStore:
                  description: >-
                    Do not store the content. The content won't enter the review
                    queue
                  type: boolean
                authorId:
                  description: The author of the content.
                  type: string
                contextId:
                  description: For example the ID of a chat room or a post
                  type: string
                metadata:
                  description: Any metadata you want to store with the content
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                value:
                  type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - profile
                        - event
                        - product
                        - object
                      description: The type of the object you want to analyze.
                    data:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - text
                              - image
                              - video
                              - audio
                            description: >-
                              The type of content (e.g., "text", "image",
                              "video")
                          modelIds:
                            description: Optional array of specific model IDs to use
                            type: array
                            items:
                              type: string
                          value:
                            type: string
                            description: The content to analyze
                        required:
                          - type
                          - value
                  required:
                    - type
                    - data
                  description: The object you want to analyze.
              required:
                - value
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        description: Success if the request was successful
                      error:
                        description: Error message if the request failed
                      contentId:
                        description: >-
                          The ID of the content. Only returned if the content
                          was stored.
                        type: string
                      request:
                        type: object
                        properties:
                          timestamp:
                            type: number
                            description: The timestamp of the request
                          quota_usage:
                            type: number
                            description: The quota usage of the request
                        required:
                          - timestamp
                          - quota_usage
                        additionalProperties: false
                        description: Information about the request
                      flagged:
                        type: boolean
                        description: Whether the content was flagged by any models
                      author:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                description: Author ID in Moderation API
                              external_id:
                                description: The author's ID from your system
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              block:
                                anyOf:
                                  - type: object
                                    properties:
                                      until:
                                        description: >-
                                          The timestamp until which they are
                                          blocked if the author is suspended.
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      reason:
                                        description: >-
                                          The moderators reason why the author was
                                          blocked or suspended.
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    additionalProperties: false
                                  - type: 'null'
                                description: >-
                                  Block or suspension details, if applicable.
                                  Null if the author is enabled.
                              status:
                                type: string
                                enum:
                                  - enabled
                                  - suspended
                                  - blocked
                                description: Current author status
                              trust_level:
                                type: object
                                properties:
                                  level:
                                    type: number
                                    description: Author trust level (-1, 0, 1, 2, 3, or 4)
                                  manual:
                                    type: boolean
                                    description: >-
                                      True if the trust level was set manually
                                      by a moderator
                                required:
                                  - level
                                  - manual
                                additionalProperties: false
                            required:
                              - id
                              - block
                              - status
                              - trust_level
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The author of the content if your account has authors
                          enabled. Requires you to send authorId when submitting
                          content.
                      unicode_spoofing:
                        type: boolean
                        description: >-
                          Whether the content is using look-alike characters.
                          Often used by spammers.
                      data_found:
                        type: boolean
                        description: Whether any entity matchers found data for the content
                      labels:
                        type: array
                        items:
                          type: object
                          properties:
                            label:
                              type: string
                              description: The label of the model
                            model:
                              type: string
                              description: The model that found the label
                            score:
                              type: number
                              minimum: 0
                              maximum: 1
                              description: The confidence of the model
                          required:
                            - label
                            - model
                            - score
                          additionalProperties: false
                        description: The scores of each label
                      entities:
                        type: array
                        items:
                          type: object
                          properties:
                            model:
                              type: string
                              description: The model that found the entity
                            matches:
                              type: array
                              items:
                                type: string
                              description: The matches of the entity
                            score:
                              description: The similarity score of the matches
                              type: number
                          required:
                            - model
                            - matches
                          additionalProperties: false
                        description: The entities found in the content
                      wordlists:
                        description: >-
                          The wordlist entity matcher outputs if enabled in your
                          project. Read more at
                          https://docs.moderationapi.com/models/word
                        type: array
                        items:
                          type: object
                          properties:
                            mode:
                              type: string
                              enum:
                                - BLOCK_LIST
                                - REQUIRE_LIST
                                - PASS_LIST
                              description: The flagging mode.
                            found:
                              description: Whether a match was found or not.
                              type: boolean
                            matches:
                              description: The matches of the entity matcher.
                              type: array
                              items:
                                type: string
                            components:
                              description: The components of the matcher.
                            error:
                              description: Indicates an error with the matcher.
                              type: string
                            warning:
                              description: >-
                                Indicates a warning from the model, e.g. if the
                                text is too short or long and the model might
                                not be accurate.
                              type: string
                            flagged:
                              type: boolean
                              description: Whether the wordlists flagged the content.
                            name:
                              type: string
                              description: The name of the wordlist
                            id:
                              type: string
                              description: The ID of the wordlist
                            score:
                              type: number
                              description: The score of the wordlist
                          required:
                            - mode
                            - flagged
                            - name
                            - id
                            - score
                          additionalProperties: false
                      fields:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                              description: The key of the field
                            flagged:
                              type: boolean
                              description: Whether the field was flagged
                            flagged_by:
                              type: array
                              items:
                                type: string
                              description: The models that flagged the field
                          required:
                            - key
                            - flagged
                            - flagged_by
                          additionalProperties: false
                        description: The fields in the object and their flags
                    required:
                      - status
                      - request
                      - flagged
                      - author
                      - unicode_spoofing
                      - data_found
                      - labels
                      - entities
                      - fields
                    additionalProperties: false
                  - type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /moderate/image:
    post:
      operationId: moderation-image
      summary: Analyze image
      description: >-
        (Deprecated use https://api.moderationapi.com/v1/moderate) Analyze image
        with your Moderation API project
      tags:
        - Moderate
      security:
        - Authorization: []
      deprecated: true
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contentId:
                  description: The unique ID of the content in your database.
                  type: string
                  minLength: 1
                  maxLength: 100
                channelKey:
                  description: The key of the channel.
                  type: string
                doNotStore:
                  description: >-
                    Do not store the content. The content won't enter the review
                    queue
                  type: boolean
                authorId:
                  description: The author of the content.
                  type: string
                contextId:
                  description: For example the ID of a chat room or a post
                  type: string
                metadata:
                  description: Any metadata you want to store with the content
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                url:
                  type: string
                  format: uri
                  description: The URL of the image you want to analyze.
              required:
                - url
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Success if the request was successful
                  error:
                    description: Error message if the request failed
                  contentId:
                    description: >-
                      The ID of the content. Only returned if the content was
                      stored.
                    type: string
                  request:
                    type: object
                    properties:
                      timestamp:
                        type: number
                        description: The timestamp of the request
                      quota_usage:
                        type: number
                        description: The quota usage of the request
                    required:
                      - timestamp
                      - quota_usage
                    additionalProperties: false
                    description: Information about the request
                  flagged:
                    type: boolean
                    description: Whether the content was flagged by any models
                  author:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            description: Author ID in Moderation API
                          external_id:
                            description: The author's ID from your system
                            anyOf:
                              - type: string
                              - type: 'null'
                          block:
                            anyOf:
                              - type: object
                                properties:
                                  until:
                                    description: >-
                                      The timestamp until which they are blocked
                                      if the author is suspended.
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  reason:
                                    description: >-
                                      The moderators reason why the author was
                                      blocked or suspended.
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                additionalProperties: false
                              - type: 'null'
                            description: >-
                              Block or suspension details, if applicable. Null
                              if the author is enabled.
                          status:
                            type: string
                            enum:
                              - enabled
                              - suspended
                              - blocked
                            description: Current author status
                          trust_level:
                            type: object
                            properties:
                              level:
                                type: number
                                description: Author trust level (-1, 0, 1, 2, 3, or 4)
                              manual:
                                type: boolean
                                description: >-
                                  True if the trust level was set manually by a
                                  moderator
                            required:
                              - level
                              - manual
                            additionalProperties: false
                        required:
                          - id
                          - block
                          - status
                          - trust_level
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      The author of the content if your account has authors
                      enabled. Requires you to send authorId when submitting
                      content.
                  labels:
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          type: string
                          enum:
                            - nudity
                            - suggestive
                            - gore
                            - hate
                            - violence
                            - weapon
                            - smoking
                            - drugs
                            - alcohol
                            - text
                            - toxic
                          description: The label of the model
                        score:
                          type: number
                          minimum: 0
                          maximum: 1
                          description: The confidence of the model
                      required:
                        - label
                        - score
                      additionalProperties: false
                    description: The scores of each label
                  texts:
                    description: >-
                      The texts found in the image, if the image text model is
                      enabled
                    type: array
                    items:
                      type: string
                required:
                  - status
                  - request
                  - flagged
                  - author
                  - labels
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /moderate/video:
    post:
      operationId: moderation-video
      summary: Analyze video
      description: >-
        (Deprecated use https://api.moderationapi.com/v1/moderate) Analyze video
        content with your configured moderation models and filters.
      tags:
        - Moderate
      security:
        - Authorization: []
      deprecated: true
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contentId:
                  description: The unique ID of the content in your database.
                  type: string
                  minLength: 1
                  maxLength: 100
                channelKey:
                  description: The key of the channel.
                  type: string
                doNotStore:
                  description: >-
                    Do not store the content. The content won't enter the review
                    queue
                  type: boolean
                authorId:
                  description: The author of the content.
                  type: string
                contextId:
                  description: For example the ID of a chat room or a post
                  type: string
                metadata:
                  description: Any metadata you want to store with the content
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                url:
                  type: string
                  format: uri
                  description: The URL of the video you want to analyze.
              required:
                - url
              description: Input parameters for video moderation
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        description: Success if the request was successful
                      error:
                        description: Error message if the request failed
                      contentId:
                        description: >-
                          The ID of the content. Only returned if the content
                          was stored.
                        type: string
                      request:
                        type: object
                        properties:
                          timestamp:
                            type: number
                            description: The timestamp of the request
                          quota_usage:
                            type: number
                            description: The quota usage of the request
                        required:
                          - timestamp
                          - quota_usage
                        additionalProperties: false
                        description: Information about the request
                      flagged:
                        type: boolean
                        description: Whether the content was flagged by any models
                      author:
                        anyOf:
                          - type: object
                            properties:
                              id:
                                type: string
                                description: Author ID in Moderation API
                              external_id:
                                description: The author's ID from your system
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              block:
                                anyOf:
                                  - type: object
                                    properties:
                                      until:
                                        description: >-
                                          The timestamp until which they are
                                          blocked if the author is suspended.
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      reason:
                                        description: >-
                                          The moderators reason why the author was
                                          blocked or suspended.
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                    additionalProperties: false
                                  - type: 'null'
                                description: >-
                                  Block or suspension details, if applicable.
                                  Null if the author is enabled.
                              status:
                                type: string
                                enum:
                                  - enabled
                                  - suspended
                                  - blocked
                                description: Current author status
                              trust_level:
                                type: object
                                properties:
                                  level:
                                    type: number
                                    description: Author trust level (-1, 0, 1, 2, 3, or 4)
                                  manual:
                                    type: boolean
                                    description: >-
                                      True if the trust level was set manually
                                      by a moderator
                                required:
                                  - level
                                  - manual
                                additionalProperties: false
                            required:
                              - id
                              - block
                              - status
                              - trust_level
                            additionalProperties: false
                          - type: 'null'
                        description: >-
                          The author of the content if your account has authors
                          enabled. Requires you to send authorId when submitting
                          content.
                    required:
                      - status
                      - request
                      - flagged
                      - author
                    additionalProperties: false
                  - type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /moderate/audio:
    post:
      operationId: moderation-audio
      summary: Analyze audio
      description: >-
        (Deprecated use https://api.moderationapi.com/v1/moderate) Analyze audio
        content with your configured moderation models and filters.
      tags:
        - Moderate
      security:
        - Authorization: []
      deprecated: true
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contentId:
                  description: The unique ID of the content in your database.
                  type: string
                  minLength: 1
                  maxLength: 100
                channelKey:
                  description: The key of the channel.
                  type: string
                doNotStore:
                  description: >-
                    Do not store the content. The content won't enter the review
                    queue
                  type: boolean
                authorId:
                  description: The author of the content.
                  type: string
                contextId:
                  description: For example the ID of a chat room or a post
                  type: string
                metadata:
                  description: Any metadata you want to store with the content
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                url:
                  type: string
                  format: uri
                  description: The URL of the audio you want to analyze.
              required:
                - url
              description: Input parameters for audio moderation
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Success if the request was successful
                  error:
                    description: Error message if the request failed
                  contentId:
                    description: >-
                      The ID of the content. Only returned if the content was
                      stored.
                    type: string
                  request:
                    type: object
                    properties:
                      timestamp:
                        type: number
                        description: The timestamp of the request
                      quota_usage:
                        type: number
                        description: The quota usage of the request
                    required:
                      - timestamp
                      - quota_usage
                    additionalProperties: false
                    description: Information about the request
                  flagged:
                    type: boolean
                    description: Whether the content was flagged by any models
                  author:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            description: Author ID in Moderation API
                          external_id:
                            description: The author's ID from your system
                            anyOf:
                              - type: string
                              - type: 'null'
                          block:
                            anyOf:
                              - type: object
                                properties:
                                  until:
                                    description: >-
                                      The timestamp until which they are blocked
                                      if the author is suspended.
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  reason:
                                    description: >-
                                      The moderators reason why the author was
                                      blocked or suspended.
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                additionalProperties: false
                              - type: 'null'
                            description: >-
                              Block or suspension details, if applicable. Null
                              if the author is enabled.
                          status:
                            type: string
                            enum:
                              - enabled
                              - suspended
                              - blocked
                            description: Current author status
                          trust_level:
                            type: object
                            properties:
                              level:
                                type: number
                                description: Author trust level (-1, 0, 1, 2, 3, or 4)
                              manual:
                                type: boolean
                                description: >-
                                  True if the trust level was set manually by a
                                  moderator
                            required:
                              - level
                              - manual
                            additionalProperties: false
                        required:
                          - id
                          - block
                          - status
                          - trust_level
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      The author of the content if your account has authors
                      enabled. Requires you to send authorId when submitting
                      content.
                required:
                  - status
                  - request
                  - flagged
                  - author
                additionalProperties: false
                description: Audio moderation analysis results
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /account:
    get:
      operationId: account-get
      summary: Get account details
      description: Get account details
      tags:
        - Account
      security:
        - Authorization: []
      parameters: []
      responses:
        '200':
          description: Account details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the account
                  paid_plan_name:
                    type: string
                    description: Name of the paid plan
                  text_api_quota:
                    type: number
                    description: Text API quota
                  remaining_quota:
                    type: number
                    description: Remaining quota
                  current_project:
                    type: object
                    properties:
                      id:
                        type: string
                        description: ID of the current project
                      name:
                        type: string
                        description: Name of the current project
                    required:
                      - id
                      - name
                    additionalProperties: false
                required:
                  - id
                  - paid_plan_name
                  - text_api_quota
                  - remaining_quota
                additionalProperties: false
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const accounts = await client.account.list();

            console.log(accounts.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            accounts = client.account.list()
            print(accounts.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            accounts = moderation_api.account.list


            puts(accounts)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $accounts = $client->account->list();

              var_dump($accounts);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Account;

            ModerationApiClient client = new();

            AccountListParams parameters = new();

            var accounts = await client.Account.List(parameters);

            Console.WriteLine(accounts);
  /auth:
    get:
      operationId: account-legacyAuthGet
      security:
        - Authorization: []
      deprecated: true
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the authentication
                  message:
                    type: string
                    description: Message of the authentication
                required:
                  - status
                  - message
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const auth = await client.auth.retrieve();

            console.log(auth.message);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            auth = client.auth.retrieve()
            print(auth.message)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            auth = moderation_api.auth.retrieve


            puts(auth)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $auth = $client->auth->retrieve();

              var_dump($auth);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Auth;

            ModerationApiClient client = new();

            AuthRetrieveParams parameters = new();

            var auth = await client.Auth.Retrieve(parameters);

            Console.WriteLine(auth);
    post:
      operationId: account-legacyAuthPost
      security:
        - Authorization: []
      deprecated: true
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the authentication
                  message:
                    type: string
                    description: Message of the authentication
                  project:
                    type: string
                    description: Name of the authenticated project
                required:
                  - status
                  - message
                  - project
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const auth = await client.auth.create();

            console.log(auth.message);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            auth = client.auth.create()
            print(auth.message)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            auth = moderation_api.auth.create


            puts(auth)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $auth = $client->auth->create();

              var_dump($auth);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Auth;

            ModerationApiClient client = new();

            AuthCreateParams parameters = new();

            var auth = await client.Auth.Create(parameters);

            Console.WriteLine(auth);
  /wordlist:
    get:
      operationId: wordlist-list
      summary: List wordlists
      description: List all wordlists for the authenticated organization
      tags:
        - wordlist
      security:
        - Authorization: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Unique identifier of the wordlist
                    name:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: Name of the wordlist
                    description:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: Description of the wordlist
                    createdAt:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: When the wordlist was created
                    userId:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: User who created the wordlist
                  required:
                    - id
                    - name
                    - description
                    - createdAt
                    - userId
                  additionalProperties: false
                description: Array of wordlists
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const wordlists = await client.wordlist.list();

            console.log(wordlists);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            wordlists = client.wordlist.list()
            print(wordlists)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            wordlists = moderation_api.wordlist.list


            puts(wordlists)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $wordlists = $client->wordlist->list();

              var_dump($wordlists);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Wordlist;

            ModerationApiClient client = new();

            WordlistListParams parameters = new();

            var wordlists = await client.Wordlist.List(parameters);

            Console.WriteLine(wordlists);
  /wordlist/{id}:
    get:
      operationId: wordlist-getWordlistPublic
      summary: Get wordlist
      description: Get a specific wordlist by ID
      tags:
        - wordlist
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: ID of the wordlist to get
          required: true
          description: ID of the wordlist to get
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the wordlist
                  name:
                    anyOf:
                      - type: string
                        description: Name of the wordlist
                      - type: 'null'
                  words:
                    type: array
                    items:
                      type: string
                    description: Words in the wordlist
                  createdAt:
                    description: Creation date of the wordlist
                    type: string
                  organizationId:
                    type: string
                    description: ID of the organization
                  userId:
                    anyOf:
                      - type: string
                        description: ID of the user
                      - type: 'null'
                  strict:
                    type: boolean
                    description: Strict mode
                required:
                  - id
                  - name
                  - words
                  - createdAt
                  - organizationId
                  - userId
                  - strict
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const wordlist = await client.wordlist.retrieve('id');

            console.log(wordlist.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            wordlist = client.wordlist.retrieve(
                "id",
            )
            print(wordlist.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            wordlist = moderation_api.wordlist.retrieve("id")


            puts(wordlist)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $wordlist = $client->wordlist->retrieve('id');

              var_dump($wordlist);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Wordlist;

            ModerationApiClient client = new();

            WordlistRetrieveParams parameters = new() { ID = "id" };

            var wordlist = await client.Wordlist.Retrieve(parameters);

            Console.WriteLine(wordlist);
    put:
      operationId: wordlist-update
      summary: Update wordlist
      description: Update a wordlist
      tags:
        - wordlist
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: ID of the wordlist to update
          required: true
          description: ID of the wordlist to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: New name for the wordlist
                  type: string
                key:
                  description: New key for the wordlist
                  type: string
                description:
                  description: New description for the wordlist
                  type: string
                words:
                  description: >-
                    New words for the wordlist. Replace the existing words with
                    these new ones. Duplicate words will be ignored.
                  type: array
                  items:
                    type: string
                strict:
                  description: Deprecated. Now using threshold in project settings.
                  type: boolean
      responses:
        '200':
          description: Wordlist updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the wordlist
                  name:
                    anyOf:
                      - type: string
                        description: Name of the wordlist
                      - type: 'null'
                  words:
                    type: array
                    items:
                      type: string
                    description: Words in the wordlist
                  createdAt:
                    description: Creation date of the wordlist
                    type: string
                  organizationId:
                    type: string
                    description: ID of the organization
                  userId:
                    anyOf:
                      - type: string
                        description: ID of the user
                      - type: 'null'
                  strict:
                    type: boolean
                    description: Strict mode
                required:
                  - id
                  - name
                  - words
                  - createdAt
                  - organizationId
                  - userId
                  - strict
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const wordlist = await client.wordlist.update('id');

            console.log(wordlist.id);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            wordlist = client.wordlist.update(
                id="id",
            )
            print(wordlist.id)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            wordlist = moderation_api.wordlist.update("id")


            puts(wordlist)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $wordlist = $client->wordlist->update(
                'id',
                description: 'description',
                key: 'key',
                name: 'name',
                strict: true,
                words: ['string'],
              );

              var_dump($wordlist);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Wordlist;

            ModerationApiClient client = new();

            WordlistUpdateParams parameters = new() { ID = "id" };

            var wordlist = await client.Wordlist.Update(parameters);

            Console.WriteLine(wordlist);
  /wordlist/{id}/embedding-status:
    get:
      operationId: wordlist-wordlistEmbeddingStatus
      summary: Get embedding status
      description: Get the current embedding progress status for a wordlist
      tags:
        - wordlist
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: ID of the wordlist to check embedding status for
          required: true
          description: ID of the wordlist to check embedding status for
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  progress:
                    type: number
                    description: Percentage of words that have been embedded (0-100)
                  totalWords:
                    type: number
                    description: Total number of words in the wordlist
                  remainingWords:
                    type: number
                    description: Number of words still waiting to be embedded
                required:
                  - progress
                  - totalWords
                  - remainingWords
                additionalProperties: false
                description: Embedding status details
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import ModerationAPI from '@moderation-api/sdk';

            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });

            const response = await client.wordlist.getEmbeddingStatus('id');

            console.log(response.progress);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.wordlist.get_embedding_status(
                "id",
            )
            print(response.progress)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.wordlist.get_embedding_status("id")


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->wordlist->getEmbeddingStatus('id');

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Wordlist;

            ModerationApiClient client = new();

            WordlistGetEmbeddingStatusParams parameters = new() { ID = "id" };

            var response = await client.Wordlist.GetEmbeddingStatus(parameters);

            Console.WriteLine(response);
  /wordlist/{id}/words:
    post:
      operationId: wordlist-addWords
      summary: Add words to wordlist
      description: Add words to an existing wordlist
      tags:
        - wordlist
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: ID of the wordlist to add words to
          required: true
          description: ID of the wordlist to add words to
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                words:
                  type: array
                  items:
                    type: string
                  description: >-
                    Array of words to add to the wordlist. Duplicate words will
                    be ignored.
              required:
                - words
      responses:
        '200':
          description: Words successfully added to wordlist
          content:
            application/json:
              schema:
                type: object
                properties:
                  addedCount:
                    type: number
                    description: Number of words added
                  totalCount:
                    type: number
                    description: Total number of words in wordlist
                  addedWords:
                    type: array
                    items:
                      type: string
                    description: List of words that were added
                required:
                  - addedCount
                  - totalCount
                  - addedWords
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const response = await client.wordlist.words.add('id', { words:
            ['string'] });


            console.log(response.addedCount);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.wordlist.words.add(
                id="id",
                words=["string"],
            )
            print(response.added_count)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.wordlist.words.add("id", words:
            ["string"])


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->wordlist->words->add('id', words: ['string']);

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Wordlist.Words;

            ModerationApiClient client = new();

            WordAddParams parameters = new()
            {
                ID = "id",
                Words =
                [
                    "string"
                ],
            };

            var response = await client.Wordlist.Words.Add(parameters);

            Console.WriteLine(response);
    delete:
      operationId: wordlist-removeWords
      summary: Remove words from wordlist
      description: Remove words from an existing wordlist
      tags:
        - wordlist
      security:
        - Authorization: []
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: ID of the wordlist to remove words from
          required: true
          description: ID of the wordlist to remove words from
        - in: query
          name: words
          schema:
            type: array
            items:
              type: string
            description: Array of words to remove from the wordlist
          required: true
          description: Array of words to remove from the wordlist
      responses:
        '200':
          description: Words successfully removed from wordlist
          content:
            application/json:
              schema:
                type: object
                properties:
                  removedCount:
                    type: number
                    description: Number of words removed
                  totalCount:
                    type: number
                    description: Total number of words in wordlist
                  removedWords:
                    type: array
                    items:
                      type: string
                    description: List of words removed
                required:
                  - removedCount
                  - totalCount
                  - removedWords
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const word = await client.wordlist.words.remove('id', { words:
            ['string'] });


            console.log(word.removedCount);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            word = client.wordlist.words.remove(
                id="id",
                words=["string"],
            )
            print(word.removed_count)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            word = moderation_api.wordlist.words.remove("id", words: ["string"])


            puts(word)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $word = $client->wordlist->words->remove('id', words: ['string']);

              var_dump($word);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using ModerationApi;
            using ModerationApi.Models.Wordlist.Words;

            ModerationApiClient client = new();

            WordRemoveParams parameters = new()
            {
                ID = "id",
                Words =
                [
                    "string"
                ],
            };

            var word = await client.Wordlist.Words.Remove(parameters);

            Console.WriteLine(word);
  /moderate:
    post:
      operationId: newModerate-moderate
      security:
        - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: text
                        text:
                          type: string
                          maxLength: 100000
                          description: The content text
                      required:
                        - type
                        - text
                      description: Text
                      title: Text
                    - type: object
                      properties:
                        type:
                          type: string
                          const: image
                        url:
                          description: >-
                            A public URL of the image content. Either url or
                            data must be provided.
                          type: string
                          format: uri
                        data:
                          description: >-
                            Base64-encoded image data. Either url or data must
                            be provided. Note: base64 images are not stored and
                            will not appear in the review queue.
                          type: string
                          maxLength: 5500000
                      required:
                        - type
                      description: Image
                      title: Image
                    - type: object
                      properties:
                        type:
                          type: string
                          const: video
                        url:
                          type: string
                          format: uri
                          description: A public URL of the video content
                      required:
                        - type
                        - url
                      description: Video
                      title: Video
                    - type: object
                      properties:
                        type:
                          type: string
                          const: audio
                        url:
                          type: string
                          format: uri
                          description: The URL of the audio content
                      required:
                        - type
                        - url
                      description: Audio
                      title: Audio
                    - type: object
                      properties:
                        type:
                          type: string
                          const: object
                        data:
                          type: object
                          propertyNames:
                            type: string
                            description: The key of the content node
                          additionalProperties:
                            oneOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: text
                                  text:
                                    type: string
                                    maxLength: 100000
                                    description: The content text
                                required:
                                  - type
                                  - text
                                description: Text
                                title: Text
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: image
                                  url:
                                    description: >-
                                      A public URL of the image content. Either
                                      url or data must be provided.
                                    type: string
                                    format: uri
                                  data:
                                    description: >-
                                      Base64-encoded image data. Either url or
                                      data must be provided. Note: base64 images
                                      are not stored and will not appear in the
                                      review queue.
                                    type: string
                                    maxLength: 5500000
                                required:
                                  - type
                                description: Image
                                title: Image
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: video
                                  url:
                                    type: string
                                    format: uri
                                    description: A public URL of the video content
                                required:
                                  - type
                                  - url
                                description: Video
                                title: Video
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    const: audio
                                  url:
                                    type: string
                                    format: uri
                                    description: The URL of the audio content
                                required:
                                  - type
                                  - url
                                description: Audio
                                title: Audio
                            title: Content leaf
                            type: object
                          description: Values in the object. Can be mixed content types.
                      required:
                        - type
                        - data
                      description: Object
                      title: Object
                  description: The content sent for moderation
                  type: object
                timestamp:
                  description: >-
                    Unix timestamp (in milliseconds) of when the content was
                    created. Use if content is not submitted in real-time.
                  type: number
                channel:
                  description: >-
                    Provide a channel ID or key. Will use the project's default
                    channel if not provided.
                  type: string
                contentId:
                  description: The unique ID of the content in your database.
                  type: string
                  maxLength: 100
                metaType:
                  description: The meta type of content being moderated
                  type: string
                  enum:
                    - profile
                    - message
                    - post
                    - comment
                    - event
                    - product
                    - review
                    - voice
                    - other
                authorId:
                  description: The author of the content.
                  type: string
                conversationId:
                  description: For example the ID of a chat room or a post
                  type: string
                metadata:
                  description: Any metadata you want to store with the content
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                clientAction:
                  description: >-
                    A recommendation from your own client-side flagging (e.g. a
                    banned-IP list or a third-party tool). Feeds the rules
                    engine and can escalate or override the recommended action.
                    Does not change whether our analysis flagged the content.
                  type: object
                  properties:
                    action:
                      type: string
                      enum:
                        - review
                        - allow
                        - reject
                      description: >-
                        Your recommendation for the content: allow, review, or
                        reject.
                    behavior:
                      description: >-
                        How your recommendation combines with ours. Defaults to
                        'escalate', which only applies it when stricter than
                        ours; 'override' replaces ours outright.
                      type: string
                      enum:
                        - override
                        - escalate
                    source:
                      description: Where your recommendation came from, e.g. "banned-ip".
                      type: string
                      maxLength: 100
                    reason:
                      description: A human-readable explanation for your recommendation.
                      type: string
                      maxLength: 500
                  required:
                    - action
                doNotStore:
                  description: >-
                    Do not store the content. The content won't enter the review
                    queue
                  type: boolean
                policies:
                  description: >-
                    (Enterprise) override the channel policies for this
                    moderation request only.
                  type: array
                  items:
                    oneOf:
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: toxicity
                        required:
                          - flag
                          - id
                        title: Toxicity
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: personal_information
                        required:
                          - flag
                          - id
                        title: Personal Information
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: toxicity_severe
                        required:
                          - flag
                          - id
                        title: Toxicity Severe
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: hate
                        required:
                          - flag
                          - id
                        title: Hate
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: illicit
                        required:
                          - flag
                          - id
                        title: Illicit
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: illicit_drugs
                        required:
                          - flag
                          - id
                        title: Illicit Drugs
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: illicit_alcohol
                        required:
                          - flag
                          - id
                        title: Illicit Alcohol
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: illicit_firearms
                        required:
                          - flag
                          - id
                        title: Illicit Firearms
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: illicit_tobacco
                        required:
                          - flag
                          - id
                        title: Illicit Tobacco
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: illicit_gambling
                        required:
                          - flag
                          - id
                        title: Illicit Gambling
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: cannabis
                        required:
                          - flag
                          - id
                        title: Cannabis
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: adult
                        required:
                          - flag
                          - id
                        title: Adult
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: crypto
                        required:
                          - flag
                          - id
                        title: Crypto
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: sexual
                        required:
                          - flag
                          - id
                        title: Sexual
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: flirtation
                        required:
                          - flag
                          - id
                        title: Flirtation
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: profanity
                        required:
                          - flag
                          - id
                        title: Profanity
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: violence
                        required:
                          - flag
                          - id
                        title: Violence
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: self_harm
                        required:
                          - flag
                          - id
                        title: Self Harm
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: spam
                        required:
                          - flag
                          - id
                        title: Spam
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: low_quality
                          minWords:
                            description: >-
                              Flag content with fewer than this many words as
                              low-effort. Defaults to 3. Set to disable by
                              omitting.
                            type: integer
                            minimum: 1
                            maximum: 9007199254740991
                        required:
                          - flag
                          - id
                        title: Low-quality content
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: face_detection
                          comparator:
                            description: >-
                              Flag images that contain "at least" or "fewer
                              than" the configured number of faces. Defaults to
                              at_least.
                            type: string
                            enum:
                              - at_least
                              - fewer_than
                          count:
                            description: >-
                              Number of faces the comparator applies to.
                              Defaults to 1, so the default rule flags any image
                              containing a face.
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - flag
                          - id
                        title: Face detection
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: self_promotion
                        required:
                          - flag
                          - id
                        title: Self Promotion
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: political
                        required:
                          - flag
                          - id
                        title: Political
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: religion
                        required:
                          - flag
                          - id
                        title: Religion
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: code_abuse
                        required:
                          - flag
                          - id
                        title: Code Abuse
                      - type: object
                        properties:
                          id:
                            type: string
                            const: pii
                          entities:
                            type: object
                            propertyNames:
                              type: string
                              enum:
                                - email
                                - phone
                                - url
                                - address
                                - name
                                - username
                                - ip_address
                                - credit_card
                                - sensitive_other
                            additionalProperties:
                              type: object
                              properties:
                                enable:
                                  type: boolean
                                flag:
                                  type: boolean
                                shouldMask:
                                  type: boolean
                                mask:
                                  type: string
                              additionalProperties: {}
                            required:
                              - email
                              - phone
                              - url
                              - address
                              - name
                              - username
                              - ip_address
                              - credit_card
                              - sensitive_other
                        required:
                          - id
                          - entities
                        title: PII Masking
                      - type: object
                        properties:
                          id:
                            type: string
                            const: url
                          entities:
                            type: object
                            propertyNames:
                              type: string
                              enum:
                                - email
                                - phone
                                - url
                                - address
                                - name
                                - username
                                - ip_address
                                - credit_card
                                - sensitive_other
                            additionalProperties:
                              type: object
                              properties:
                                enable:
                                  type: boolean
                                flag:
                                  type: boolean
                                shouldMask:
                                  type: boolean
                                mask:
                                  type: string
                              additionalProperties: {}
                            required:
                              - email
                              - phone
                              - url
                              - address
                              - name
                              - username
                              - ip_address
                              - credit_card
                              - sensitive_other
                        required:
                          - id
                          - entities
                        title: URL Masking
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: url_risk
                          allowlistWordlistIds:
                            description: >-
                              IDs of wordlists whose entries are treated as
                              allowed URL domains. Matches short-circuit the
                              risk model and are never flagged.
                            type: array
                            items:
                              type: string
                          blocklistWordlistIds:
                            description: >-
                              IDs of wordlists whose entries are treated as
                              blocked URL domains. Matches short-circuit the
                              risk model and are always flagged. Blocklists take
                              precedence over allowlists.
                            type: array
                            items:
                              type: string
                          flagLinkShorteners:
                            description: >-
                              When true, any URL detected as a free link
                              shortener (bit.ly, t.co, tinyurl, etc.) is always
                              flagged regardless of risk score. Allowlist
                              matches still win.
                            type: boolean
                        required:
                          - flag
                          - id
                        title: URL Risk
                      - type: object
                        properties:
                          flag:
                            type: boolean
                          threshold:
                            type: number
                            minimum: 0
                            maximum: 1
                          id:
                            type: string
                            const: guideline
                          instructions:
                            type: string
                          guidelineKey:
                            type: string
                        required:
                          - flag
                          - id
                          - instructions
                          - guidelineKey
                        title: Guideline
                    type: object
              required:
                - content
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  content:
                    type: object
                    properties:
                      id:
                        type: string
                        description: >-
                          The unique identifier for the content. Either the
                          contentId provided by you or an autogenerated ID.
                      masked:
                        type: boolean
                        description: Whether any values have been masked.
                      modified:
                        anyOf:
                          - anyOf:
                              - type: string
                                title: Modified string content
                              - type: object
                                propertyNames:
                                  type: string
                                additionalProperties: {}
                                title: Modified object content
                              - type: object
                                propertyNames:
                                  type: string
                                additionalProperties:
                                  oneOf:
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          const: text
                                        text:
                                          type: string
                                          maxLength: 100000
                                          description: The content text
                                      required:
                                        - type
                                        - text
                                      additionalProperties: false
                                      description: Text
                                      title: Text
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          const: image
                                        url:
                                          description: >-
                                            A public URL of the image content.
                                            Either url or data must be provided.
                                          type: string
                                          format: uri
                                        data:
                                          description: >-
                                            Base64-encoded image data. Either url or
                                            data must be provided. Note: base64
                                            images are not stored and will not
                                            appear in the review queue.
                                          type: string
                                          maxLength: 5500000
                                      required:
                                        - type
                                      additionalProperties: false
                                      description: Image
                                      title: Image
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          const: video
                                        url:
                                          type: string
                                          format: uri
                                          description: A public URL of the video content
                                      required:
                                        - type
                                        - url
                                      additionalProperties: false
                                      description: Video
                                      title: Video
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          const: audio
                                        url:
                                          type: string
                                          format: uri
                                          description: The URL of the audio content
                                      required:
                                        - type
                                        - url
                                      additionalProperties: false
                                      description: Audio
                                      title: Audio
                                  title: Content leaf
                                  type: object
                                title: Modified nested object content
                          - type: 'null'
                        description: The modified content, if any.
                      transcript:
                        description: >-
                          The transcribed text from audio content. Only present
                          when audio moderation is used and transcript inclusion
                          is enabled on the channel.
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - id
                      - masked
                      - modified
                    additionalProperties: false
                    description: Potentially modified content.
                  author:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            description: Author ID in Moderation API
                          external_id:
                            description: The author's ID from your system
                            anyOf:
                              - type: string
                              - type: 'null'
                          block:
                            anyOf:
                              - type: object
                                properties:
                                  until:
                                    description: >-
                                      The timestamp until which they are blocked
                                      if the author is suspended.
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  reason:
                                    description: >-
                                      The moderators reason why the author was
                                      blocked or suspended.
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                additionalProperties: false
                              - type: 'null'
                            description: >-
                              Block or suspension details, if applicable. Null
                              if the author is enabled.
                          status:
                            type: string
                            enum:
                              - enabled
                              - suspended
                              - blocked
                            description: Current author status
                          trust_level:
                            type: object
                            properties:
                              level:
                                type: number
                                description: Author trust level (-1, 0, 1, 2, 3, or 4)
                              manual:
                                type: boolean
                                description: >-
                                  True if the trust level was set manually by a
                                  moderator
                            required:
                              - level
                              - manual
                            additionalProperties: false
                        required:
                          - id
                          - block
                          - status
                          - trust_level
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      The author of the content if your account has authors
                      enabled. Requires you to send authorId when submitting
                      content.
                  evaluation:
                    type: object
                    properties:
                      flagged:
                        type: boolean
                        description: Whether the content was flagged by any policy.
                      flag_probability:
                        type: number
                        description: The probability that the content should be flagged.
                      severity_score:
                        type: number
                        description: >-
                          The severity score of the content. A higher score
                          indicates more severe content.
                      unicode_spoofed:
                        description: Whether the content was flagged for Unicode spoofing.
                        type: boolean
                      shadow_flagged:
                        description: >-
                          Whether the content would have been flagged by
                          analyze-only policies (flag: false).
                        type: boolean
                    required:
                      - flagged
                      - flag_probability
                      - severity_score
                    additionalProperties: false
                    description: >-
                      The evaluation of the content after running the channel
                      policies.
                  recommendation:
                    type: object
                    properties:
                      action:
                        type: string
                        enum:
                          - review
                          - allow
                          - reject
                        description: The action to take based on the recommendation
                      reason_codes:
                        type: array
                        items:
                          type: string
                          enum:
                            - severity_reject
                            - severity_review
                            - author_block
                            - dry_run
                            - trusted_allow
                            - untrusted_severity
                            - rule_match
                            - rule_default
                            - rule_fallback
                            - client_override
                        description: >-
                          The reason code for the recommendation. Can be used to
                          display a reason to the user.
                      matched_rules:
                        description: >-
                          Rules that matched during evaluation, if rules engine
                          is active.
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            name:
                              type: string
                          required:
                            - key
                            - name
                          additionalProperties: false
                    required:
                      - action
                      - reason_codes
                    additionalProperties: false
                    description: >-
                      The recommendation for the content based on the
                      evaluation.
                  policies:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              description: The unique identifier for the classifier output.
                            type:
                              type: string
                              const: classifier
                            probability:
                              type: number
                              minimum: 0
                              maximum: 1
                            flagged:
                              type: boolean
                            flagged_fields:
                              description: >-
                                The keys of the flagged fields if submitting an
                                object.
                              type: array
                              items:
                                type: string
                            labels:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  probability:
                                    type: number
                                    minimum: 0
                                    maximum: 1
                                  flagged:
                                    type: boolean
                                required:
                                  - id
                                  - probability
                                  - flagged
                                additionalProperties: false
                            data:
                              description: >-
                                Optional structured data produced by the policy.
                                For face detection: { count, faces: [{
                                confidence, gender, age }] }.
                              type: object
                              propertyNames:
                                type: string
                              additionalProperties: {}
                          required:
                            - id
                            - type
                            - probability
                            - flagged
                          additionalProperties: false
                          description: Classifier policy.
                          title: Classifier output
                        - type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              const: entity_matcher
                            probability:
                              type: number
                              minimum: 0
                              maximum: 1
                            flagged:
                              type: boolean
                            flagged_fields:
                              type: array
                              items:
                                type: string
                            matches:
                              type: array
                              items:
                                type: object
                                properties:
                                  probability:
                                    type: number
                                    minimum: 0
                                    maximum: 1
                                  match:
                                    type: string
                                  span:
                                    minItems: 2
                                    maxItems: 2
                                    type: array
                                    items:
                                      type: integer
                                      minimum: -9007199254740991
                                      maximum: 9007199254740991
                                  reasons:
                                    description: >-
                                      Stable codes explaining why a URL was
                                      flagged (URL Risk only).
                                    type: array
                                    items:
                                      type: string
                                  signals:
                                    description: >-
                                      Observable properties of a URL (URL Risk
                                      only). Absent for allow/block list
                                      matches.
                                    type: object
                                    properties:
                                      brand_impersonation:
                                        anyOf:
                                          - type: object
                                            properties:
                                              brand:
                                                type: string
                                              method:
                                                type: string
                                                enum:
                                                  - registered_domain_token
                                                  - subdomain_token
                                            required:
                                              - brand
                                              - method
                                            additionalProperties: false
                                          - type: 'null'
                                      has_suspicious_characters:
                                        type: boolean
                                      is_link_shortener:
                                        type: boolean
                                      domain_age_days:
                                        anyOf:
                                          - type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          - type: 'null'
                                      has_email_setup:
                                        anyOf:
                                          - type: boolean
                                          - type: 'null'
                                      redirect_count:
                                        anyOf:
                                          - type: integer
                                            minimum: -9007199254740991
                                            maximum: 9007199254740991
                                          - type: 'null'
                                      final_url:
                                        anyOf:
                                          - type: string
                                          - type: 'null'
                                      bot_protection:
                                        anyOf:
                                          - type: boolean
                                          - type: 'null'
                                      is_reported:
                                        type: boolean
                                    required:
                                      - brand_impersonation
                                      - has_suspicious_characters
                                      - is_link_shortener
                                      - domain_age_days
                                      - has_email_setup
                                      - redirect_count
                                      - final_url
                                      - bot_protection
                                      - is_reported
                                    additionalProperties: false
                                  entity_type:
                                    description: >-
                                      Sub-type of the entity match — e.g. the
                                      NER key (email, phone, name, …) for PII
                                      matches. Absent for URL Risk and wordlist
                                      matches where the type is already encoded
                                      in the parent label.
                                    type: string
                                required:
                                  - probability
                                  - match
                                  - span
                                additionalProperties: false
                          required:
                            - id
                            - type
                            - probability
                            - flagged
                            - matches
                          additionalProperties: false
                          description: Entity matcher policy.
                          title: Entity matcher output
                      description: Policy output schema.
                      type: object
                    description: >-
                      Results of all policies in the channel. Sorted by highest
                      probability.
                  insights:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            id:
                              type: string
                              const: sentiment
                            type:
                              type: string
                              const: insight
                            probability:
                              type: number
                              minimum: 0
                              maximum: 1
                            value:
                              anyOf:
                                - type: string
                                  enum:
                                    - positive
                                    - neutral
                                    - negative
                                - type: 'null'
                          required:
                            - id
                            - type
                            - probability
                            - value
                          additionalProperties: false
                          description: Sentiment insight
                          title: Sentiment insight
                        - type: object
                          properties:
                            id:
                              type: string
                              const: language
                            type:
                              type: string
                              const: insight
                            probability:
                              type: number
                              minimum: 0
                              maximum: 1
                            value:
                              anyOf:
                                - type: string
                                - type: 'null'
                          required:
                            - id
                            - type
                            - probability
                            - value
                          additionalProperties: false
                          description: Language insight
                          title: Language insight
                      type: object
                    description: Results of all insights enabled in the channel.
                  meta:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                          - partial_success
                      timestamp:
                        type: number
                      channel_key:
                        type: string
                        description: >-
                          The unique key of the channel where the content was
                          handled. Either the channel provided by you or
                          automatically routed.
                      usage:
                        type: number
                      processing_time:
                        type: string
                    required:
                      - status
                      - timestamp
                      - channel_key
                      - usage
                    additionalProperties: false
                    description: Metadata about the moderation request
                  errors:
                    description: Policies that had errors
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        message:
                          type: string
                      required:
                        - id
                        - message
                      additionalProperties: false
                required:
                  - content
                  - author
                  - evaluation
                  - recommendation
                  - policies
                  - insights
                  - meta
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ModerationAPI from '@moderation-api/sdk';


            const client = new ModerationAPI({
              secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
            });


            const response = await client.content.submit({ content: { text:
            'text', type: 'text' } });


            console.log(response.author);
        - lang: Python
          source: |-
            import os
            from moderation_api import ModerationAPI

            client = ModerationAPI(
                secret_key=os.environ.get("MODAPI_SECRET_KEY"),  # This is the default and can be omitted
            )
            response = client.content.submit(
                content={
                    "text": "text",
                    "type": "text",
                },
            )
            print(response.author)
        - lang: Ruby
          source: >-
            require "moderation_api"


            moderation_api = ModerationAPI::Client.new(secret_key: "My Secret
            Key")


            response = moderation_api.content.submit(content: {text: "text",
            type: :text})


            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ModerationAPI\Client;

            use ModerationAPI\Core\Exceptions\APIException;


            $client = new Client(secretKey: getenv('MODAPI_SECRET_KEY') ?: 'My
            Secret Key');


            try {
              $response = $client->content->submit(
                content: ['text' => 'text', 'type' => 'text'],
                authorID: 'authorId',
                channel: 'channel',
                clientAction: [
                  'action' => 'review',
                  'behavior' => 'override',
                  'reason' => 'reason',
                  'source' => 'source',
                ],
                contentID: 'contentId',
                conversationID: 'conversationId',
                doNotStore: true,
                metadata: ['foo' => 'bar'],
                metaType: 'profile',
                policies: [['id' => 'toxicity', 'flag' => true, 'threshold' => 0]],
                timestamp: 0,
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: >-
            using System;

            using ModerationApi;

            using ModerationApi.Models.Content;


            ModerationApiClient client = new();


            ContentSubmitParams parameters = new() { Content = new Text("text")
            };


            var response = await client.Content.Submit(parameters);


            Console.WriteLine(response);
  /stream:
    get:
      tags:
        - Voice
      summary: Real-time voice moderation stream (WebSocket)
      description: >-
        Open a WebSocket to moderate live voice/call audio in real time. Speech
        is transcribed and each finalized utterance is moderated by your enabled
        text policies; you receive a verdict per utterance as it's spoken.


        **This is a WebSocket upgrade, not a regular HTTP call.** The request
        body below documents the frames you *send* over the socket; the `101`
        response documents the events you *receive*.


        - **Auth:** `Authorization: Bearer <api_key>` on the upgrade. A
        missing/invalid key closes `4401`; voice not enabled on the plan/channel
        closes `4403`.

        - **Subprotocol:** request `moderationapi.v1`.

        - **Flow:** send one `start` frame, then `media` frames as audio
        arrives, then `stop` (or disconnect). You receive `session.started`,
        `utterance.final` per utterance, optional `utterance.partial`/`warning`,
        and `session.ended`.

        - **Close codes:** `1000` normal · `1011` server error · `4400` bad
        request · `4401` auth failed · `4403` voice not enabled · `4429`
        concurrency limit.


        See the [Real-time voice
        guide](https://docs.moderationapi.com/content-moderation/real-time-voice)
        for the full walkthrough and code examples.
      servers:
        - url: wss://voice.moderationapi.com/v1
          description: Voice streaming gateway
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Bearer <api_key>
          schema:
            type: string
        - name: Sec-WebSocket-Protocol
          in: header
          required: true
          description: Requested subprotocol.
          schema:
            type: string
            enum:
              - moderationapi.v1
      requestBody:
        description: Frames sent by the client over the socket (not an HTTP body).
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/VoiceStartFrame'
                - $ref: '#/components/schemas/VoiceMediaFrame'
                - $ref: '#/components/schemas/VoiceStopFrame'
              discriminator:
                propertyName: event
      responses:
        '101':
          description: >-
            Switching Protocols. The server then streams event frames over the
            socket; the key one is `utterance.final`.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/VoiceSessionStarted'
                  - $ref: '#/components/schemas/VoiceUtteranceFinal'
                  - $ref: '#/components/schemas/VoiceSessionEnded'
                discriminator:
                  propertyName: event
      x-webSocket: true
components:
  schemas:
    PublicAuthor:
      type: object
      properties:
        id:
          type: string
          description: Author ID in Moderation API
        external_id:
          description: The author's ID from your system
          anyOf:
            - type: string
            - type: 'null'
        profile_picture:
          description: URL of the author's profile picture
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        external_link:
          description: URL of the author's external profile
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        name:
          description: Author name or identifier
          anyOf:
            - type: string
            - type: 'null'
        email:
          description: Author email address
          anyOf:
            - type: string
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - type: 'null'
        company:
          description: The author's company or organization
          anyOf:
            - type: string
            - type: 'null'
        first_seen:
          type: number
          description: Timestamp when author first appeared
        last_seen:
          type: number
          description: Timestamp of last activity
        last_incident:
          description: Timestamp of last incident
          anyOf:
            - type: number
            - type: 'null'
        status:
          type: string
          enum:
            - enabled
            - suspended
            - blocked
          description: Current author status
        trust_level:
          type: object
          properties:
            level:
              type: number
              description: Author trust level (-1, 0, 1, 2, 3, or 4)
            manual:
              type: boolean
              description: True if the trust level was set manually by a moderator
          required:
            - level
            - manual
          additionalProperties: false
        block:
          anyOf:
            - type: object
              properties:
                until:
                  description: >-
                    The timestamp until which they are blocked if the author is
                    suspended.
                  anyOf:
                    - type: number
                    - type: 'null'
                reason:
                  description: >-
                    The moderators reason why the author was blocked or
                    suspended.
                  anyOf:
                    - type: string
                    - type: 'null'
              additionalProperties: false
            - type: 'null'
          description: >-
            Block or suspension details, if applicable. Null if the author is
            enabled.
        risk_evaluation:
          anyOf:
            - type: object
              properties:
                risk_level:
                  description: >-
                    Calculated risk level based on more than 10 behavioral
                    signals.
                  anyOf:
                    - type: number
                      minimum: 0
                      maximum: 100
                    - type: 'null'
              additionalProperties: false
            - type: 'null'
          description: Risk assessment details, if available.
        metrics:
          type: object
          properties:
            total_content:
              type: number
              description: Total pieces of content
            flagged_content:
              type: number
              description: Number of flagged content pieces
            average_sentiment:
              description: >-
                Average sentiment score of content (-1 to 1). Requires a
                sentiment model in your project.
              anyOf:
                - type: number
                - type: 'null'
          required:
            - total_content
            - flagged_content
          additionalProperties: false
        metadata:
          type: object
          properties:
            email_verified:
              description: Whether the author's email is verified
              anyOf:
                - type: boolean
                - type: 'null'
            phone_verified:
              description: Whether the author's phone number is verified
              anyOf:
                - type: boolean
                - type: 'null'
            identity_verified:
              description: Whether the author's identity is verified
              anyOf:
                - type: boolean
                - type: 'null'
            is_paying_customer:
              description: Whether the author is a paying customer
              anyOf:
                - type: boolean
                - type: 'null'
          additionalProperties: {}
          description: >-
            Additional metadata provided by your system. We recommend including
            any relevant information that may assist in the moderation process.
      required:
        - id
        - first_seen
        - last_seen
        - status
        - trust_level
        - block
        - risk_evaluation
        - metrics
        - metadata
      additionalProperties: false
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
    error.CONFLICT:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Action with this key already exists
        code:
          type: string
          description: The error code
          example: CONFLICT
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
            additionalProperties: false
      required:
        - message
        - code
      additionalProperties: false
      title: Action with this key already exists error (409)
      description: The error information
      example:
        code: CONFLICT
        message: Action with this key already exists
        issues: []
    AuthorBlockedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: author.blocked
          description: The event type.
          example: author.blocked
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicActionPerformedAuthor'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: author.blocked
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: act_block_123
            key: block
            name: Block author
            value: null
            created_at: '2026-05-08T12:38:00.000Z'
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: blocked
              trust_level:
                level: -1
                manual: false
              block:
                until: null
                reason: Repeated spam violations
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
    PublicActionPerformedAuthor:
      type: object
      properties:
        id:
          type: string
          description: Moderation action ID
        key:
          anyOf:
            - type: string
            - type: 'null'
          description: Customer-defined key identifying this action
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Display name of the action
        value:
          anyOf:
            - type: string
            - type: 'null'
          description: The value passed to the action when it ran
        created_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the action was performed
        queue:
          description: The queue the item belongs to, if any
          type: object
          properties:
            id:
              type: string
          required:
            - id
          additionalProperties: false
        author:
          description: The author the action was performed on
          $ref: '#/components/schemas/PublicAuthor'
      required:
        - id
        - key
        - name
        - value
        - created_at
        - author
      additionalProperties: false
    AuthorUnblockedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: author.unblocked
          description: The event type.
          example: author.unblocked
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicActionPerformedAuthor'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: author.unblocked
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: act_unblock_789
            key: auto_unblock
            name: Auto unblock
            value: null
            created_at: '2026-05-09T12:39:00.000Z'
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: enabled
              trust_level:
                level: 0
                manual: false
              block: null
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
    AuthorSuspendedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: author.suspended
          description: The event type.
          example: author.suspended
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicActionPerformedAuthor'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: author.suspended
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: act_suspend_456
            key: suspend_24h
            name: Suspend (24h)
            value: 24h
            created_at: '2026-05-08T12:39:00.000Z'
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: suspended
              trust_level:
                level: 0
                manual: false
              block:
                until: 1746878400000
                reason: Cooling-off period
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
    AuthorUpdatedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: author.updated
          description: The event type.
          example: author.updated
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicAuthor'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: author.updated
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: auth_555
            external_id: user-555
            profile_picture: null
            external_link: null
            name: Jane Doe
            email: jane@example.com
            company: null
            first_seen: 1746792000000
            last_seen: 1746792000000
            last_incident: null
            status: enabled
            trust_level:
              level: 1
              manual: false
            block: null
            risk_evaluation: null
            metrics:
              total_content: 42
              flagged_content: 7
              average_sentiment: -0.1
            metadata: {}
    AuthorTrustLevelChangedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: author.trust_level_changed
          description: The event type.
          example: author.trust_level_changed
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicAuthor'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: author.trust_level_changed
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: auth_555
            external_id: user-555
            profile_picture: null
            external_link: null
            name: Jane Doe
            email: jane@example.com
            company: null
            first_seen: 1746792000000
            last_seen: 1746792000000
            last_incident: null
            status: enabled
            trust_level:
              level: 3
              manual: true
            block: null
            risk_evaluation: null
            metrics:
              total_content: 42
              flagged_content: 7
              average_sentiment: -0.1
            metadata: {}
    AuthorActionEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: author.action
          description: The event type.
          example: author.action
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicActionPerformedAuthor'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: author.action
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: act_warn_111
            key: send_warning
            name: Send warning email
            value: violation_notice
            created_at: '2026-05-08T12:42:00.000Z'
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: enabled
              trust_level:
                level: 1
                manual: false
              block: null
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
    QueueItemCompletedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: queue_item.resolved
          description: The event type.
          example: queue_item.resolved
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicQueueItemEvent'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: queue_item.resolved
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            item:
              id: item_xyz789
              flagged: true
              labels:
                - label: spam/SPAM
                  score: 0.94
                  flagged: true
                  manual: false
              flagged_fields: []
              language: en
              content:
                type: text
                text: Buy crypto now!
              timestamp: '2026-05-08T12:34:56.789Z'
              metadata: null
              client_action: null
              conversation_id: null
              author_id: user-555
              channel_key: null
              meta_type: comment
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: blocked
              trust_level:
                level: -1
                manual: false
              block:
                until: null
                reason: Repeated spam violations
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
            queue:
              id: que_abc123
    PublicQueueItemEvent:
      type: object
      properties:
        item:
          $ref: '#/components/schemas/PublicQueueItem'
        author:
          $ref: '#/components/schemas/PublicAuthor'
        queue:
          type: object
          properties:
            id:
              type: string
          required:
            - id
          additionalProperties: false
      required:
        - item
      additionalProperties: false
    PublicQueueItem:
      type: object
      properties:
        id:
          type: string
          description: Content ID from your system
        flagged:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether the content was flagged by moderation
        labels:
          anyOf:
            - type: array
              items:
                type: object
                properties:
                  label:
                    type: string
                    description: The label name
                  score:
                    type: number
                    description: Confidence score between 0 and 1
                  manual:
                    description: True if the label was applied manually by a moderator
                    type: boolean
                  flagged:
                    description: Whether this label crossed its flagging threshold
                    type: boolean
                  matches:
                    type: array
                    items:
                      type: object
                      properties:
                        match:
                          type: string
                          description: The matched substring
                        probability:
                          type: number
                          description: Match confidence between 0 and 1
                        span:
                          type: array
                          prefixItems:
                            - type: number
                            - type: number
                          description: '[start, end] character offsets in the source text'
                        mask:
                          anyOf:
                            - type: string
                            - type: 'null'
                        reasons:
                          type: array
                          items:
                            type: string
                        signals:
                          type: object
                          properties:
                            brand_impersonation:
                              anyOf:
                                - type: object
                                  properties:
                                    brand:
                                      type: string
                                    method:
                                      type: string
                                  required:
                                    - brand
                                    - method
                                  additionalProperties: false
                                - type: 'null'
                            has_suspicious_characters:
                              type: boolean
                            is_link_shortener:
                              type: boolean
                            domain_age_days:
                              anyOf:
                                - type: number
                                - type: 'null'
                            has_email_setup:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                            redirect_count:
                              anyOf:
                                - type: number
                                - type: 'null'
                            final_url:
                              anyOf:
                                - type: string
                                - type: 'null'
                            bot_protection:
                              anyOf:
                                - type: boolean
                                - type: 'null'
                            is_reported:
                              type: boolean
                          required:
                            - brand_impersonation
                            - has_suspicious_characters
                            - is_link_shortener
                            - domain_age_days
                            - has_email_setup
                            - redirect_count
                            - final_url
                            - bot_protection
                            - is_reported
                          additionalProperties: false
                        entity_type:
                          type: string
                      required:
                        - match
                        - probability
                        - span
                      additionalProperties: false
                required:
                  - label
                  - score
                additionalProperties: false
            - type: 'null'
          description: Moderation labels applied to the content
        flagged_fields:
          type: array
          items:
            type: string
          description: >-
            For object content, the field keys (e.g. "bio") that triggered a
            flag. Empty when no fields were flagged or the content is not an
            object.
        language:
          anyOf:
            - type: string
            - type: 'null'
          description: Detected ISO language code, if available
        content:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  const: text
                text:
                  type: string
                  maxLength: 100000
                  description: The content text
              required:
                - type
                - text
              additionalProperties: false
              description: Text
              title: Text
            - type: object
              properties:
                type:
                  type: string
                  const: image
                url:
                  description: >-
                    A public URL of the image content. Either url or data must
                    be provided.
                  type: string
                  format: uri
                data:
                  description: >-
                    Base64-encoded image data. Either url or data must be
                    provided. Note: base64 images are not stored and will not
                    appear in the review queue.
                  type: string
                  maxLength: 5500000
              required:
                - type
              additionalProperties: false
              description: Image
              title: Image
            - type: object
              properties:
                type:
                  type: string
                  const: video
                url:
                  type: string
                  format: uri
                  description: A public URL of the video content
              required:
                - type
                - url
              additionalProperties: false
              description: Video
              title: Video
            - type: object
              properties:
                type:
                  type: string
                  const: audio
                url:
                  type: string
                  format: uri
                  description: The URL of the audio content
              required:
                - type
                - url
              additionalProperties: false
              description: Audio
              title: Audio
            - type: object
              properties:
                type:
                  type: string
                  const: object
                data:
                  type: object
                  propertyNames:
                    type: string
                    description: The key of the content node
                  additionalProperties:
                    oneOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            const: text
                          text:
                            type: string
                            maxLength: 100000
                            description: The content text
                        required:
                          - type
                          - text
                        additionalProperties: false
                        description: Text
                        title: Text
                      - type: object
                        properties:
                          type:
                            type: string
                            const: image
                          url:
                            description: >-
                              A public URL of the image content. Either url or
                              data must be provided.
                            type: string
                            format: uri
                          data:
                            description: >-
                              Base64-encoded image data. Either url or data must
                              be provided. Note: base64 images are not stored
                              and will not appear in the review queue.
                            type: string
                            maxLength: 5500000
                        required:
                          - type
                        additionalProperties: false
                        description: Image
                        title: Image
                      - type: object
                        properties:
                          type:
                            type: string
                            const: video
                          url:
                            type: string
                            format: uri
                            description: A public URL of the video content
                        required:
                          - type
                          - url
                        additionalProperties: false
                        description: Video
                        title: Video
                      - type: object
                        properties:
                          type:
                            type: string
                            const: audio
                          url:
                            type: string
                            format: uri
                            description: The URL of the audio content
                        required:
                          - type
                          - url
                        additionalProperties: false
                        description: Audio
                        title: Audio
                    title: Content leaf
                    type: object
                  description: Values in the object. Can be mixed content types.
              required:
                - type
                - data
              additionalProperties: false
              description: Object
              title: Object
          description: The original content payload
          type: object
        timestamp:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the content was submitted
        metadata:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties: {}
              description: Arbitrary key/value metadata. Top-level keys are strings.
            - type: 'null'
          description: >-
            Customer-supplied metadata attached to the content (same shape as
            the moderation API `metadata` input).
        client_action:
          anyOf:
            - type: object
              properties:
                action:
                  type: string
                  enum:
                    - review
                    - allow
                    - reject
                  description: >-
                    Your recommendation for the content: allow, review, or
                    reject.
                behavior:
                  description: >-
                    How your recommendation combines with ours. Defaults to
                    'escalate', which only applies it when stricter than ours;
                    'override' replaces ours outright.
                  type: string
                  enum:
                    - override
                    - escalate
                source:
                  description: Where your recommendation came from, e.g. "banned-ip".
                  type: string
                  maxLength: 100
                reason:
                  description: A human-readable explanation for your recommendation.
                  type: string
                  maxLength: 500
              required:
                - action
              additionalProperties: false
              description: A recommendation from your own client-side flagging.
            - type: 'null'
          description: >-
            The recommendation you submitted via the moderation API
            `clientAction` input, if any.
        conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Conversation grouping ID, if any
        author_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            External author ID (the customer's identifier, not Moderation API's
            internal id)
        channel_key:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The channel the content was submitted to, identified by your
            customer-defined channel key.
        meta_type:
          anyOf:
            - type: string
              enum:
                - profile
                - message
                - post
                - comment
                - event
                - product
                - review
                - voice
                - other
            - type: 'null'
          description: >-
            High-level content type (e.g. message, post, comment). Defaults to
            the channel's configured content type but can be overridden per
            request via the moderation API `type` field.
      required:
        - id
        - flagged
        - labels
        - flagged_fields
        - language
        - content
        - timestamp
        - metadata
        - client_action
        - conversation_id
        - author_id
        - channel_key
        - meta_type
      additionalProperties: false
    QueueItemActionEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: queue_item.action
          description: The event type.
          example: queue_item.action
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicActionPerformed'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: queue_item.action
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: act_99999
            key: shadow_ban
            name: Shadow ban
            value: 24h
            created_at: '2026-05-08T12:36:00.000Z'
            queue:
              id: que_abc123
            item:
              id: item_xyz791
              flagged: true
              labels:
                - label: spam/SPAM
                  score: 0.94
                  flagged: true
                  manual: false
              flagged_fields: []
              language: en
              content:
                type: text
                text: Buy crypto now!
              timestamp: '2026-05-08T12:34:56.789Z'
              metadata: null
              client_action: null
              conversation_id: null
              author_id: user-555
              channel_key: null
              meta_type: comment
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: enabled
              trust_level:
                level: 1
                manual: false
              block: null
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
    PublicActionPerformed:
      type: object
      properties:
        id:
          type: string
          description: Moderation action ID
        key:
          anyOf:
            - type: string
            - type: 'null'
          description: Customer-defined key identifying this action
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Display name of the action
        value:
          anyOf:
            - type: string
            - type: 'null'
          description: The value passed to the action when it ran
        created_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the action was performed
        queue:
          description: The queue the item belongs to, if any
          type: object
          properties:
            id:
              type: string
          required:
            - id
          additionalProperties: false
        item:
          description: The content item the action was performed on, if any
          $ref: '#/components/schemas/PublicQueueItem'
        author:
          description: The author the action was performed on, if any
          $ref: '#/components/schemas/PublicAuthor'
      required:
        - id
        - key
        - name
        - value
        - created_at
      additionalProperties: false
    QueueItemRejectedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: queue_item.rejected
          description: The event type.
          example: queue_item.rejected
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicActionPerformed'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: queue_item.rejected
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: act_67890
            key: reject
            name: Reject
            value: spam
            created_at: '2026-05-08T12:34:56.789Z'
            queue:
              id: que_abc123
            item:
              id: item_xyz789
              flagged: true
              labels:
                - label: spam/SPAM
                  score: 0.94
                  flagged: true
                  manual: false
              flagged_fields: []
              language: en
              content:
                type: text
                text: Buy crypto now!
              timestamp: '2026-05-08T12:34:56.789Z'
              metadata: null
              client_action: null
              conversation_id: null
              author_id: user-555
              channel_key: null
              meta_type: comment
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: enabled
              trust_level:
                level: 1
                manual: false
              block: null
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
    QueueItemAllowedEvent:
      type: object
      properties:
        id:
          type: string
          description: Stable event ID. Use this to dedupe retries.
          example: evt_clxxx...
        type:
          type: string
          const: queue_item.allowed
          description: The event type.
          example: queue_item.allowed
        api_version:
          type: string
          const: v2
          example: v2
        created:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp of when the event was emitted.
        data:
          type: object
          properties:
            object:
              $ref: '#/components/schemas/PublicActionPerformed'
          required:
            - object
          additionalProperties: false
      required:
        - id
        - type
        - api_version
        - created
        - data
      additionalProperties: false
      example:
        id: evt_clx9f2k0a0001abcd1234
        type: queue_item.allowed
        api_version: v2
        created: '2026-05-08T12:34:56.789Z'
        data:
          object:
            id: act_11111
            key: allow
            name: Allow
            value: null
            created_at: '2026-05-08T12:35:10.123Z'
            queue:
              id: que_abc123
            item:
              id: item_xyz790
              flagged: false
              labels: []
              flagged_fields: []
              language: en
              content:
                type: text
                text: Buy crypto now!
              timestamp: '2026-05-08T12:34:56.789Z'
              metadata: null
              client_action: null
              conversation_id: null
              author_id: user-555
              channel_key: null
              meta_type: comment
            author:
              id: auth_555
              external_id: user-555
              profile_picture: null
              external_link: null
              name: Jane Doe
              email: jane@example.com
              company: null
              first_seen: 1746792000000
              last_seen: 1746792000000
              last_incident: null
              status: enabled
              trust_level:
                level: 1
                manual: false
              block: null
              risk_evaluation: null
              metrics:
                total_content: 42
                flagged_content: 7
                average_sentiment: -0.1
              metadata: {}
    WebhookEvent:
      title: WebhookEvent
      description: >-
        Discriminated union of every v2 webhook event. Switch on `type` to
        narrow to a specific event shape.
      oneOf:
        - $ref: '#/components/schemas/AuthorBlockedEvent'
        - $ref: '#/components/schemas/AuthorUnblockedEvent'
        - $ref: '#/components/schemas/AuthorSuspendedEvent'
        - $ref: '#/components/schemas/AuthorUpdatedEvent'
        - $ref: '#/components/schemas/AuthorTrustLevelChangedEvent'
        - $ref: '#/components/schemas/AuthorActionEvent'
        - $ref: '#/components/schemas/QueueItemCompletedEvent'
        - $ref: '#/components/schemas/QueueItemActionEvent'
        - $ref: '#/components/schemas/QueueItemRejectedEvent'
        - $ref: '#/components/schemas/QueueItemAllowedEvent'
      discriminator:
        propertyName: type
        mapping:
          author.blocked: '#/components/schemas/AuthorBlockedEvent'
          author.unblocked: '#/components/schemas/AuthorUnblockedEvent'
          author.suspended: '#/components/schemas/AuthorSuspendedEvent'
          author.updated: '#/components/schemas/AuthorUpdatedEvent'
          author.trust_level_changed: '#/components/schemas/AuthorTrustLevelChangedEvent'
          author.action: '#/components/schemas/AuthorActionEvent'
          queue_item.resolved: '#/components/schemas/QueueItemCompletedEvent'
          queue_item.action: '#/components/schemas/QueueItemActionEvent'
          queue_item.rejected: '#/components/schemas/QueueItemRejectedEvent'
          queue_item.allowed: '#/components/schemas/QueueItemAllowedEvent'
    VoiceStartFrame:
      type: object
      description: >-
        First frame the client sends. Declares the conversation, audio format,
        and tracks.
      required:
        - event
        - mediaFormat
        - tracks
      properties:
        event:
          type: string
          enum:
            - start
        conversationId:
          type: string
          description: >-
            Your external conversation id. Omit to have one generated and
            returned in `session.started`.
        channel:
          type: string
          description: Optional. Selects which channel's policy configuration applies.
        mediaFormat:
          type: object
          required:
            - encoding
            - sampleRate
          properties:
            encoding:
              type: string
              description: >-
                audio/x-mulaw (PCMU), audio/x-alaw (PCMA), audio/l16 (linear16),
                or a common container (wav/mp3/ogg/flac).
              example: audio/x-mulaw
            sampleRate:
              type: integer
              minimum: 8000
              maximum: 48000
              example: 8000
        tracks:
          type: array
          description: One or both tracks. Stream only the track(s) you have.
          items:
            type: object
            required:
              - name
            properties:
              name:
                type: string
                enum:
                  - inbound
                  - outbound
              authorId:
                type: string
                description: Your identifier for the speaker on this track.
        emitPartials:
          type: boolean
          default: false
          description: Set true to also receive interim, non-final transcripts.
        metadata:
          type: object
          additionalProperties: true
          description: >-
            Arbitrary JSON attached to the conversation. Stored as-is and not
            interpreted by moderation.
    VoiceMediaFrame:
      type: object
      description: Audio chunk for one track.
      required:
        - event
        - media
      properties:
        event:
          type: string
          enum:
            - media
        media:
          type: object
          required:
            - track
            - payload
          properties:
            track:
              type: string
              enum:
                - inbound
                - outbound
            payload:
              type: string
              description: Base64-encoded audio in the declared format.
    VoiceStopFrame:
      type: object
      description: Ends the call gracefully (or just disconnect).
      required:
        - event
      properties:
        event:
          type: string
          enum:
            - stop
    VoiceSessionStarted:
      type: object
      description: Sent after the start frame is accepted.
      required:
        - v
        - event
        - sessionId
        - tracks
      properties:
        v:
          type: integer
          enum:
            - 1
        event:
          type: string
          enum:
            - session.started
        conversationId:
          type: string
        sessionId:
          type: string
        tracks:
          type: array
          items:
            type: string
    VoiceUtteranceFinal:
      type: object
      description: >-
        A finalized utterance with its moderation result. The
        evaluation/recommendation/policies match the standard moderation
        response.
      required:
        - v
        - event
        - contentId
        - track
        - text
        - recommendation
      properties:
        v:
          type: integer
          enum:
            - 1
        event:
          type: string
          enum:
            - utterance.final
        conversationId:
          type: string
        contentId:
          type: string
        track:
          type: string
          enum:
            - inbound
            - outbound
        authorId:
          type: string
        text:
          type: string
        startMs:
          type: integer
        endMs:
          type: integer
        sttConfidence:
          type: number
        evaluation:
          type: object
          additionalProperties: true
        recommendation:
          type: object
          properties:
            action:
              type: string
              enum:
                - allow
                - review
                - reject
        policies:
          type: array
          items:
            type: object
            additionalProperties: true
    VoiceSessionEnded:
      type: object
      description: Sent when the call ends, with summary stats.
      required:
        - v
        - event
        - stats
      properties:
        v:
          type: integer
          enum:
            - 1
        event:
          type: string
          enum:
            - session.ended
        conversationId:
          type: string
        sessionId:
          type: string
        stats:
          type: object
          properties:
            durationMs:
              type: integer
            utterances:
              type: integer
            actions:
              type: object
              properties:
                allow:
                  type: integer
                review:
                  type: integer
                reject:
                  type: integer
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
webhooks:
  author.blocked:
    post:
      summary: Author was permanently blocked
      description: >-
        Fired when an author transitions to the `blocked` status. The
        `data.object` is the action_performed record that drove the transition,
        with the author and triggering action nested as inline resources.
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorBlockedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  author.unblocked:
    post:
      summary: Author was unblocked
      description: >-
        Fired when an author transitions back to the `enabled` status. May fire
        automatically when a temporary suspension expires (the auto-unblock
        worker runs the `AUTHOR_UNBLOCK` action).
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorUnblockedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  author.suspended:
    post:
      summary: Author was temporarily suspended
      description: >-
        Fired when an author is suspended for a finite period. The `block.until`
        field on the nested author indicates when the suspension expires.
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorSuspendedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  author.updated:
    post:
      summary: Author profile or metadata changed
      description: >-
        Fired when public author fields (name, email, profile picture, metadata,
        etc.) change. Status transitions have their own dedicated events and do
        **not** trigger this.
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorUpdatedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  author.trust_level_changed:
    post:
      summary: Author trust level transitioned
      description: >-
        Fired when an author's resolved trust level (manual override, falling
        back to computed) transitions to a new value. Does not fire for no-op
        recomputes.
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorTrustLevelChangedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  author.action:
    post:
      summary: A custom action was performed on an author
      description: >-
        Fired when an `AUTHOR_CUSTOM` moderation action runs against an author.
        Same shape as the lifecycle events (`author.blocked`,
        `author.suspended`, `author.unblocked`).
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorActionEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  queue_item.resolved:
    post:
      summary: A queue item was resolved
      description: >-
        Fired when a moderator marks a queue item as resolved (checked off the
        queue).
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueueItemCompletedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  queue_item.action:
    post:
      summary: A custom action was performed on a queue item
      description: >-
        Fired when a **custom** moderation action runs against a queue item. The
        `data.object` is the action_performed record with the related action,
        item, author, and queue nested as inline resources. Built-in actions
        (reject, allow) have dedicated events — see `queue_item.rejected` and
        `queue_item.allowed` instead.
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueueItemActionEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  queue_item.rejected:
    post:
      summary: A queue item was rejected
      description: >-
        Fired when the built-in **reject** action runs against a queue item.
        Same shape as `queue_item.action`. Customers who want every action
        firing should subscribe to both this and the other built-in/custom
        events; subscribing only to `queue_item.action` no longer catches
        built-in events.
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueueItemRejectedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
  queue_item.allowed:
    post:
      summary: A queue item was allowed
      description: >-
        Fired when the built-in **allow** action runs against a queue item. Same
        shape as `queue_item.action`. Customers who want every action firing
        should subscribe to both this and the other built-in/custom events.
      tags:
        - Webhooks
      parameters:
        - in: header
          name: webhook-version
          required: true
          schema:
            type: string
            enum:
              - v2
          description: Payload envelope version. Always `v2` for events documented here.
        - in: header
          name: webhook-event-id
          required: true
          schema:
            type: string
          description: Stable event ID (matches `id` in the body). Use to dedupe retries.
        - in: header
          name: modapi-signature
          required: false
          schema:
            type: string
          description: >-
            HMAC-SHA256 signature of the raw request body, signed with the
            webhook secret. Verify before trusting the payload.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueueItemAllowedEvent'
      responses:
        '200':
          description: >-
            Acknowledge receipt. Any 2xx status closes the delivery as
            successful; non-2xx triggers retry with exponential backoff.
