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:
| Setting | Value |
|---|---|
| URL | https://api.99digital.co.il/instagram/page/privateReply |
| Method | JSON via POST |
| Header | Your API key for the service (the apiKey header) |
Body:
| Parameter | Description / Example | Mandatory | Example |
|---|---|---|---|
| from | The ID you received for the connection | yes | 463745743546345 |
| commentId | The 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) | yes | 652346734563_3463234623 |
| body | The 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 bytes | yes | Thank 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:
| Parameter | Description |
|---|---|
| status | OK or FAIL |
| commentId | The original commentId provided in the request (the comment you replied to) |
| messageId | The DM message ID (the ID of the private message that was sent) |
| timestamp | Time stamp of the message |
| from | Your ID for the service |
| body | The message you wrote |
reason:
| Value | Information |
|---|---|
| 1 | Not FAIL. The status is OK |
| 2 | Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error |
| 3 | Wrong apiKey (the apiKey header is missing or wrong) |
| 4 | commentId is missing (or is not a valid comment ID) |
| 5 | Missing or invalid content: the 'body' is missing or empty |
| 6 | Wrong 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) |
| 7 | The connection is not active (it was disabled) |
| 8 | The "body" is more than 1,000 bytes long |
| 10 | You must do the onboarding again, the connection has expired |
| 11 | A permission is missing: the connection does not have Meta's permission for this action |
| 12 | Rate limit error. Too many requests. Please wait a few minutes and try again |
| 13 | The commentId is invalid or wrong: the comment was not found, or it is not accessible |
| 14 | You already sent a private reply to this comment, or it is more than 7 days old. Meta allows one private reply, within 7 days |
| 15 | The 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 |
| 18 | General error, try again |
Request
Responses
- 200
The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.