Send a message
Send an iMessage, SMS, MMS, or Sendblue App Card to a single recipient. For enabled dedicated and enterprise accounts, omit from_number on ordinary direct sends to preserve an eligible known-contact line or choose an account-owned online line with effective hourly and daily new-contact capacity. An account admin enables Automatic API line selection in the dashboard API settings (Settings > API keys in the Beta Dashboard, or Settings > API Settings in the legacy dashboard). Both dashboards control the same account-wide setting, which defaults off; other accounts keep their existing omitted-sender routing. An eligible saved conversation line stays selected during temporary outages while the contact is still known on that line. Expired offline routes are excluded. Retained replacement lines can only continue contacts known on that same line. Explicit senders remain authoritative. Other sending rules still apply. The accepted response identifies the selected line in from_number and sendblue_number. If all eligible lines reach a new-contact cap, the response is HTTP 400 with status ERROR, body error_code 429, and error_key LINE_HOURLY_LIMIT_REACHED or LINE_DAILY_LIMIT_REACHED. HTTP 429 is reserved for request-rate limiting.
Send a message
curl https://api.sendblue.co/api/send-message \
-H 'Content-Type: application/json' \
-H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
-H "sb-api-secret-key: $SENDBLUE_API_API_SECRET" \
-d '{
"number": "+19998887777",
"content": "Hello, World!",
"from_number": "+19998887777",
"media_url": "https://example.com/image.jpg",
"pre_reply_override": true,
"seat_id": "550e8400-e29b-41d4-a716-446655440000",
"send_style": "celebration",
"status_callback": "https://example.com/webhook"
}'{
"account_email": "user@example.com",
"app_card": {
"appName": "My App",
"extensionBundleId": "com.example.myapp.MessagesExtension",
"layout": {
"caption": "Check this out",
"imageSubtitle": "imageSubtitle",
"imageTitle": "imageTitle",
"imageUrl": "https://example.com",
"subcaption": "Tap to open",
"summary": "summary",
"trailingCaption": "trailingCaption",
"trailingSubcaption": "trailingSubcaption"
},
"teamId": "ABCDE12345",
"url": "https://example.com/deep-link",
"appStoreId": 1234567890,
"fallbackText": "fallbackText",
"interactive": true,
"sessionIdentifier": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updateMessageHandle": "updateMessageHandle"
},
"content": "Hello, World!",
"date_created": "2023-10-01T12:00:00Z",
"date_updated": "2023-10-01T12:00:01Z",
"error_code": 0,
"error_key": null,
"error_message": "error_message",
"from_number": "+19998887777",
"is_outbound": true,
"is_reaction": true,
"location": {
"latitude": 37.7749,
"longitude": -122.4194,
"accuracy": 12,
"altitude": 8,
"duration": "oneHour",
"timestamp": "2026-06-23T12:00:00.000Z"
},
"media_url": "https://cdn.sendblue.co/media/abc123.jpg",
"message_handle": "msg_abc123def456",
"message_type": "message",
"number": "+18887776666",
"reply_to": {
"message_handle": "msg_parent123",
"part_index": 0
},
"seat_id": "550e8400-e29b-41d4-a716-446655440000",
"send_style": "celebration",
"sender_email": "rep@example.com",
"status": "QUEUED",
"thread_originator": {
"message_handle": "msg_root456",
"part": "0:0"
}
}Returns Examples
{
"account_email": "user@example.com",
"app_card": {
"appName": "My App",
"extensionBundleId": "com.example.myapp.MessagesExtension",
"layout": {
"caption": "Check this out",
"imageSubtitle": "imageSubtitle",
"imageTitle": "imageTitle",
"imageUrl": "https://example.com",
"subcaption": "Tap to open",
"summary": "summary",
"trailingCaption": "trailingCaption",
"trailingSubcaption": "trailingSubcaption"
},
"teamId": "ABCDE12345",
"url": "https://example.com/deep-link",
"appStoreId": 1234567890,
"fallbackText": "fallbackText",
"interactive": true,
"sessionIdentifier": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"updateMessageHandle": "updateMessageHandle"
},
"content": "Hello, World!",
"date_created": "2023-10-01T12:00:00Z",
"date_updated": "2023-10-01T12:00:01Z",
"error_code": 0,
"error_key": null,
"error_message": "error_message",
"from_number": "+19998887777",
"is_outbound": true,
"is_reaction": true,
"location": {
"latitude": 37.7749,
"longitude": -122.4194,
"accuracy": 12,
"altitude": 8,
"duration": "oneHour",
"timestamp": "2026-06-23T12:00:00.000Z"
},
"media_url": "https://cdn.sendblue.co/media/abc123.jpg",
"message_handle": "msg_abc123def456",
"message_type": "message",
"number": "+18887776666",
"reply_to": {
"message_handle": "msg_parent123",
"part_index": 0
},
"seat_id": "550e8400-e29b-41d4-a716-446655440000",
"send_style": "celebration",
"sender_email": "rep@example.com",
"status": "QUEUED",
"thread_originator": {
"message_handle": "msg_root456",
"part": "0:0"
}
}