Skip to main content

Private Reply

POST 

/instagram/page/privateReply

This endpoint allows you to send a direct message private reply (DM) to a user that left a comment on your post.

You are allowed to send a one-time private reply to a person who wrote a public comment on your media post: you can only send one private reply per comment, within 7 days of when it was written.

If the user replies, you can keep chatting with them during a 24-hour open session. You can reply to them directly in Instagram DM, or using the Instagram Messenger API if you connected it.

Settings:

SettingValue
URLhttps://api.99digital.co.il/instagram/page/privateReply
MethodJSON via POST
HeaderYour API key for the service (the apiKey header)

Body:

ParameterDescription / ExampleMandatoryExample
fromThe ID you received for the connectionyes463745743546345
commentIdThe comment ID that was posted on your media post, of which you wish to send the private reply to the visitor (the id of the comment in All Comments)yes652346734563_3463234623
bodyThe private message (DM) you want to send to the visitor that wrote the comment. 1,000 bytes maximum (UTF-8): an English letter, a digit or a space is 1 byte, a Hebrew letter 2 bytes, and an emoji usually 4 bytesyesThank you for the comment! Here are our special deals

Response:

{
"status": "OK",
"commentId": "15234562345623_425235245346",
"from": "463745743546345",
"messageId": "aWdfZG06MTpnaDoxMjM0NTY3ODkwOjM0",
"body": "Thank you for the comment! Here are our special deals",
"timestamp": 1600115719,
"reason": 1
}

Response-Explain:

ParameterDescription
statusOK or FAIL
commentIdThe original commentId provided in the request (the comment you replied to)
messageIdThe DM message ID (the ID of the private message that was sent)
timestampTime stamp of the message
fromYour ID for the service
bodyThe message you wrote

reason:

ValueInformation
1Not FAIL. The status is OK
2Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error
3Wrong apiKey (the apiKey header is missing or wrong)
4commentId is missing (or is not a valid comment ID)
5Missing or invalid content: the 'body' is missing or empty
6Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint)
7The connection is not active (it was disabled)
8The "body" is more than 1,000 bytes long
10You must do the onboarding again, the connection has expired
11A permission is missing: the connection does not have Meta's permission for this action
12Rate limit error. Too many requests. Please wait a few minutes and try again
13The commentId is invalid or wrong: the comment was not found, or it is not accessible
14You already sent a private reply to this comment, or it is more than 7 days old. Meta allows one private reply, within 7 days
15The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content
18General error, try again

Request​

Responses​

The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.