Skip to main content
POST
This endpoint allows you to send SMS messages through one of your AI assistants. The system automatically determines which telephony provider (Twilio, Telnyx, or Vonage) to use based on the assistant configuration associated with the from_phone_number.

How It Works

  1. Assistant Lookup: The system identifies the assistant based on the from_phone_number
  2. Provider Selection: Automatically uses the assistant’s configured telephony provider
  3. Queue or Send: Either queues the message (with rate limiting) or sends immediately
  4. Response: Returns success status with message ID, provider, and delivery status
Multi-Provider Support: Your assistants can use different telephony providers. The system automatically routes SMS messages through the correct provider based on which assistant owns the phone number.

Request Body

Basic Request

With All Options

Queue vs Immediate Send

When queue: true (default):
  • Messages are queued and sent with rate limiting
  • Helps avoid carrier throttling
  • Better for bulk sends
  • Returns status: "queued"

Idempotency

The idempotency_key parameter prevents duplicate messages when retrying failed requests:
Header Alternative: You can also provide the idempotency key via the Idempotency-Key header. If both are provided, the header takes precedence.

Response

A successful request returns a 200 OK status with details about the message.

Response Fields

For queued messages, message_id is Burki’s queue UUID. After delivery, use the status endpoint to inspect the provider’s message ID when available.

Error Responses

400 Bad Request

Returned when the request is malformed or contains invalid data.
Common causes:
  • Missing required fields (from_phone_number, to_phone_number, message)
  • Invalid phone number format (must be E.164)
  • Empty message content
  • Message exceeds 1600 characters

403 Forbidden

Returned when the authenticated user does not own the assistant or phone number used as from_phone_number.

404 Not Found

Returned when no assistant is found for the specified from_phone_number.

500 Internal Server Error

Returned when the telephony provider fails to send the message.

Use Cases

Customer Service Follow-up

Send follow-up messages after customer service calls:

Appointment Reminders

Send automated appointment reminders with idempotency:

Bulk Notifications (Queued)

For sending many messages, use the queue to avoid rate limits:

Document Sharing (MMS)

Send documents or images via MMS:

Authentication

This endpoint requires authentication. Include your API key in the request headers:

Rate Limits

SMS sending is subject to rate limits imposed by the underlying telephony providers:
  • Twilio: Varies by account type and message volume
  • Telnyx: Varies by account configuration
  • Vonage: Varies by account type
Provider Limits: Each telephony provider has its own rate limits and restrictions. Use the queue: true option (default) to let Burki handle rate limiting automatically.

Best Practices

Phone Number Format

Always use E.164 format for phone numbers:
  • Correct: +1234567890
  • Incorrect: (123) 456-7890, 123-456-7890, 1234567890

Idempotency Keys

Use meaningful idempotency keys that include:
  • The type of message (e.g., order, appointment, alert)
  • A unique identifier (e.g., order ID, appointment ID)
  • The specific action (e.g., confirmation, reminder)
Examples:
  • order:12345:confirmation
  • appointment:789:reminder:24h
  • chat:session123:msg:456:outbound

Message Content

  • Keep messages concise and clear
  • Include clear call-to-action when needed
  • Respect opt-out requests and regulatory requirements
  • Consider character limits for international SMS

Error Handling

Always handle potential errors in your code:

Integration Examples

Node.js

Python

PHP

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for sending SMS through an assistant.

from_phone_number
string
required

Sender phone number (must be assigned to an assistant)

to_phone_number
string
required

Recipient phone number in E.164 format (e.g., +1234567890)

message
string
required

SMS message content

Maximum string length: 1600
media_urls
string[] | null

Optional list of media URLs for MMS

queue
boolean
default:true

If True (default), queue the SMS with rate limiting. If False, send immediately.

idempotency_key
string | null

Optional idempotency key (e.g., 'chat:123:msg:456:outbound'). If provided, Burki will dedupe based on this key to prevent duplicate sends/persistence on retries. Can also be provided via Idempotency-Key header (header takes precedence).

Maximum string length: 256

Response

Successful Response

Response model for send SMS endpoint.

success
boolean
required
message
string
required
message_id
string | null
provider
string | null
status
string | null

Message status: 'queued', 'sent', 'failed'