Get a automation rule details
curl --request GET \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/automation_rules/{id} \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/automation_rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/automation_rules/{id}"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"payload": {
"id": 90,
"account_id": 1,
"name": "add-label-bug-if-message-contains-bug",
"description": "add-label-bug-if-message-contains-bug",
"event_name": "message_created",
"conditions": [
{
"values": [
"incoming"
],
"attribute_key": "message_type",
"query_operator": "and",
"filter_operator": "equal_to"
},
{
"values": [
"bug"
],
"attribute_key": "content",
"filter_operator": "contains"
}
],
"actions": [
{
"action_name": "add_label",
"action_params": [
"bugs",
"support-query"
]
}
],
"created_on": 1650555440,
"active": true
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Automation Rule
Get a automation rule details
Get the details of a automation rule in the account
GET
/
api
/
v1
/
accounts
/
{account_id}
/
automation_rules
/
{id}
Get a automation rule details
curl --request GET \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/automation_rules/{id} \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/automation_rules/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/automation_rules/{id}"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"payload": {
"id": 90,
"account_id": 1,
"name": "add-label-bug-if-message-contains-bug",
"description": "add-label-bug-if-message-contains-bug",
"event_name": "message_created",
"conditions": [
{
"values": [
"incoming"
],
"attribute_key": "message_type",
"query_operator": "and",
"filter_operator": "equal_to"
},
{
"values": [
"bug"
],
"attribute_key": "content",
"filter_operator": "contains"
}
],
"actions": [
{
"action_name": "add_label",
"action_params": [
"bugs",
"support-query"
]
}
],
"created_on": 1650555440,
"active": true
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Token de usuario. Envía el valor en el header api_access_token. Lo obtienes en el perfil (GET /api/v1/profile) o al regenerarlo.
Path Parameters
ID of the Automation Rule
The numeric ID of the account
Response
Success
- object[]
- object
Show child attributes
Show child attributes