Get a message
Returns a message by its ID: addresses, subject, status, and why it is waiting when it is. Per-recipient delivery state and the body are their own reads.
GET
Returns a message by its ID: addresses, subject, status, and why it is waiting when it is. Per-recipient delivery state and the body are their own reads.
apiKeyheader
x-api-key<token>id*stringMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$Message
application/json- response
id*MessageIdMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$campaign?|nullchannel*stringValue in
"sms""whatsapp""email"direction*stringValue in
"outbound""inbound"status*stringValue in
"pending""scheduled""queued""processing""sent""delivered""read""failed""bounced""complained"from*|nullto*array<>cc*array<>bcc*array<>replyTo*array<string>subject*string|nullconversationId*|nullinReplyToMessageId*|nulltags*array<string>metadata*|nullisTest*booleanscheduledAt*string|nullsubmission*|nullwaitReason*|nullreviewExpectedAt*string|nullskippedRecipients*array<>createdAt*stringupdatedAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.messages.get({ "id": "example"});Example Response
{ "id": "string", "campaign": { "campaignId": "string", "runId": "string" }, "channel": "sms", "direction": "outbound", "status": "pending", "from": { "address": "string", "name": "string" }, "to": [ { "address": "string", "contactId": "string" } ], "cc": [ { "address": "string", "contactId": "string" } ], "bcc": [ { "address": "string", "contactId": "string" } ], "replyTo": [ "string" ], "subject": "string", "conversationId": "string", "inReplyToMessageId": "string", "tags": [ "string" ], "metadata": { "property1": "string", "property2": "string" }, "isTest": true, "scheduledAt": "string", "submission": { "origin": "direct", "transport": "http", "credential": { "kind": "api_key", "apiKeyId": "string" }, "userId": "string", "client": { "surface": "typescript-promise", "version": "string" } }, "waitReason": "rate", "reviewExpectedAt": "string", "skippedRecipients": [ { "address": "string", "reason": "bounce", "topicId": "string" } ], "createdAt": "string", "updatedAt": "string"}