AI agent
Add an action connection
Authorization
AuthorizationstringrequiredAn API token, sent as Bearer <token>.
Needs the ai:actions ability
Body
application/jsonauth_configobjectShow child attributesHide child attributes
header_namestringNeeded when auth_type is api_key_header: the name of the HTTP header the key travels in. 1 to 64 letters, digits or hyphens, such as X-Api-Key.
prefixstringOnly for auth_type bearer: the word put before the token in the Authorization header in place of Bearer, such as Token. Left out, it is Bearer.
query_paramstringNeeded when auth_type is api_key_query: the name of the query parameter the key travels in. 1 to 64 letters, digits or hyphens only (no underscore), such as apikey.
auth_typestringHow the connection signs its requests: "none", "bearer", "api_key_header", "api_key_query" or "basic". api_key_header also needs auth_config.header_name and api_key_query needs auth_config.query_param; "none" clears the stored secret. Such as "bearer".
Maximum length: 40
base_urlstringThe https address every action's path is added to; requests can never leave it. A full https address with no credentials, query or fragment, at most 512 characters, such as https://api.example.com.
Maximum length: 512
default_headersobjectHeaders sent with every request through this connection, as an object of header name to value, at most 10, values at most 256 characters, such as {"X-Api-Version": "2024-01"}. Not allowed: Authorization, Content-Type, Cookie, Host, User-Agent and names starting with Dimmi-.
kindstringThe connection's kind: "http" for an HTTP API or "mcp" for an MCP server. When creating: needed, and fixed from then on. When updating: it does not change, so leave it out.
Available options:httpmcp
namestringThe name of the action connection, at most 60 characters.
Maximum length: 60
passwordstringThe password, as text. It is stored encrypted and never shown again.
Maximum length: 4096
statusstring"active", or "disabled" to stop every action on the connection. When creating: it has no effect, a new connection always starts active, so leave it out. When updating: switches the connection off or back on; PATCH /ai/action-connections/{connection} is the way to disable one.
Maximum length: 16
timeout_msintegerA length of time in milliseconds, such as 10000 for ten seconds.
Format: int32
tokenstringThe secret bearer token or API key, as text, at most 4096 characters. It is only written: stored encrypted and never returned or shown again.
Maximum length: 4096
usernamestringThe user name for basic auth, sent together with password, at most 256 characters, such as api-user.
Maximum length: 256
variablesobjectNamed values the connection's actions can use in their templates as {connection.name}, as an object of name to text. At most 20; names are lowercase letters, digits and _, up to 40 characters; values up to 256 characters. Such as {"account_id": "acct_42", "region": "eu"}.
Response 201
CreateddataobjectrequiredShow child attributesHide child attributes
actions_countintegerrequiredHow many actions use this connection. Counted in lists; 0 when the connection is read alone.
Format: int64
auth_configobjectrequiredShow child attributesHide child attributes
header_namestringNeeded when auth_type is api_key_header: the name of the HTTP header the key travels in. 1 to 64 letters, digits or hyphens, such as X-Api-Key.
prefixstringOnly for auth_type bearer: the word put before the token in the Authorization header in place of Bearer, such as Token. Left out, it is Bearer.
query_paramstringNeeded when auth_type is api_key_query: the name of the query parameter the key travels in. 1 to 64 letters, digits or hyphens only (no underscore), such as apikey.
auth_typestringrequiredHow requests prove who they are: none, bearer, api_key_header, api_key_query or basic.
base_urlstringrequiredThe address every request of this connection starts from, such as https://api.example.com, or the MCP server's URL.
created_atstringrequiredWhen it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
Format: date-time
default_headersobjectrequiredHeaders sent with every request of this connection, by name. Empty when none.
has_secretbooleanrequiredTrue when a token or password is stored for the connection. The secret itself is never returned.
idstringrequiredThe id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
kindstringrequiredWhat the connection reaches: http for an HTTP API, mcp for a remote MCP server.
last_errorstring | nullrequiredError code of the last failed call or test, such as auth_failed or unavailable. Null when none has failed.
last_error_atstring | nullrequiredWhen a call or test through this connection last failed. Null when none has.
Format: date-time
last_success_atstring | nullrequiredWhen a call or test last reached the connection. Null when none has.
Format: date-time
namestringrequiredThe name the team gave the connection, such as Orders API. Up to 60 characters.
objectstringrequiredThe kind of record this is, the same for every record of its kind, such as article.
secret_hintstring | nullrequiredThe last four characters of the stored secret after an ellipsis, such as …9f2c, to tell keys apart. Null when there is no secret or it is under 8 characters.
statusstringrequiredWhether the connection can be used: active, error (its actions are not offered until a test passes) or disabled.
status_reasonstring | nullrequiredWhy the connection is in error: host_blocked, or auth after three refused credentials in a row. Null otherwise.
timeout_msintegerrequiredHow long a request may take, in milliseconds, from 1000 to 15000. Defaults to 8000.
Format: int32
tools_synced_atstring | nullrequiredWhen the MCP server's tools were last synced into actions. Null when never synced.
Format: date-time
updated_atstringrequiredWhen it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
Format: date-time
variablesobjectrequiredPlain named values that request templates read as {connection.<name>}, such as a region or account id. Not for secrets. Empty when none.
Response error
ErrorcodestringrequiredStable code for programs to tell errors apart, such as validation_failed or internal_error.
errorsobjectEach rejected field mapped to its messages. Only present when the input was invalid.
messagestringrequiredWhat went wrong, in words safe to show a person.