Skip to main content
PATCH
Update an action

Authorizations

Authorization
string
header
required

API key from your account settings

Path Parameters

agentId
string
required

The agent ID

Minimum string length: 1
Example:

"5QHA6VB-DIAbBhxwqxfdi"

actionId
string<uuid>
required

The action ID

Example:

"3f1c2a9e-8b7d-4c1e-9f0a-2d6b7e8c9a10"

Body

application/json
name
string

New name: 3 to 64 letters, digits, _ or -, unique within the agent. Most types need a leading letter or _. Spaces become _. Sending the current name leaves it unchanged, including names those rules would reject. Procedures that mention the old name are updated.

Example:

"check_order_status"

status
enum<string>

Turns the action on or off

Available options:
enabled,
disabled
whenToUse
string | null

Tells the agent when to call the action. Send null or "" to clear it. An enabled action that is not procedure-only must keep one.

Maximum string length: 3000
Example:

"Use when the customer asks where their order is."

procedureOnly
boolean

When true, only procedures can call the action

channels
object[]

Switches the action on or off per channel. Channels you leave out keep their setting. Only channels listed in the action's channels are accepted.

Minimum array length: 1
Example:
fields
object[]

Replaces the input list, so send every field to keep. The GET list round-trips unchanged. Rules follow the dashboard for each type: collect-data takes 1 to 20 fields, collect-leads 20 besides name, email and phone, shopify-exchange 20 (names up to 30 characters, descriptions up to 200). Only shopify-exchange takes image. required, array and default change only where the dashboard edits them; send default: null to remove one. Create-ticket, form and widget fields are read-only.

Example:

Response

The updated action

id
string
required

Action ID

name
string
required

Action name, unique within the agent

type
enum<string>
required

Action type

Available options:
collect-leads,
collect-data,
custom-button,
custom-action,
shopify-get-cart,
shopify-update-cart,
shopify-place-order,
shopify-exchange,
shopify-show-product,
shopify-show-order,
shopify-update-profile,
shopify-update-address,
shopify-account-access,
shopify-get-metafields,
shopify-tag-order,
shopify-create-return,
magento-show-product,
slack-notify,
stripe-get-subscription-info,
stripe-get-invoices,
stripe-change-billing-address,
stripe-manage-subscription,
stripe-find-payments,
stripe-refund-payment,
chatbase-update-chatbot-settings,
calcom-get-slots,
calendly-get-slots,
tavily-web-search,
sunshine-live-chat,
zendesk-messaging-live-chat,
freshchat-live-chat,
salesforce-live-chat,
chatbase-live-chat,
customize-suggested-messages,
custom-form,
create-ticket,
transfer-to-phone-number,
human-in-the-loop
Example:

"custom-action"

status
enum<string>
required

Whether the agent can use the action. draft means its setup isn't complete, so the agent can't use it.

Available options:
enabled,
disabled,
draft
procedureOnly
boolean
required

Whether the action runs only when a procedure calls it

whenToUse
string | null
required

Tells the agent when to call the action. Null when it is not set.

fields
object[]
required

What the action collects. input fields are the editable list, except on create-ticket actions, where they cannot be changed. form fields are the collect-leads form (description is the label) and widget fields are the linked widget variables; both are shown and cannot be changed. Built-in fields and a shared ticket form are not included.

channels
object[]
required

Channels the action can be switched on or off for, as on the Deploy page. New channels may be added.

warnings
string[]
required

Problems with procedures or webhooks linked to the action. The update itself was saved.