Reply to a message
Replies to the message's Reply-To address, or its sender, in the same thread and from the thread's endpoint.
Replies to the message's Reply-To address, or its sender, in the same thread and from the thread's endpoint. The server sets the recipients, subject, and threading headers. The body's channel must match the thread's. On a phone channel the reply goes to the number on the other side of the thread. On WhatsApp, free-form text needs the customer's 24-hour service window to be open, and a closed window is refused (422, WhatsAppServiceWindowClosedError) rather than converted; send an approved template with templateId instead.
apiKeyx-api-key<token>id*string^mbx_[0-9a-hjkmnp-tv-z]{16,24}$messageId*string^msg_[0-9a-hjkmnp-tv-z]{16,24}$idempotency-key?stringOptional key that makes a mailbox send idempotent for the calling key or member. Repeating the request with the same key and body returns the original action in its current state. Keep the key after a lost response. Reusing it with different content returns 409. Active actions retain their key; terminal receipts remain replayable for 24 hours.
^[\s\S]{1,255}$application/json- body
channel?|nullcc?array<string>|nullbcc?array<string>|nulltext?string|nullhtml?string|nullattachments?array<>|nullMailboxSendReceipt
application/json- response
actionId*MailboxActionId^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$draftId*|nullmessageId*|nullthreadId*|nullstate*string"approvalRequired""queued""accepted""completed""notSent""uncertain"acceptedAt*string|nullwaitReason*|nullreviewExpectedAt*string|nullskippedRecipients*array<>executeUntil*string|nullretryAt*string|nullproblem*|nullretryEligible*booleandecision*|nullcreatedAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.mailboxes.reply({
"id": "example",
"messageId": "example"
});{
"actionId": "string",
"draftId": "string",
"messageId": "string",
"threadId": "string",
"state": "approvalRequired",
"acceptedAt": "string",
"waitReason": "rate",
"reviewExpectedAt": "string",
"skippedRecipients": [
{
"address": "string",
"reason": "bounce",
"topicId": "string"
}
],
"executeUntil": "string",
"retryAt": "string",
"problem": {
"code": "string",
"message": "string",
"error": {
"_tag": "SenderNotReadyError",
"message": "string",
"sender": "string",
"retryAfterSeconds": 0
}
},
"retryEligible": true,
"decision": {
"id": "string",
"reviewRound": 1,
"requirement": "run",
"decider": "rule",
"outcome": "allow",
"reason": "string",
"scopes": [
{
"kind": "organization",
"id": "string"
}
],
"rule": {
"scope": {
"kind": "organization",
"id": "string"
},
"index": 0
},
"guard": "string",
"guardReason": "string",
"resolution": {
"by": "string",
"at": "string",
"as": "approved",
"diff": {
"text": {
"before": "string",
"after": "string"
},
"html": {
"before": "string",
"after": "string"
}
}
}
},
"createdAt": "string",
"updatedAt": "string"
}