Authorization: Bearer <communityApiKey>. Keep the key server-side. A browser session token is not a Community API key. Required permission: replyMessage.messageId is the incoming message being answered. sender is the existing community user whose identity the agent acts as.incomingMessage.id from GET /v1/messages into messageId. Set sender to the configured identity of the agent posting the reply.Authorization: Bearer <communityApiKey> server-side. Required permission: replyMessage. With a Community API key, sender is required.GET /v1/messages?channel_id=<channelObjectId>&count=25. For one returned item:item.id to messageId;item.user.user_id and item.user.email as incoming-author context;sender.{
"messageId": "<incomingMessage.id>",
"message": "I can help with that. What account detail should I check?",
"sender": "community-agent@example.com"
}sender to incomingMessage.user.user_id: numeric user ID is not accepted in this field. Do not use the incoming user's email unless the integration is intentionally and legitimately acting as that same user. A normal-channel reply does not need a recipient; messageId selects the thread.POST /v1/users/info with incomingMessage.user.user_id or email and read data.username. This lookup is optional and does not change the target message.recipient rules and are not returned by GET /v1/messages.| Status/message | Recovery |
|---|---|
400 Sender field is required | Set the configured agent user's email or exact username. |
404 User not found | Correct sender; display name and numeric/storage IDs do not work. |
| 401/403 | Check the key, replyMessage, actor identity, and channel access. |
messageId selects the target; sender selects the actor. Do not set sender to incomingMessage.user.user_id. Display names and MongoDB _id values are also unsupported sender forms.messageId.curl --location 'https://api.returning.ai/v1/messages/reply' \
--header 'Authorization: Bearer <communityApiKey>' \
--header 'Content-Type: application/json' \
--data-raw '{
"messageId": "<incomingMessage.id>",
"message": "I can help with that. What detail should I check?",
"sender": "community-agent@example.com"
}'{
"status": "success",
"message": "Message reply successfully"
}