Messages
Numbers

Send an SMS from a number

Changed on

Queues an SMS from one of the caller's numbers that can send. Replaying an Idempotency-Key with the same payload returns the original message, reusing it with a different payload returns 422. 409 capability_unavailable: this number cannot send right now. 422 invalid_recipient / unsupported_destination / body_too_long: the recipient or text does not fit the number. 429 daily_limit_reached: the rolling 24 h limit for the account is used up; 429 rate_limited: too many sends by the owner in a short window; 429 number_rate_limited: too many outbound sends from this number in the configured window (all sends from this number count, including those made on your behalf). 403 send_disabled: self-service SMS send is switched off.

post/numbers/phones/{id}/messages

Request

  • Base URL
    https://api.mobilerun.ai
  • URL
    https://api.mobilerun.ai/numbers/phones/{id}/messages
  • Auth
    HTTP bearer

Path parameters

idstring uuid required
Example:550e8400-e29b-41d4-a716-446655440000

Headers

idempotency-keystring

Idempotency-Key: 1-255 printable ASCII characters. Same key with a different request body is a 422 idempotency_key_reused. A retryable in-flight duplicate is a 409 with Retry-After and x-should-retry: true; a terminal duplicate is a 409 with x-should-retry: false. A replay returns the current resource state with Idempotent-Replayed: true.

Example:b3f6a9f0-6f1a-4e9a-9e7a-9c9b6b6a5a3f

Request body

tostring required

Recipient phone number, as E.164 or a US 10/11-digit number. Destinations the number cannot send to are rejected with 422 unsupported_destination, non-numbers with 422 invalid_recipient.

bodystring required

SMS body text, up to 1600 characters (longer bodies are rejected with 400). A number's own limit may be lower and is answered 422 body_too_long.

deliveryReportboolean

Deprecated: best effort and ignored on most lines. Hosted SIM numbers return no carrier delivery report, so their messages end at sent and no sms.send.delivered event follows. Defaults to false.

Example request

{
  "to": "+15551230001"
}

Response

Outbound message queued

Changes