curl --request POST \
--url https://api.social-api.ai/v1/inbox/comments/{postId}/{commentId}/private-reply \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"attachment": {
"source": "https://cdn.example.com/guide.pdf",
"source_type": "url",
"type": "file"
},
"buttons": [
{
"payload": "VIEW_ORDER",
"title": "View order",
"type": "url",
"url": "https://shop.example.com/orders/1"
}
],
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '<string>',
attachment: {source: 'https://cdn.example.com/guide.pdf', source_type: 'url', type: 'file'},
buttons: [
{
payload: 'VIEW_ORDER',
title: 'View order',
type: 'url',
url: 'https://shop.example.com/orders/1'
}
],
text: '<string>'
})
};
fetch('https://api.social-api.ai/v1/inbox/comments/{postId}/{commentId}/private-reply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/inbox/comments/{postId}/{commentId}/private-reply"
payload = {
"account_id": "<string>",
"attachment": {
"source": "https://cdn.example.com/guide.pdf",
"source_type": "url",
"type": "file"
},
"buttons": [
{
"payload": "VIEW_ORDER",
"title": "View order",
"type": "url",
"url": "https://shop.example.com/orders/1"
}
],
"text": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Send a private reply to a commenter
Sends a direct message to the author of a comment. Only supported on Instagram and Facebook. Meta allows one private reply per comment, within 7 days of the comment; a second attempt or an expired window returns HTTP 400 with error code platform.instagram.private_reply_ineligible or platform.facebook.private_reply_ineligible. Once a comment has spent its one reply, or the comment is older than 7 days, further attempts are refused and do not count against your outbound message rate; the error carries a reason of already_replied, platform_refused or window_expired. The 400 is terminal: retrying it will never succeed. Set buttons (1 to 3) to send the reply as a button template with text as its body; a tap on a postback button arrives as a dm.postback event. Set attachment instead of text to send one image, video, audio or file: a private reply is a single message, so it carries either text (with optional buttons) or one attachment, never both. You cannot message the commenter again until they respond; once they do, the conversation continues within the standard 24-hour messaging window. Check the can_private_reply capability flag.
curl --request POST \
--url https://api.social-api.ai/v1/inbox/comments/{postId}/{commentId}/private-reply \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "<string>",
"attachment": {
"source": "https://cdn.example.com/guide.pdf",
"source_type": "url",
"type": "file"
},
"buttons": [
{
"payload": "VIEW_ORDER",
"title": "View order",
"type": "url",
"url": "https://shop.example.com/orders/1"
}
],
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
account_id: '<string>',
attachment: {source: 'https://cdn.example.com/guide.pdf', source_type: 'url', type: 'file'},
buttons: [
{
payload: 'VIEW_ORDER',
title: 'View order',
type: 'url',
url: 'https://shop.example.com/orders/1'
}
],
text: '<string>'
})
};
fetch('https://api.social-api.ai/v1/inbox/comments/{postId}/{commentId}/private-reply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/inbox/comments/{postId}/{commentId}/private-reply"
payload = {
"account_id": "<string>",
"attachment": {
"source": "https://cdn.example.com/guide.pdf",
"source_type": "url",
"type": "file"
},
"buttons": [
{
"payload": "VIEW_ORDER",
"title": "View order",
"type": "url",
"url": "https://shop.example.com/orders/1"
}
],
"text": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
},
"request_id": "01HZ9X3Q4R5M6N7P8V2K0W1J"
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Body
Private reply content
Attachment sends one image, video, audio or file as the private reply, instead of text. Leave text and buttons empty when you set it.
Show child attributes
Show child attributes
Buttons renders a button template (1-3 buttons); uses text as the bubble body.
Show child attributes
Show child attributes
Response
Private reply sent
true