Skip to content
dimmiDocs

AI agent

Draft an AI action

POST/api/v1/ai/actions

Authorization

Authorizationstringrequired

An API token, sent as Bearer <token>.

Needs the ai:actions ability

Body

application/json
agentsstring[]

dimmi (answers customers) and operator (works for the team). Default dimmi only.

approvalstring

none, teammate or admin: who on the team must approve a write before it runs.

approval_timeout_minutesinteger

A length of time in minutes, such as 30.

Format: int32

body_encodingstring

How the request body is sent: "json" or "form". Left out, it is "json". With "form" the body_template must be a flat object of plain values, such as {"email": "{contact.email}"}.

body_templateany

JSON body sent with the request, only for POST, PUT and PATCH. Values may hold placeholders {input.x}, {contact.x} or {connection.x}, such as {"order_id": "{input.order_id}", "reason": "{input.reason}"}. Send null to clear the body.

bound_argumentsobject

For an action on an MCP connection: arguments you fix yourself, hidden from the model and laid over what the model sends. An object of argument name to value; values may hold placeholders, such as {"account_id": "{connection.account_id}", "limit": 10}.

channelsstring[]

Where dimmi may take it, such as widget. Default widget.

confirmationstring

none, or customer to have the customer confirm a write first (the default).

connection_idstring

Id of the action connection, starting with acn_, such as acn_01jx2m8k4t. Find it with GET /ai/action-connections.

descriptionstring

When to use the action, 10 to 1024 characters; the model reads it to decide.

error_message_pathstring

Dotted path to the error message in the other system's JSON response, read when a call fails. Letters, digits, _ , - and # joined by dots, at most 200 characters, such as "error.message".

headersobject

Extra HTTP headers sent with the request, as an object of header name to value, at most 10, such as {"X-Api-Version": "2024-01"}. Not allowed: Host, Cookie, Content-Length, Content-Type, Transfer-Encoding, Authorization, Idempotency-Key, User-Agent, Connection and any name starting with Dimmi-.

input_schemaany

JSON Schema of what the model fills in.

mcp_tool_namestring

The MCP server's tool this action calls, on an mcp connection.

methodstring

HTTP method of an action on an http connection: GET, POST, PUT, PATCH or DELETE (lowercase is accepted). Left out on create, it is GET. Not used for an action on an mcp connection. Such as "POST".

namestring

Tool name the model sees: 3 to 48 lowercase letters, digits and underscores.

path_templatestring

Path under the connection's base url; placeholders are {input.x}, {contact.email}, {contact.external_id}, {contact.attr.key} and {connection.x}.

queryobject

Words to search for, such as refund.

response_fieldsobject[]

Which values of the response the model reads, at most 30; left empty, it reads the whole response. A list of {name, path, description}: name is lowercase letters, digits and _, path is a dotted path into the JSON, such as [{"name": "status", "path": "order.status", "description": "Order status"}].

Show child attributes
descriptionstring

An optional short note telling the AI what this value means, such as The order's shipping status.

namestringrequired

The name the AI reads this value under: lowercase letters, digits and underscores, starting with a letter, at most 48 characters, used only once in the list, such as order_status.

pathstringrequired

Dotted path to the value in the other system's JSON response: letters, digits, _ and - joined by dots, a number for a list position and # to take every item, at most 200 characters, such as data.order.status or items.#.name.

response_max_bytesinteger

A size in bytes, such as 65536.

Format: int32

restore_version_idstring

Id of the saved version, starting with prcv or srsv_, such as prcv_01jx2m8k4t. Find it with the matching versions list.

side_effectstring

read runs at once; write changes something and may wait for agreement. Default write.

statusstring

When creating: has no effect, a new action always starts as a draft and goes live through POST /ai/actions/{action}/publications, so leave it out. When updating: "disabled" or "published" switches an action published before off or back on; "published" is refused for an action never published. Such as "disabled".

timeout_msinteger

A length of time in milliseconds, such as 10000 for ten seconds.

Format: int32

titlestring

The title of the action.

Response 201

Created
dataobjectrequired
Show child attributes
agentsstring[] | nullrequired

Which agents may use the action: dimmi (answers customers), operator (works for the team), or both.

approvalstringrequired

Who on the team must approve a call before it runs: none, teammate or admin. Only a write action can need approval.

