### Send SMS Request Examples
Source: https://sendoka.com/docs
Examples of how to send an SMS message using different tools and languages. Ensure the Idempotency-Key header is included to prevent duplicate sends.
```bash
curl -X POST https://api.sendoka.com/api/v1/sms \
-H "Authorization: Bearer $SENDOKA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"from": "+15551234567",
"to": "+15559876543",
"body": "Your code is 1234"
}'
```
```javascript
await fetch("https://api.sendoka.com/api/v1/sms", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SENDOKA_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
from: "+15551234567",
to: "+15559876543",
body: "Your code is 1234",
}),
});
```
```python
httpx.post(
"https://api.sendoka.com/api/v1/sms",
headers={
"Authorization": f"Bearer {KEY}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"from": "+15551234567",
"to": "+15559876543",
"body": "Your code is 1234",
},
)
```
```json
{
"from": "+15551234567",
"to": "+15559876543",
"body": "Your code is 1234"
}
```
--------------------------------
### Send a transactional email
Source: https://sendoka.com/docs
Examples for sending an email using different programming environments. Ensure the SENDOKA_API_KEY environment variable is set before execution.
```bash
curl -sS https://api.sendoka.com/api/v1/emails \
-H "Authorization: Bearer $SENDOKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "you@sandbox.sendoka.com",
"to": ["user@example.com"],
"subject": "Hello from Sendoka",
"html": "
It works.
"
}'
```
```javascript
const res = await fetch("https://api.sendoka.com/api/v1/emails", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SENDOKA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
from: "you@sandbox.sendoka.com",
to: ["user@example.com"],
subject: "Hello from Sendoka",
html: "It works.
",
}),
});
const msg = await res.json();
console.log(msg.id);
```
```python
import os, httpx
r = httpx.post(
"https://api.sendoka.com/api/v1/emails",
headers={"Authorization": f"Bearer {os.environ['SENDOKA_API_KEY']}"},
json={
"from": "you@sandbox.sendoka.com",
"to": ["user@example.com"],
"subject": "Hello from Sendoka",
"html": "It works.
",
},
timeout=30,
)
r.raise_for_status()
print(r.json()["id"])
```
--------------------------------
### Send Email API Requests
Source: https://sendoka.com/docs
Examples of how to send an email using various tools and languages.
```bash
curl -X POST https://api.sendoka.com/api/v1/emails \
-H "Authorization: Bearer $SENDOKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Welcome",
"html": "Welcome
"
}'
```
```javascript
await fetch("https://api.sendoka.com/api/v1/emails", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SENDOKA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
from: "hello@yourdomain.com",
to: ["user@example.com"],
subject: "Welcome",
html: "Welcome
",
}),
});
```
```python
httpx.post(
"https://api.sendoka.com/api/v1/emails",
headers={
"Authorization": f"Bearer {KEY}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Welcome",
"html": "Welcome
",
},
)
```
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Welcome",
"html": "Welcome
"
}
```
--------------------------------
### GET /api/v1/tenants/:id
Source: https://sendoka.com/docs
Retrieves details for a specific tenant.
```APIDOC
## GET /api/v1/tenants/:id
### Description
Retrieves information for a specific tenant by its ID.
### Method
GET
### Endpoint
/api/v1/tenants/:id
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the tenant
```
--------------------------------
### GET /api/v1/tenants/:id/usage
Source: https://sendoka.com/docs
Retrieves usage statistics for a specific tenant.
```APIDOC
## GET /api/v1/tenants/:id/usage
### Description
Retrieves usage metrics for a specific tenant.
### Method
GET
### Endpoint
/api/v1/tenants/:id/usage
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the tenant
```
--------------------------------
### Idempotent POST Request
Source: https://sendoka.com/docs
Example of using an Idempotency-Key header to prevent duplicate processing of POST requests.
```bash
curl -X POST https://api.sendoka.com/api/v1/emails \
-H "Authorization: Bearer $SENDOKA_API_KEY" \
-H "Idempotency-Key: welcome:user_12345:signup" \
-H "Content-Type: application/json" \
-d '{ ... }'
```
--------------------------------
### GET /api/v1/emails and /api/v1/sms
Source: https://sendoka.com/docs
Lists messages with support for pagination and filtering by status or tag.
```APIDOC
## GET /api/v1/emails
## GET /api/v1/sms
### Description
Returns a list of messages. Supports pagination and filtering.
### Method
GET
### Endpoint
/api/v1/emails
/api/v1/sms
### Parameters
#### Query Parameters
- **limit** (number) - Optional - 1–100 (default 20)
- **cursor** (string) - Optional - From next_cursor
- **status** (string) - Optional - Filter by status
- **tag** (string) - Optional - Filter by tag
### Response
#### Success Response (200)
- **data** (array) - List of message objects
- **has_more** (boolean) - Indicates if more pages are available
- **next_cursor** (string) - Cursor for the next page
```
--------------------------------
### GET /api/v1/audiences/:id/status
Source: https://sendoka.com/docs
Retrieves the status of an audience send operation.
```APIDOC
## GET /api/v1/audiences/:id/status
### Description
Retrieves the current status of an audience send operation.
### Method
GET
### Endpoint
/api/v1/audiences/:id/status
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the audience.
```
--------------------------------
### GET /api/v1/emails/:id and /api/v1/sms/:id
Source: https://sendoka.com/docs
Retrieves the full message object including delivery status and provider diagnostics for a specific email or SMS.
```APIDOC
## GET /api/v1/emails/:id
## GET /api/v1/sms/:id
### Description
Retrieves the full message object with delivery status and provider diagnostics.
### Method
GET
### Endpoint
/api/v1/emails/:id
/api/v1/sms/:id
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the message.
```
--------------------------------
### POST /api/v1/tenants
Source: https://sendoka.com/docs
Creates a new tenant within the Sendoka platform.
```APIDOC
## POST /api/v1/tenants
### Description
Creates a new tenant for the multi-tenant platform.
### Method
POST
### Endpoint
/api/v1/tenants
### Request Body
- **name** (string) - Required - The name of the tenant
- **slug** (string) - Required - The unique slug for the tenant
- **external_ref** (string) - Optional - An external reference identifier
```
--------------------------------
### Send using a template
Source: https://sendoka.com/docs
Reference a template slug and provide variables to populate the template content.
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"template": "welcome-v2",
"variables": { "name": "Fareed", "plan": "Pro" }
}
```
--------------------------------
### Create tenant JSON payload
Source: https://sendoka.com/docs
The JSON structure required to create a new tenant in the platform.
```json
// Create tenant
{
"name": "Acme Corp",
"slug": "acme",
"external_ref": "cust_12345"
}
```
--------------------------------
### Schedule an email
Source: https://sendoka.com/docs
Include the scheduled_at field in ISO 8601 UTC format to queue a message for a future time.
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Launch day",
"html": "...
",
"scheduled_at": "2026-05-01T12:00:00Z"
}
```
--------------------------------
### Authenticate API Requests
Source: https://sendoka.com/docs
Include the API key in the Authorization header using the Bearer scheme.
```bash
Authorization: Bearer sok_live_your_api_key_here
```
--------------------------------
### POST /api/v1/emails
Source: https://sendoka.com/docs
Sends an email using the Sendoka API. Requires an idempotency key to prevent duplicate requests.
```APIDOC
## POST /api/v1/emails
### Description
Sends an email message. Supports idempotency via the Idempotency-Key header.
### Method
POST
### Endpoint
https://api.sendoka.com/api/v1/emails
### Parameters
#### Headers
- **Authorization** (string) - Required - Bearer $SENDOKA_API_KEY
- **Idempotency-Key** (uuid) - Required - Unique key for request replay protection (valid for 24h)
### Request Example
curl -X POST https://api.sendoka.com/api/v1/emails \
-H "Authorization: Bearer $SENDOKA_API_KEY" \
-H "Idempotency-Key: welcome:user_12345:signup" \
-H "Content-Type: application/json" \
-d '{ ... }'
### Response
#### Error Response (409)
- **IDEMPOTENCY_MISMATCH** - Same key, different body provided.
- **IDEMPOTENCY_IN_FLIGHT** - Request with this key is still processing.
```
--------------------------------
### POST /api/v1/emails/batch
Source: https://sendoka.com/docs
Sends a batch of emails. Supports either an array of individual email objects or a single bulk broadcast object.
```APIDOC
## POST /api/v1/emails/batch
### Description
Sends a batch of emails. Supports per-item arrays for personalized messages or bulk broadcast objects for mass distribution.
### Method
POST
### Endpoint
https://api.sendoka.com/api/v1/emails/batch
### Request Body
- **Array/Object** (mixed) - Required - Either an array of email objects or a single bulk broadcast object.
### Response
#### Success Response (200)
- **data** (array) - List of results per item including index, id, status, and error details.
- **total** (integer) - Total number of messages processed.
- **succeeded** (integer) - Number of successful messages.
- **failed** (integer) - Number of failed messages.
#### Response Example
{
"data": [
{ "index": 0, "id": "msg_...", "status": "sent", "error": null },
{ "index": 1, "id": null, "status": "failed", "error": { "code": "VALIDATION_ERROR", "message": "..." } }
],
"total": 2,
"succeeded": 1,
"failed": 1
}
```
--------------------------------
### Webhook Delivery Headers
Source: https://sendoka.com/docs
Standard headers included with every webhook delivery from Sendoka.
```text
X-Sendoka-Event: message.delivered
X-Sendoka-Delivery-Id: whd_01HN...
X-Sendoka-Signature: t=1713820800,v1=
```
--------------------------------
### Send to an audience
Source: https://sendoka.com/docs
Trigger a bulk send to a pre-defined audience using a template and specified channel.
```json
// POST /audiences/:id/send
{
"from": "news@yourdomain.com",
"template": "newsletter",
"channel": "email"
}
// → 200
{ "audience_id": "aud_...", "queued": 23417, "skipped_suppressed": 112, "status": "queued" }
```
--------------------------------
### POST /api/v1/audiences/:id/send
Source: https://sendoka.com/docs
Initiates a bulk send to an audience.
```APIDOC
## POST /api/v1/audiences/:id/send
### Description
Initiates a bulk send to the specified audience using a template.
### Method
POST
### Endpoint
/api/v1/audiences/:id/send
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the audience.
### Request Body
- **from** (string) - Required - Sender email address.
- **template** (string) - Required - Template slug.
- **channel** (string) - Required - Communication channel (e.g., email).
### Response
#### Success Response (200)
- **audience_id** (string) - The audience ID.
- **queued** (integer) - Number of messages queued.
- **skipped_suppressed** (integer) - Number of suppressed addresses skipped.
- **status** (string) - Current status of the send.
```
--------------------------------
### PATCH /api/v1/tenants/:id
Source: https://sendoka.com/docs
Updates an existing tenant.
```APIDOC
## PATCH /api/v1/tenants/:id
### Description
Updates the details of an existing tenant.
### Method
PATCH
### Endpoint
/api/v1/tenants/:id
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the tenant
```
--------------------------------
### POST /api/v1/audiences
Source: https://sendoka.com/docs
Creates a new audience for bulk sends.
```APIDOC
## POST /api/v1/audiences
### Description
Creates a new audience for bulk sends. Sendoka chunks inserts by serialized byte count and handles suppression lists automatically.
### Method
POST
### Endpoint
/api/v1/audiences
```
--------------------------------
### Batch Response Format
Source: https://sendoka.com/docs
The response provides a per-row status for each item in the batch, including success or failure details.
```json
{
"data": [
{ "index": 0, "id": "msg_...", "status": "sent", "error": null },
{ "index": 1, "id": null, "status": "failed",
"error": { "code": "VALIDATION_ERROR", "message": "..." } }
],
"total": 2,
"succeeded": 1,
"failed": 1
}
```
--------------------------------
### Advanced Email Request Shapes
Source: https://sendoka.com/docs
Various configurations for email requests including templates, scheduling, CC/BCC, attachments, and tracking.
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"template": "order_shipped",
"variables": {
"order_id": "ord_abc123",
"tracking_url": "https://track.example.com/ord_abc123"
}
}
```
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Reminder: appointment tomorrow at 9am",
"html": "...
",
"scheduled_local": "2026-05-19 09:00",
"scheduled_at_tz": "America/New_York"
}
```
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"cc": ["manager@example.com"],
"bcc": ["audit@example.com"],
"reply_to": ["support@yourdomain.com"],
"subject": "Welcome",
"html": "Welcome
"
}
```
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Your invoice",
"html": "See attached.
",
"attachments": [
{
"filename": "invoice.pdf",
"content": "",
"content_type": "application/pdf"
},
{
"filename": "receipt.png",
"url": "https://example.com/receipt.png",
"content_type": "image/png"
}
]
}
```
```json
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Newsletter",
"html": "Visit our site
",
"track_opens": true,
"track_clicks": true,
"tags": ["newsletter"]
}
```
--------------------------------
### List Messages Response Format
Source: https://sendoka.com/docs
The structure of the JSON response returned when listing messages.
```json
{
"data": [ ... ],
"has_more": true,
"next_cursor": "eyIyMDI2..."
}
```
--------------------------------
### Schedule by recipient timezone
Source: https://sendoka.com/docs
Use scheduled_local and scheduled_at_tz to schedule messages based on the recipient's local time.
```json
{
"scheduled_local": "09:00",
"scheduled_at_tz": "America/New_York"
}
```
--------------------------------
### Rate Limit Response Headers
Source: https://sendoka.com/docs
Standard headers included in API responses to communicate current rate limit status and plan details.
```text
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 598
X-RateLimit-Reset: 1713820800
X-RateLimit-Plan: pro
X-RateLimit-Scope: org | key
```
--------------------------------
### POST /api/v1/sms/batch
Source: https://sendoka.com/docs
Sends a batch of SMS messages. Supports either an array of individual SMS objects or a single bulk broadcast object.
```APIDOC
## POST /api/v1/sms/batch
### Description
Sends a batch of SMS messages. Supports per-item arrays for personalized messages or bulk broadcast objects for mass distribution.
### Method
POST
### Endpoint
https://api.sendoka.com/api/v1/sms/batch
### Request Body
- **Array/Object** (mixed) - Required - Either an array of SMS objects or a single bulk broadcast object.
### Response
#### Success Response (200)
- **data** (array) - List of results per item including index, id, status, and error details.
- **total** (integer) - Total number of messages processed.
- **succeeded** (integer) - Number of successful messages.
- **failed** (integer) - Number of failed messages.
#### Response Example
{
"data": [
{ "index": 0, "id": "msg_...", "status": "sent", "error": null },
{ "index": 1, "id": null, "status": "failed", "error": { "code": "VALIDATION_ERROR", "message": "..." } }
],
"total": 2,
"succeeded": 1,
"failed": 1
}
```
--------------------------------
### POST https://api.sendoka.com/api/v1/emails
Source: https://sendoka.com/docs
Sends an email using the Sendoka API. Supports plain text, HTML, templates, attachments, and scheduling.
```APIDOC
## POST https://api.sendoka.com/api/v1/emails
### Description
Sends an email to one or more recipients. Supports various configurations including templates, attachments, and tracking settings.
### Method
POST
### Endpoint
https://api.sendoka.com/api/v1/emails
### Parameters
#### Request Body
- **from** (string) - Required - Sender email (verified domain)
- **to** (string[]) - Required - Recipients (1–50)
- **cc** (string[]) - Optional - CC list
- **bcc** (string[]) - Optional - BCC list
- **reply_to** (string[]) - Optional - Reply-To list
- **subject** (string) - Required - Unless supplied by template
- **html** (string) - Optional - HTML body
- **text** (string) - Optional - Plain text body
- **tags** (string[]) - Optional - Max 10
- **metadata** (object) - Optional - Custom string/number/bool values
- **scheduled_at** (string) - Optional - ISO 8601 UTC, future time
- **attachments** (object[]) - Optional - Max 10, combined ≤ 7 MB inline
- **template** (string) - Optional - Template slug
- **variables** (object) - Optional - {{var}} substitutions
- **track_opens** (boolean) - Optional - Default true
- **track_clicks** (boolean) - Optional - Default true
### Request Example
{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Welcome",
"html": "Welcome
"
}
### Response
#### Success Response (200)
- **id** (string) - Message ID
- **channel** (string) - Channel type
- **status** (string) - Delivery status
- **created_at** (string) - Timestamp of creation
#### Response Example
{
"id": "msg_01HN...",
"channel": "email",
"status": "sent",
"created_at": "2026-04-22T10:14:22.113Z"
}
```
--------------------------------
### DELETE /api/v1/tenants/:id
Source: https://sendoka.com/docs
Deletes a specific tenant.
```APIDOC
## DELETE /api/v1/tenants/:id
### Description
Removes a tenant from the platform.
### Method
DELETE
### Endpoint
/api/v1/tenants/:id
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the tenant
```
--------------------------------
### API Response Structure
Source: https://sendoka.com/docs
The standard JSON response returned by the API upon a successful request.
```json
{
"id": "msg_01HN...",
"channel": "email",
"status": "sent",
"created_at": "2026-04-22T10:14:22.113Z"
}
```
--------------------------------
### Event Notification JSON Structure
Source: https://sendoka.com/docs
The standard JSON envelope format for webhook events sent by the platform.
```json
{
"event": "message.delivered",
"data": {
"message_id": "msg_01HN...",
"channel": "email",
"status": "delivered"
},
"timestamp": "2026-04-22T10:14:22.113Z"
}
```
--------------------------------
### Email Batch Request Shapes
Source: https://sendoka.com/docs
Use the per-item array for personalized emails or the bulk broadcast object for sending the same content to multiple recipients. Bulk broadcast fans out to individual envelopes, ensuring recipients do not see each other.
```json
[
{ "from": "hello@yourdomain.com", "to": ["a@example.com"], "subject": "Personalized 1", "html": "hi 1
" },
{ "from": "hello@yourdomain.com", "to": ["b@example.com"], "subject": "Personalized 2", "html": "hi 2
" }
]
```
```json
{
"from": "hello@yourdomain.com",
"to": ["a@example.com", "b@example.com", "c@example.com"],
"subject": "Newsletter",
"html": "This month's update
",
"reply_to": ["support@yourdomain.com"],
"tags": ["newsletter"],
"metadata": { "campaign": "may_2026" }
}
```
--------------------------------
### POST /api/v1/audiences/:id/contacts
Source: https://sendoka.com/docs
Adds contacts to an existing audience.
```APIDOC
## POST /api/v1/audiences/:id/contacts
### Description
Adds contacts to a specific audience.
### Method
POST
### Endpoint
/api/v1/audiences/:id/contacts
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the audience.
```
--------------------------------
### POST /api/v1/phone-numbers
Source: https://sendoka.com/docs
Registers an alphanumeric sender ID for use in specific countries.
```APIDOC
## POST /api/v1/phone-numbers
### Description
Registers an alphanumeric sender ID for use in specific countries.
### Method
POST
### Endpoint
/api/v1/phone-numbers
### Request Body
- **kind** (string) - Required - Must be "alphanumeric"
- **sender_id** (string) - Required - The alphanumeric sender ID
- **iso_country** (string) - Required - The ISO country code
```
--------------------------------
### SMS Batch Request Shapes
Source: https://sendoka.com/docs
Use the per-item array for personalized SMS or the bulk broadcast object for sending the same message to multiple recipients.
```json
[
{ "from": "+15555550100", "to": "+15555550199", "body": "Personalized 1", "tags": ["promo"] },
{ "from": "+15555550100", "to": "+15555550200", "body": "Personalized 2", "tags": ["promo"] }
]
```
```json
{
"from": "Ezzeefy",
"to": ["+61470594555", "+61470594556", "+61470594557"],
"body": "Sale ends tonight",
"tags": ["promo"],
"metadata": { "campaign": "sale_q2" }
}
```
--------------------------------
### Advanced SMS Request Shapes
Source: https://sendoka.com/docs
Various configurations for SMS requests including templates, scheduling, messaging pools, and MMS with metadata.
```json
{
"from": "+15551234567",
"to": "+15559876543",
"template": "order_shipped",
"variables": {
"order_id": "ord_abc123",
"tracking_url": "https://track.example.com/ord_abc123"
}
}
```
```json
{
"from": "+15551234567",
"to": "+15559876543",
"body": "Reminder: appointment tomorrow at 9am",
"scheduled_local": "2026-05-18 09:00",
"scheduled_at_tz": "America/New_York"
}
```
```json
{
"from_pool": "support",
"to": "+15559876543",
"body": "Your support ticket has an update."
}
```
```json
{
"from": "+15551234567",
"to": "+15559876543",
"body": "Receipt attached. Reply STOP to opt out.",
"media_url": ["https://example.com/receipt.png"],
"tags": ["transactional", "receipt"],
"metadata": {
"order_id": "ord_abc123",
"user_id": "usr_42"
}
}
```
--------------------------------
### Verify Webhook Signature in Node.js
Source: https://sendoka.com/docs
Validates the webhook signature using the provided secret and timestamp to ensure authenticity.
```ts
import { createHmac, timingSafeEqual } from "node:crypto";
function verifyWebhook(rawBody: string, signature: string, secret: string) {
const [tPart, vPart] = signature.split(",");
const t = tPart.split("=")[1];
const v = vPart.split("=")[1];
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) throw new Error("stale");
const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
if (!timingSafeEqual(Buffer.from(v, "hex"), Buffer.from(expected, "hex"))) {
throw new Error("bad signature");
}
return JSON.parse(rawBody);
}
```
--------------------------------
### Standard Error Response Structure
Source: https://sendoka.com/docs
All API errors return a consistent JSON object containing a stable error code and a request ID for support tracking.
```json
{
"error": {
"type": "validation_error",
"code": "VALIDATION_ERROR",
"message": "Subject is required",
"request_id": "req_Hg8JpNvKXWg4f",
"errors": [
{ "path": ["subject"], "code": "invalid_type", "message": "Required" }
]
}
}
```
--------------------------------
### Register Alphanumeric Sender
Source: https://sendoka.com/docs
Register an alphanumeric sender ID for regions like UK, AU, or EU. This must be done before the sender ID can be used in SMS requests.
```json
// Register an alphanumeric sender (UK / AU / EU)
POST /api/v1/phone-numbers
{
"kind": "alphanumeric",
"sender_id": "Acme",
"iso_country": "GB"
}
```
--------------------------------
### POST /api/v1/sms
Source: https://sendoka.com/docs
Sends an SMS message to a specified recipient. Supports E.164 numbers, alphanumeric sender IDs, templates, scheduling, and MMS media.
```APIDOC
## POST /api/v1/sms
### Description
Sends an SMS message to a specified recipient. Supports E.164 numbers, alphanumeric sender IDs, templates, scheduling, and MMS media.
### Method
POST
### Endpoint
https://api.sendoka.com/api/v1/sms
### Parameters
#### Request Body
- **from** (string) - Optional - E.164 sender, or use from_pool
- **from_pool** (string) - Optional - Messaging pool id
- **to** (string) - Required - E.164 (e.g. +15551234567)
- **body** (string) - Required - Max 1600 chars
- **media_url** (string[]) - Optional - MMS media URLs
- **tags** (string[]) - Optional - Max 10
- **metadata** (object) - Optional - Custom key-value pairs
- **scheduled_at** (string) - Optional - ISO 8601 UTC
- **template** (string) - Optional - Template slug
- **variables** (object) - Optional - Substitutions
### Request Example
{
"from": "+15551234567",
"to": "+15559876543",
"body": "Your code is 1234"
}
### Response
#### Success Response (200)
- **id** (string) - Message identifier
- **channel** (string) - Communication channel
- **status** (string) - Current status of the message
- **created_at** (string) - Timestamp of creation
#### Response Example
{
"id": "msg_01HN...",
"channel": "sms",
"status": "sent",
"created_at": "2026-04-22T10:14:22.113Z"
}
```
--------------------------------
### SMS API Response
Source: https://sendoka.com/docs
The standard JSON response returned after a successful SMS submission.
```json
{
"id": "msg_01HN...",
"channel": "sms",
"status": "sent",
"created_at": "2026-04-22T10:14:22.113Z"
}
```
--------------------------------
### DELETE /api/v1/emails/:id
Source: https://sendoka.com/docs
Cancels a scheduled email message.
```APIDOC
## DELETE /api/v1/emails/:id
### Description
Flips a scheduled email message to canceled status.
### Method
DELETE
### Endpoint
/api/v1/emails/:id
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the scheduled email.
```
--------------------------------
### DELETE /api/v1/sms/:id
Source: https://sendoka.com/docs
Cancels a scheduled SMS message.
```APIDOC
## DELETE /api/v1/sms/:id
### Description
Flips a scheduled SMS message to canceled status.
### Method
DELETE
### Endpoint
/api/v1/sms/:id
### Parameters
#### Path Parameters
- **id** (string) - Required - The unique identifier of the scheduled SMS.
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.