v1

latestOpenAPI 3.1.02026-07-135055368.9 KB
Actions

Create a New Action

Create a New Action

post/v1/actions

Request body

namestring required

Name of the action

descriptionstring nullable

Description about the action and it should also contain when the action should be triggered

parametersobject required

Parameters for the action. It should be a JSON schema object

userWaitingTextstring nullable

Text to be rendered to user when action is invoked

userSuccessTextstring nullable

Text to be rendered to user when action is successful

userErrorTextstring nullable

Text to be rendered to user when action is not successful

invocationTrigger'user_query' | 'webhook.conversation_start' | 'webhook.conversation_end' required

Example request

{
  "name": "get_delivery_date",
  "description": "Get the delivery date for a customer's order. Call this whenever you need to know the delivery date, for example when a customer asks 'Where is my package'",
  "endpoint": {
    "url": "http://example.com/api/action",
    "method": "POST"
  },
  "userWaitingText": "Please wait while we get the delivery date for your order",
  "userSuccessText": "We have sent you an email with the delivery date",
  "userErrorText": "We are unable to get the delivery date for your order"
}

Response

Action created successfully

idstring
orgIdstring
namestring
descriptionstring nullable
parametersobject nullable
endpointobject nullable
invocationTriggerstring nullable
userWaitingTextstring nullable
userSuccessTextstring nullable
userErrorTextstring nullable
createdBystring
createdAtstring date-time
updatedBystring
updatedAtstring date-time