approval_timeout_minutesintegerrequired

Minutes a call waits for a teammate's approval before it expires, from 1 to 10080. Defaults to 60.

Format: int32

body_encodingstringrequired

How the request body is sent: json or form.

body_templateanyrequired

The request body as JSON, with placeholders such as {input.order_id}, {contact.email} or {connection.region} filled in at call time. Null when the request has no body.

bound_argumentsobjectrequired

Arguments of an MCP tool that the admin fills in and the model never sees, by argument name. Values may hold placeholders such as {contact.email}. Empty when none.

channelsstring[] | nullrequired

Channels on which the action is offered, such as ["widget"]. Defaults to the widget alone.

confirmationstringrequired

Whether the customer must confirm a call before it runs: none or customer. Only a write action can ask for it.

connection_idstringrequired

Id of the connection the action sends its requests through, such as acn_... Send it wherever an action connection is asked for.

created_atstringrequired

When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

Format: date-time

descriptionstringrequired

What the action does, written for the model that decides when to call it. 10 to 1024 characters.

error_message_pathstring | nullrequired

Dotted path into a failed response's body where the error message is found, such as error.message. Null when none is set.

has_unpublished_changesbooleanrequired

True when this working copy differs from the published version, or nothing was published yet. The agent only runs the published version.

headersobjectrequired

Extra request headers by name. Values may hold placeholders such as {input.locale}. Empty when none.

idstringrequired

The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.

input_schemaanyrequired

JSON Schema object of the arguments the model must give when it calls the action.

kindstringrequired

How the action runs: http sends a request to an API, mcp_tool calls a tool on an MCP server.

last_test_responseany

The result of the last successful live test of the action, kept to help map response fields. Left out when there is none.

mcp_tool_namestring | nullrequired

Name of the tool called on the MCP server. Null for an http action.

methodstring | nullrequired

HTTP method of the request: GET, POST, PUT, PATCH or DELETE. Null for an mcp_tool action.

namestringrequired

The tool name the model calls the action by: 3 to 48 lowercase letters, digits and underscores, such as lookup_order.

objectstringrequired

The kind of record this is, the same for every record of its kind, such as article.

path_templatestring | nullrequired

Path added to the connection's base URL, with placeholders, such as /orders/{input.order_id}. Null for an mcp_tool action.

published_versionobjectrequired
Show child attributes
created_atstringrequired

When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

Format: date-time

idstringrequired

The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.

numberintegerrequired

The published version's number within its action, starting at 1.

Format: int32

queryobjectrequired

Query string parameters by name. Values may hold placeholders such as {input.status}. Empty when none.

response_fieldsobject[] | nullrequired

Which values of the response the model gets to read, each a name and a dotted path into the body. Empty when nothing is mapped.

Show child attributes
descriptionstring

An optional short note telling the AI what this value means, such as The order's shipping status.

namestringrequired

The name the AI reads this value under: lowercase letters, digits and underscores, starting with a letter, at most 48 characters, used only once in the list, such as order_status.

pathstringrequired

Dotted path to the value in the other system's JSON response: letters, digits, _ and - joined by dots, a number for a list position and # to take every item, at most 200 characters, such as data.order.status or items.#.name.

response_max_bytesintegerrequired

Largest response body the action accepts, in bytes, from 1024 to 262144. Defaults to 65536.

Format: int32

side_effectstringrequired

Whether a call only reads data (read) or changes something (write). A read runs at once; a write may wait for confirmation or approval.

sourcestringrequired

How the action was made: dashboard, api or mcp_sync (created from an MCP server's tool list).

statusstringrequired

Where the action stands: draft (never published), published (the agent can use it) or disabled (switched off).

timeout_msinteger | nullrequired

How long a call may take, in milliseconds, from 1000 to 15000. Null uses the connection's timeout.

Format: int32

titlestringrequired

Short name people see for the action, up to 80 characters, such as Look up an order.

updated_atstringrequired

When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

Format: date-time

warningsstring[] | nullrequired

Notes about the action's definition. Currently always an empty list.

Response error

Error
codestringrequired

Stable code for programs to tell errors apart, such as validation_failed or internal_error.

errorsobject

Each rejected field mapped to its messages. Only present when the input was invalid.

messagestringrequired

What went wrong, in words safe to show a person.