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>",
"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>',
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>",
"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": {}
}
}{
"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": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}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. 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>",
"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>',
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>",
"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": {}
}
}{
"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": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Body
Private reply content
Response
Private reply sent
true