Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.antryk.com/llms.txt

Use this file to discover all available pages before exploring further.

Send transactional SMS messages to users using the Antryk SMS Service. This endpoint allows you to deliver alerts, notifications, reminders, and other time-sensitive messages directly to a user’s mobile device. It is optimized for high deliverability and low latency, making it ideal for real-time communication use cases. Authentication is handled securely via headers, ensuring your API credentials are never exposed in the request body.
curl --request POST \
  --url https://ses.antryk.com/api/v1/sms/send \
  --header "Content-Type: application/json" \
  --header "x-access-key: YOUR_ACCESS_KEY" \
  --header "x-secret-key: YOUR_SECRET_KEY" \
  --data '{
    "to": "+1XXXXXXXXXX",
    "body": "Your appointment is scheduled at 3 PM.",
    "serviceId": "YOUR_SERVICE_ID"
  }'
For Node.js applications, it is recommended to use the official @antryk/sdk. The SDK simplifies SMS sending by handling authentication, validation, retries, and error handling internally.
Authentication is handled via headers (x-access-key, x-secret-key). The request body should only contain SMS-related fields such as recipient number, message body, and service ID.
This is the recommended and modern approach for sending SMS messages:
  • Authentication is passed via headers instead of request body.
  • Request body contains only SMS-related parameters.
  • mproved security and cleaner API design.
  • Easier backend integration and maintenance.
⚠️ The older approach (passing accessKey and secretKey in the request body) may still work for backward compatibility, but it is strongly recommended to migrate to header-based authentication.

Request Parameters

x-access-key
string
required
Your Antryk access key used for API authentication.
x-secret-key
string
required
Your Antryk secret key used to securely authorize requests.
to
string
required
Recipient phone number in E.164 format (e.g. +919876543210). Only one number is supported per request.
body
string
required
The SMS message content. Maximum length is 1600 characters.
serviceId
string
required
UUID v4 identifier of your configured SMS service.
Keep SMS messages concise and clear. Short messages improve readability and delivery performance.
Ensure the phone number is valid and properly formatted. Invalid inputs may result in delivery failure or API errors.

Examples

x-access-key
string
required
Example: YOUR_ACCESS_KEY
x-secret-key
string
required
Example: YOUR_SECRET_KEY
to
string
required
Example: +919876543210
body
string
required
Example: Your verification code is 482193
serviceId
string
required
Example: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx

Additional Notes This endpoint is suitable for transactional messaging

such as alerts, reminders, and confirmations. Avoid sending promotional or spam messages to maintain high deliverability rates. Always protect API credentials and use server-side integrations or the SDK for better security and reliability.

Response

Returns a confirmation that the SMS request has been accepted for delivery.
{
  "success": true,
  "messageId": "msg_5QZ9S6",
  "to": "+1XXXXXXXXXX",
  "queuedAt": "2025-11-06T11:21:00.000Z"
}
Note: When using the SDK, result.data is null for standard SMS send operations.

Error Scenarios

  • 401 invalid credentials – Invalid x-access-key or x-secret-key
  • 400 invalid_recipient – Phone number is missing or incorrectly formatted
  • 404 service_not_foundserviceId missing, revoked, or disabled
  • 429 rate_limited – service exceeds per-minute quota or Too many requests in a short peroid
  • 500 provider_unavailable – upstream SMS provider outage; retry with backoff

Error Response Example

{
  "success": false,
  "errors": [
    {
      "message": "Invalid recipient",
      "code": 400
    }
  ]
}
Always validate phone numbers and throttle retries to avoid rate limiting.