Automations API
Automation API¶
Each automation has these fields
Attribute | Type | Editable | Description |
---|---|---|---|
id |
UUID | read-only | Unique identifier for the automation. |
created_at |
datetime | read-only | Creation time of the automation |
organization_id |
UUID | read-only | Owner organization of the automation. |
variable_list |
string[] | required | List of visitor variables that are accessible to script. |
trigger_type |
"focused" | "opened" | "closed" |
required | When to triger execution of the automation. |
js_text |
string | required | Code that is executed. |
The visitor variables are accessible from variable _visitorVariables
and they are stored in dictionary/object where keys are visitor variable names and the values are corresponding values for them.
List all automations for organization¶
1 |
|
This endpoint returns:
- 200 if the request was successful
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 404 the organization does not exist
Create new automation¶
1 |
|
This endpoint returns:
- 201 if the request was successful
- 400 if the request payload is in wrong format
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 404 the organization does not exist
Get specific automation by id¶
1 |
|
This endpoint returns:
- 200 if the request was successful
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 404 if organization or the automation was not found
Update automation¶
1 |
|
This endpoint returns:
- 200 if the request was successful
- 400 if the request payload is in wrong format
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 404 if organization or the automation was not found
Get automations for chat¶
1 |
|
This endpoint returns:
- 200 if the request was successful
- 401 if you are not authenticated
- 403 if you do not have active subscription
- 403 if you do not have access to the organization
- 404 if chat was not found