Send a message
| Field | Required | Description |
|---|---|---|
from | Yes | The line handle to send from |
to | Yes | Recipient phone number or Apple ID |
text | Yes | Message text |
Track delivery
Register a webhook formessage.sent and your server will receive a POST when
the message is delivered:
| Status | Meaning |
|---|---|
pending | Queued for delivery |
claimed | Being processed |
sent | Delivered |
failed | Delivery failed (check the error field) |
Errors
| Status | Code | Cause |
|---|---|---|
| 400 | missing_required_parameter | Missing from, to, or text |
| 401 | missing_api_key | No Authorization header |
| 403 | insufficient_scope | Key lacks messages:write scope |
| 403 | line_not_accessible | Key can’t access this line |
| 404 | line_not_found | Invalid line handle |
| With the SDK, errors are thrown as typed exceptions: |