Send a message
Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status.
Sends a message on the requested channel and returns its receipt (id, status, and why it waits when it does) with a 201 Created status. Requires messages:create or the send permission of the channel it sends on, such as email:send. channel selects the payload variant. Repeating an identical request with the same optional Idempotency-Key header returns the original receipt; reusing the key for different content returns a conflict.
apiKeyx-api-key<token>idempotency-key?stringOptional org-scoped key that makes a send idempotent. Repeating a request with the same key and identical payload replays the original 201 response; reusing the key with different content returns 409.
^[\s\S]{1,255}$application/json- body
conversationId?|null|nullmetadata?|nullchannel*"email""email"to*array<|>1 <= itemscc?array<|>|null|nullbcc?array<|>|null|nullfrom?|nullemail*MessageReceipt
application/json- response
id*MessageId^msg_[0-9a-hjkmnp-tv-z]{16,24}$status*string"pending""scheduled""queued""processing""sent""delivered""read""failed""bounced""complained"waitReason*|nullreviewExpectedAt*string|nullskippedRecipients*array<>createdAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.messages.send({ "channel": "email", "to": [ { "contactId": "example" } ], "email": { "subject": "Hello", "text": "Hello from Samva." }});{ "id": "string", "status": "pending", "waitReason": "rate", "reviewExpectedAt": "string", "skippedRecipients": [ { "address": "string", "reason": "bounce", "topicId": "string" } ], "createdAt": "string"}Related documentation
Delete a message
Permanently deletes a message by its ID. Use this endpoint to delete a message through the Samva email API.
Validate an email message
Resolves recipients, sender, and inline or published-template content without sending anything, creating contacts or messages, or counting toward your quota.