Skip to main content
POST
/
actions
Create an action
curl --request POST \
  --url https://api.open.cx/actions \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "api_endpoint": "<string>",
  "request_type": "GET",
  "payload": {
    "base_url": "<string>",
    "path": "<string>",
    "method": "<string>",
    "operationId": "<string>",
    "summary": "<string>",
    "description": "<string>",
    "parameters": [
      {
        "name": "<string>",
        "in": "query",
        "description": "<string>",
        "required": true,
        "schema": {}
      }
    ],
    "requestBody": {
      "content": {},
      "description": "<string>",
      "required": true
    },
    "responses": {}
  },
  "description": "<string>",
  "operation_id": "<string>",
  "enabled_on_channel": {
    "channels": [
      "web"
    ]
  },
  "pinned": true,
  "tags": [
    "<string>"
  ],
  "require_form_submission": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "api_endpoint": "<string>",
  "request_type": "<string>",
  "operation_id": "<string>",
  "payload": {
    "base_url": "<string>",
    "path": "<string>",
    "method": "<string>",
    "operationId": "<string>",
    "summary": "<string>",
    "description": "<string>",
    "parameters": [
      {
        "name": "<string>",
        "in": "query",
        "description": "<string>",
        "required": true,
        "schema": {}
      }
    ],
    "requestBody": {
      "content": {},
      "description": "<string>",
      "required": true
    },
    "responses": {}
  },
  "status": "<string>",
  "pinned": true,
  "tags": [
    "<string>"
  ],
  "enabled_on_channel": {
    "channels": [
      "web"
    ]
  },
  "is_handoff_like": true,
  "require_form_submission": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Body

application/json
name
string
required

Action display name

api_endpoint
string<uri>
required

The full API endpoint URL to call

request_type
enum<string>
required

HTTP method

Available options:
GET,
POST,
PUT,
PATCH,
DELETE
payload
object
required

OpenAPI-style operation spec: parameters, requestBody, responses, etc.

description
string

What this action does

operation_id
string

Unique operation ID (auto-generated from name if omitted)

enabled_on_channel
object

Channel restrictions (defaults to web only)

pinned
boolean

Whether to pin this action prominently

tags
string[]

Tags for organizing actions

require_form_submission
boolean

Require the user to submit a form before executing

Response

Default Response

id
string
required

Unique action ID

name
string
required

Action display name

description
string | null
required

What this action does

api_endpoint
string | null
required

The API endpoint URL this action calls

request_type
string | null
required

HTTP method (GET, POST, PUT, PATCH, DELETE)

operation_id
string | null
required

Unique operation ID used to reference this action

payload
object
required

OpenAPI-style operation spec defining parameters, request body, and responses

status
string | null
required

Action status (e.g. "live")

pinned
boolean
required

Whether this action is pinned prominently

tags
string[]
required

Tags for organizing actions

enabled_on_channel
object
required

Channel restrictions

is_handoff_like
boolean
required

Whether this action behaves like a handoff to a human agent

require_form_submission
boolean | null
required

Whether a form must be submitted before the action executes

created_at
string<date-time>
required

When the action was created

updated_at
string<date-time>
required

When the action was last updated