/send when you only need to send a 1:1 text message to a phone number. Use Create a chat when you need a durable chat.id, attachments by URL, or chat history. Use Create a group for group chats.
Request
Response
Fields
| Field | Required | Notes |
|---|---|---|
phone | Yes | Recipient in E.164 format, for example +14155551234. |
body | Yes | Text to send. Blank lines split into separate iMessage bubbles. |
idempotency_key | No | Safe retry key. Reusing the same key and body returns the original response. |
name | No | Optional lead display name. |
external_id | No | Your CRM or application record id. |
phone_line_id | No | Send from a specific assigned sender line. If it differs from the current pin, Chert allows the send and re-pins future sends to that line. |
attachments | No | Array of attachment references (see below). |
effect | No | Apple send-effect name (see Effects). |
Attachments
/send accepts three reference shapes interchangeably. Upload first via POST /api/v1/attachments, then reference the returned attachment_id:
| Rule | Detail |
|---|---|
Mixing url + attachment_id in one entry | Rejected with 1011; the response includes attachment_index so you know which entry to fix. |
URL refs on /send | Not accepted — /send rejects { "url": "..." } references with 1011. Use POST /api/v1/chats for URL-fetch flows. |
live_photo: true | Pairs an uploaded HEIC with its companion MOV so the recipient gets a real Live Photo. |
Malformed attachments array | Returns 1002 INVALID_FIELD. |
Effects
Set"effect": "<name>" to attach an Apple send-effect (the same fullscreen / bubble effects you get from Messages on iOS). Effects are whitelist-validated upstream — an unknown value returns 4098 UNKNOWN_EFFECT with the full allowed_effects array in the error body, so callers can self-discover the current set.
Behavior
| Case | What happens |
|---|---|
| First send to a recipient | Chert creates a lead and pins a sender line. |
| Follow-up to the same recipient | Chert reuses the pinned line by default. Passing phone_line_id can switch to another assigned sender line. |
| Duplicate body within the dedup window | Chert can return duplicate without sending again. |
| Delivery failure | /send uses a legacy flat error shape (top-level status, code, message, retryable, trace_id). Branch on retryable. |
Common errors
| Code | When |
|---|---|
1002 | Malformed attachments array. |
1011 | Attachment reference mixes url and attachment_id, or url ref on /send. Includes attachment_index. |
4002 | Phone lines saturated for this recipient. |
4098 | Unknown effect; response carries allowed_effects. |
4099 | Feature not supported in this context. |

