Returning.AIDevelopers
v1

API reference / Messaging

.md

Reply message

Post a reply to one message as an existing member, in the same channel, forum topic or direct conversation.

Last updated 26 Sep 2026API v1

Method
POST
Path
https://api.returning.ai/v1/messages/reply
Permission
replyMessage
Retries
Not idempotent; check Get Messages before retrying

When to use this

  • A trader asks a question in a channel and your support account answers it in the thread.
  • Your system reacts to a message it read with Get Messages and answers that message directly.
  • You reply to a trader's comment in a forum topic.

Authentication#

Header
Authorization: Bearer <API_KEY>
Permission
replyMessageShown in the dashboard as “Reply Message”

Use a Community API key with replyMessage, and keep it on your server. The key decides the community, so never send a community ID. A personal user API key with its own reply permission also works; then the reply is posted as the key's owner.

Behaviour#

The reply goes where the original message is: the same channel, the same forum topic, or the same direct conversation. It appears straight away, posted as sender. The sender earns the usual XP and reply counts, mentioned members are mentioned, and your community's message webhooks fire.

A reply whose text contains a link is handled as a file: the whole message is fetched as a file URL and posted as an attachment. If it can't be fetched, the call fails with 400 Error downloading file. Leave links out of replies.

Request#

Headers#

Authorization#stringREQUIRED
Community API key with replyMessage.

RuleBearer <API_KEY>

Content-Type#stringREQUIRED
Request body format.

Ruleapplication/json

Body#

messageId#stringREQUIRED
The message you are replying to, from data.messages.id in Get Messages.

RuleMessage ID

Eg"66f000000000000000000a21"

sender#stringREQUIRED
The member the reply is posted as, by username or email. Required with a Community API key. With a personal user API key, leave it out to reply as the key's owner.

RuleUsername or email of a member

Eg"support@example.com"

message#stringREQUIRED
The reply text. Mention a member with @username.

RuleAt least 1 character

Eg"Yes, Friday at 14:00 GMT."

recipient#stringOPTIONAL
For a reply in a direct-message channel. The other person's username or email.
curl --request POST \
  --url https://api.returning.ai/v1/messages/reply \
  --header 'Authorization: Bearer <API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "messageId": "66f000000000000000000a21",
    "sender": "support@example.com",
    "message": "Yes, Friday at 14:00 GMT. The link is in the announcements channel."
  }'

Response#

A 200 means the reply was posted. The response has no ID; read the channel with Get Messages to find it.

status#stringALWAYS
Result of the request.

Rulesuccess

message#stringALWAYS
Human-readable summary. Do not branch on it.

Eg"Message reply successfully"

{
  "status": "success",
  "message": "Message reply successfully"
}

Errors#

Validation errors use meta, message, detail and solution, with detail naming the field. Every other error has message, sometimes with status or detail. None has a machine-readable code, so branch on the HTTP status and read message.

Fix the request03

400Fix the request
A field is missing or malformed, such as no messageId, an empty message, or an ID that isn't 24 hex characters (detail names the field). Sender field is required means you used a Community API key without sender. Error downloading file means the text contains a link that couldn't be fetched (see Behaviour). Nothing was posted.
401Fix the request
The key is missing (Invalid token), unknown (Invalid API key) or expired, or it lacks replyMessage (Your API key does not have permission to access this action). Add the permission in Settings > Integration > API Keys.
403Fix the request
The sender can't reply here: a personal user API key whose owner can't post in the channel, or someone who isn't part of the direct conversation. Nothing was posted.

Fix the data01

404Fix the data
message says which: Message not found (check messageId with Get Messages), User not found (no member has that sender), Recipient not found, or Channel not found. Nothing was posted.

Retry with backoff01

500Retry with backoff
The reply failed, or the key could not be checked (Authentication failed). The reply may already be posted, so check Get Messages before you retry.
{
  "meta": {
    "status": "error",
    "statusCode": 400
  },
  "message": "Reply Message Validation validation error.",
  "detail": {
    "messageId": "Required",
    "message": "Required"
  },
  "solution": "Check your body in request and try again"
}

Next step#

Get messagesGET/v1/messagesConfirm the reply is in the channel. This endpoint doesn't return the reply's ID.