Texa Desk Application API · Automation rule
List all automation rules in an account
GET /api/v1/accounts/{account_id}/automation_rules
Get details of automation rules in an Account
Authorization api_access_tokenheader required
A person's access token (Texa Desk, Profile settings → Access token ) or an agent bot's token, in the api_access_token header. It acts as that person, with their role's permissions.
Path parameters account_idinteger required
The numeric ID of the account
account_idinteger required
The numeric ID of the account
Query parameters Responses 200 Success
payloadarray of object or object
Response payload that contains automation rule(s)
403 Access denied
curl 'https://desk.texadesk.com/api/v1/accounts/1/automation_rules' \
-H "api_access_token: $TEXA_DESK_TOKEN "
import os , requests
headers = { "api_access_token" : os . environ [ "TEXA_DESK_TOKEN" ]}
r = requests . get ( "https://desk.texadesk.com/api/v1/accounts/1/automation_rules" , headers = headers )
r . raise_for_status ()
print ( r . json ())
const r = await fetch ( "https://desk.texadesk.com/api/v1/accounts/1/automation_rules" , {
method : "GET" ,
headers : { "api_access_token" : ` ${ process . env . TEXA_DESK_TOKEN } ` },
});
if ( ! r . ok ) throw new Error ( ` ${ r . status } : ${ await r . text () } ` );
console . log ( await r . json ());
Response 200 Copy
{
"payload" : [
{
"id" : 1 ,
"account_id" : 1 ,
"name" : "Add label on message create event" ,
"description" : "Add label support and sales on message create event if incoming message content contains text help" ,
"event_name" : "message_created" ,
"conditions" : [
{
"attribute_key" : "content" ,
"filter_operator" : "contains" ,
"values" : [
"help"
],
"query_operator" : "and"
}
],
"actions" : [
{
"action_name" : "add_label" ,
"action_params" : [
"support" ,
"sales"
]
}
],
"created_on" : 1 ,
"active" : true
}
]
}