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

# Invoke an action

> Invoke an action — Run a configured action the same way the AI agent runs it in a conversation — make the action’s configured HTTP request and return the upstream status and body.



## OpenAPI

````yaml post /actions/{operation_id}/invoke
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /actions/{operation_id}/invoke:
    post:
      summary: Invoke an action
      description: >-
        Run a configured action the same way the AI agent runs it in a
        conversation — make the action’s configured HTTP request and return the
        upstream status and body. Addressed by operation_id (the handle the
        agent uses). The target URL comes only from the action configuration,
        never the request. With `context.sessionId`, the request is decorated
        with the same in-session context the agent attaches (org globals,
        contact identity, default headers, and — off web — per-contact backend
        auth), so a caller embedded in a conversation invokes the action with
        the agent’s context; without it, only org globals apply. Actions
        requiring a form still execute — supplying the inputs is the submission.
      operationId: invokeAction
      parameters:
        - schema:
            type: string
          in: path
          name: operation_id
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvokeActionDto'
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvokeActionResponseDto'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    InvokeActionDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/InvokeActionDtoInput'
      type: object
      properties:
        inputs:
          default: {}
          description: Inputs forwarded to the action’s HTTP request
          type: object
          properties:
            queryParams:
              description: Query string params
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            pathParams:
              description: Path template params
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            body:
              description: Request body (sent for non-GET methods)
        context:
          type: object
          properties:
            sessionId:
              description: >-
                Optional conversation session. When given, the request is
                decorated with the same in-session context the AI agent attaches
                (org globals, contact identity, default headers, and — off web —
                per-contact backend auth).
              type: string
    InvokeActionResponseDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/InvokeActionResponseDto'
      type: object
      properties:
        status:
          type: number
          description: Upstream HTTP status code
        body:
          description: Parsed JSON when the response is JSON, else the raw text
      required:
        - status
      additionalProperties: false
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.