> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moderationapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List moderation actions

> List all available moderation actions for the authenticated organization.



## OpenAPI

````yaml get /actions
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
security: []
tags:
  - name: Actions
  - name: Queues
  - name: Webhooks
  - name: Wordlist
  - name: UserReports
externalDocs:
  url: https://docs.moderationapi.com
paths:
  /actions:
    get:
      tags:
        - Actions
      summary: List moderation actions
      description: >-
        List all available moderation actions for the authenticated
        organization.
      operationId: actions-list
      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'
      security:
        - Authorization: []
      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)
components:
  schemas:
    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: []
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````