Automations · Comment Automations
Returns comment-to-DM automations.
Request
Send your API key as Authorization: Bearer pz_live_.... Read-only keys can call it. Keys with the messages resource group disabled get 403 resource_group_disabled. Authentication
Query parameters
| Name | Type | Notes |
|---|---|---|
profileId | string |
Example
curl -X GET "https://api.pozy.ai/v1/comment-automations" \
-H "Authorization: Bearer $POZY_API_KEY"const res = await fetch("https://api.pozy.ai/v1/comment-automations", {
headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);import os
import requests
resp = requests.get(
"https://api.pozy.ai/v1/comment-automations",
headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
timeout=30,
)
resp.raise_for_status()
print(resp.json())Response
200 on success
successbooleanautomationsarray of object34 child fields
idstringnamestringplatformstringOne of
instagram,facebook,tiktok,threads,linkedin,youtube.triggerstringOne of
comment,live_comment,story_reply,story_mention.accountIdstringplatformPostIdstringpostTitlestringpostIdstringkeywordsarray of stringmatchModestringOne of
exact,contains,word.excludeKeywordsarray of stringtypoTolerancebooleandmMessagestringbuttonsarray of object5 child fields
typestringrequiredOne of
url,postback,phone.titlestringrequiredUp to 20 characters.
urlstring (URL)payloadstringphonestring
templateobject3 child fields
typestringrequiredOne of
generic.imageAspectRatiostringOne of
horizontal,square.elementsarray of objectrequiredAt least 1 item. Up to 10 items.
4 child fields
titlestringrequiredUp to 80 characters.
subtitlestringUp to 80 characters.
imageUrlstring (URL)buttonsarray of objectUp to 3 items.
4 child fields
typestringrequiredOne of
url,postback.titlestringrequiredUp to 20 characters.
urlstring (URL)payloadstring
commentReplystringdmMessageVariationsarray of stringcommentReplyVariationsarray of stringlinkTrackingbooleanclickTagstringdmDelaySecondsintegercommentReplyDelaySecondsintegeralsoMatchInDmsbooleanrepeatPolicyobject2 child fields
modestringrequiredOne of
once,every_comment. Defaultonce.cooldownHoursinteger1 to 8760.
dedupeSameTextHoursintegerpublicReplyPolicystringOne of
after_dm,always.actionsobject2 child fields
likeCommentbooleanhideCommentboolean
quickRepliesarray of object3 child fields
titlestringrequiredUp to 20 characters.
payloadstringrequiredimageUrlstring (URL)
dmMediaobject2 child fields
typestringrequiredOne of
image,video,audio,file.urlstring (URL)required
audienceobject4 child fields
followerStatusstringOne of
any,follower,non_follower. Defaultany.minFollowerCountintegerAt least 0.
whenUnknownstringOne of
send,skip,verify. Defaultsend.tapToUnlockbooleanDefault
false.
followGateobject4 child fields
messagestringUp to 640 characters.
buttonLabelstringUp to 20 characters.
profileButtonLabelstring1 to 20 characters.
notFollowingMessagestringUp to 1000 characters.
isActivebooleanstatsobject13 child fields
triggeredintegerdmsSentintegerdmsFailedintegeruniqueContactsintegertrackedSendsintegerlinkClicksintegeruniqueClicksintegerdeliveredintegerreadintegeraudienceSkippedintegerfollowGateSentintegerfollowGatePassedintegerfollowGateFailedinteger
createdAtstring (date-time)
{
"success": true,
"automations": [
{
"id": "6bfebd43ddc270f6d2c56fc5",
"name": "Acme",
"platform": "instagram",
"trigger": "comment",
"accountId": "696e0b682d0a31188e7a2ba9",
"platformPostId": "637f799b3039e6602e83fa4f",
"postTitle": "string",
"postId": "6108a2cc742cb4e991051e0c",
"keywords": [
"string"
],
"matchMode": "exact",
"excludeKeywords": [
"string"
],
"typoTolerance": true,
"dmMessage": "Hello from Pozy",
"buttons": [
{
"type": "url",
"title": "Launch day",
"url": "https://pozy.ai/media/example-1.jpg",
"payload": "string",
"phone": "+14155550123"
}
],
"template": {
"type": "generic",
"imageAspectRatio": "horizontal",
"elements": [
{
"title": "Launch day",
"subtitle": "string",
"imageUrl": "https://pozy.ai/media/example-1.jpg",
"buttons": [
{
"type": "url",
"title": "Launch day",
"url": "https://pozy.ai/media/example-1.jpg",
"payload": "string"
}
]
}
]
},
"commentReply": "string",
"dmMessageVariations": [
"Hello from Pozy"
],
"commentReplyVariations": [
"string"
],
"linkTracking": true,
"clickTag": "string",
"dmDelaySeconds": 1,
"commentReplyDelaySeconds": 1,
"alsoMatchInDms": true,
"repeatPolicy": {
"mode": "once",
"cooldownHours": 1
},
"dedupeSameTextHours": 1,
"publicReplyPolicy": "after_dm",
"actions": {
"likeComment": true,
"hideComment": true
},
"quickReplies": [
{
"title": "Launch day",
"payload": "string",
"imageUrl": "https://pozy.ai/media/example-1.jpg"
}
],
"dmMedia": {
"type": "image",
"url": "https://pozy.ai/media/example-1.jpg"
},
"audience": {
"followerStatus": "any",
"minFollowerCount": 42,
"whenUnknown": "send",
"tapToUnlock": false
},
"followGate": {
"message": "Hello from Pozy",
"buttonLabel": "string",
"profileButtonLabel": "string",
"notFollowingMessage": "Hello from Pozy"
},
"isActive": true,
"stats": {
"triggered": 1,
"dmsSent": 1,
"dmsFailed": 1,
"uniqueContacts": 1,
"trackedSends": 1,
"linkClicks": 1,
"uniqueClicks": 1,
"delivered": 1,
"read": 1,
"audienceSkipped": 1,
"followGateSent": 1,
"followGatePassed": 1,
"followGateFailed": 1
},
"createdAt": "2026-10-02T09:00:00.000Z"
}
]
}Errors
Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:
| 400 | invalid_request_error | A parameter or body field is missing or invalid. param names it. |
| 401 | authentication_error | The API key is missing, revoked or expired. |
| 403 | permission_error | The key is scoped to other profiles or has this resource group disabled. |
| 429 | rate_limit_error | Too many requests this minute. Wait for Retry-After seconds. |
Every code is listed in Errors.