Get an Automation
curl --request GET \
--url https://api.social-api.ai/v1/automations/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/automations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/automations/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"created_at": "<string>",
"failed_count": 123,
"fired_count": 123,
"id": "aut_01J9Z8Y7X6W5V4T3S2R1Q0P9N8",
"name": "Send the link",
"once_per_person": true,
"post_ids": [
"<string>"
],
"sent_count": 123,
"status": "active",
"steps": [
{
"actions": [
{
"private_reply": {
"texts": [
"Here is the link: https://example.com"
]
},
"reply_comment": {
"texts": [
"Here is the link: https://example.com"
]
},
"send_dm": {
"texts": [
"Here is the link: https://example.com"
]
},
"type": "private_reply"
}
],
"buttons": [
{
"next_step": "check",
"title": "Open",
"type": "url",
"url": "https://example.com"
}
],
"fallthrough_step": "<string>",
"filters": [
{
"keyword": {
"keywords": [
"link",
"price"
],
"match": "contains"
},
"type": "keyword"
}
],
"key": "start"
}
],
"trigger": "comment",
"updated_at": "<string>"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Automations
Get an Automation
Returns one Automation with its fired, sent and failed counts.
GET
/
automations
/
{id}
Get an Automation
curl --request GET \
--url https://api.social-api.ai/v1/automations/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/automations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/automations/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"created_at": "<string>",
"failed_count": 123,
"fired_count": 123,
"id": "aut_01J9Z8Y7X6W5V4T3S2R1Q0P9N8",
"name": "Send the link",
"once_per_person": true,
"post_ids": [
"<string>"
],
"sent_count": 123,
"status": "active",
"steps": [
{
"actions": [
{
"private_reply": {
"texts": [
"Here is the link: https://example.com"
]
},
"reply_comment": {
"texts": [
"Here is the link: https://example.com"
]
},
"send_dm": {
"texts": [
"Here is the link: https://example.com"
]
},
"type": "private_reply"
}
],
"buttons": [
{
"next_step": "check",
"title": "Open",
"type": "url",
"url": "https://example.com"
}
],
"fallthrough_step": "<string>",
"filters": [
{
"keyword": {
"keywords": [
"link",
"price"
],
"match": "contains"
},
"type": "keyword"
}
],
"key": "start"
}
],
"trigger": "comment",
"updated_at": "<string>"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
Automation ID
Response
OK
Example:
"acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
Actions that failed
Events the Automation ran against
Example:
"aut_01J9Z8Y7X6W5V4T3S2R1Q0P9N8"
Example:
"Send the link"
Reach each person at most once. A run in which every action failed does not count
Up to 100 platform post ids, each 1 to 100 characters, a comment must be on. Omitted means every post. Comment trigger only
Actions carried out successfully
Available options:
active, paused Example:
"active"
Up to 10 Steps forming a graph. One must have the key "start"
Show child attributes
Show child attributes
The kind of inbound event that fires the Automation
Available options:
comment, dm Example:
"comment"