Messages
Send messages and track their delivery lifecycle, the core send endpoint of the Samva API.
messages is the core send resource. Every send, whether you call the SDK's
samva.email.send or post directly, resolves to POST /v1/messages, and the
same resource lets you list messages and follow their delivery lifecycle.
What you can do
- Send a message (
POST /v1/messages). - List and retrieve messages.
- Read content and deliveries, each at its own endpoint, so a list or a status read never carries a body.
- Read email content, retrieve the email projection for an email message.
- Track delivery, fetch a message's current
statusand its full event timeline. - Delete a message record.
Send a message
curl -X POST https://api.samva.dev/v1/messages \
-H "X-API-Key: samva_sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"to": [{ "email": "ada@example.com" }],
"channel": "email",
"email": { "subject": "Welcome to Samva", "html": "<h1>Welcome!</h1>" }
}'A successful send returns 201 with a receipt: the message id, its status, and, when
something holds it, a waitReason. Read the message by id to watch it move through
pending → processing → sent → delivered; its per-recipient deliveries are at
GET /v1/messages/{id}/deliveries and what it says is at GET /v1/messages/{id}/content.
For a runnable walkthrough in curl, Python, Go, and PHP, see Send an email. Shared conventions (auth, status codes, errors, pagination) live in the REST API reference. Per-operation request and response detail is in the sidebar.