Skip to main content

Automations

Automations are returned newest first. Auto-DM setup records are not included.

Send the id of the connected account that should run the automation: instagramAccountId, facebookPageId, telegramBotId, threadsAccountId, xAccountId, discordBotId, or channelId.

List​

GET /public/v1/automations

curl "https://api.autodm.live/public/v1/automations?limit=25" \
-H "Authorization: Bearer adpk_your_key"
{
"automations": [
{
"id": "11111111-1111-4111-8111-111111111111",
"name": "Guide reply",
"platform": "INSTAGRAM",
"status": "ACTIVE",
"triggerCount": 0,
"sentCount": 0,
"failCount": 0,
"trigger": {
"type": "COMMENT",
"keyword": "guide",
"matchType": "CONTAINS",
"mediaTargetType": "ALL_POSTS"
},
"action": {
"responseType": "BOTH",
"message": null,
"commentReplyText": null,
"dmTemplateId": "22222222-2222-4222-8222-222222222222",
"commentReplyTemplateId": null
}
}
],
"total": 1,
"page": 1,
"limit": 25,
"totalPages": 1
}

platform is INSTAGRAM, FACEBOOK, TELEGRAM, THREADS, X, TIKTOK, or DISCORD.

status is ACTIVE or DISABLED.

trigger.type is one of COMMENT, DIRECT_MESSAGE, STORY_REPLY, STORY_MENTION, START_LINK, MENTION, REACTION, NEW_MEMBER, SLASH_COMMAND, SERVER_BOOST, or MEMBER_LEAVE.

matchType is CONTAINS or EXACT. responseType is DM_ONLY, COMMENT_ONLY, or BOTH.

Get one​

GET /public/v1/automations/{id}

The body is one automation, the same fields as a row in the list.

Create​

POST /public/v1/automations

Requires a read and write key. Returns 201 and the new automation.

curl https://api.autodm.live/public/v1/automations \
-H "Authorization: Bearer adpk_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Guide reply",
"platform": "INSTAGRAM",
"instagramAccountId": "11111111-1111-4111-8111-111111111111",
"triggerType": "COMMENT",
"keyword": "guide",
"matchType": "CONTAINS",
"responseType": "BOTH",
"dmTemplateId": "22222222-2222-4222-8222-222222222222"
}'

name is required and can be up to 80 characters. keyword can be up to 100 characters. message and commentReplyText can be up to 1000 characters.

You can also send commentReplyTemplateId, mediaTargetType (ALL_POSTS or SPECIFIC_POST), and specificMediaId.

Pause and resume​

Both require a read and write key and return 201 with the automation.

curl -X POST https://api.autodm.live/public/v1/automations/{id}/pause \
-H "Authorization: Bearer adpk_your_key"
curl -X POST https://api.autodm.live/public/v1/automations/{id}/resume \
-H "Authorization: Bearer adpk_your_key"

Pause sets status to DISABLED. Resume sets it back to ACTIVE.

Counts​

GET /public/v1/automations/{id}/stats

{
"id": "11111111-1111-4111-8111-111111111111",
"status": "ACTIVE",
"triggerCount": 12,
"sentCount": 11,
"failCount": 1
}