Skip to main content

Send a message

POST 

/messages

Send a message with a Phone Number, Alphanumeric Sender ID, Short Code or Number Pool.

This endpoint allows you to send a message with any messaging resource. Current messaging resources include: long-code, short-code, number-pool, and alphanumeric-sender-id.

Request

Body

Message payload

    from address

    Sending address (+E.164 formatted phone number, alphanumeric sender ID, or short code).

    Required if sending with a phone number, short code, or alphanumeric sender ID.

    messaging_profile_id string

    Unique identifier for a messaging profile.

    Required if sending via number pool or with an alphanumeric sender ID.

    to addressrequired

    Receiving address (+E.164 formatted phone number or short code).

    text string

    Message body (i.e., content) as a non-empty string.

    Required for SMS

    subject string

    Subject of multimedia message

    media_urls url[]

    A list of media URLs. The total media size must be less than 1 MB.

    Required for MMS

    webhook_url url

    The URL where webhooks related to this message will be sent.

    webhook_failover_url url

    The failover URL where webhooks related to this message will be sent if sending to the primary URL fails.

    use_profile_webhooks boolean

    Default value: true

    If the profile this number is associated with has webhooks, use them for delivery notifications. If webhooks are also specified on the message itself, they will be attempted first, then those on the profile.

    type string

    Possible values: [SMS, MMS]

    The protocol for sending the message, either SMS or MMS.

    auto_detect boolean

    Automatically detect if an SMS message is unusually long and exceeds a recommended limit of message parts.

Responses

200: Successful response with details about a message.

default: Unexpected error

Callbacks

Loading...