Endpoint

POST /messages

Request Parameters

All request parameters are optional unless otherwise noted.

Body Parameters

  • to
    string required

    Valid phone number that you're sending the message to. This number must be in E.164 format. e.g. +12065551234

  • from
    string required

    Flowroute phone number that you're sending the message from. This must be a number that you own in your Flowroute account in E.164 format. e.g. +12065551234

  • body
    string

    Optional, if media_urls is specified.

    The plain-text content of the message that is counted in the total message size which is currently restricted to 750kB. Depending on the length of your message and if you set it to MMS, your message may be broken into multiple fragments and sent as SMS instead. Read this article for specific information on SMS message length and concatenation.

  • media_urls
    string

    Optional, if body is specified. The publicly accessible URL of the media that you are sending.

  • is_mms
    boolean

    A flag that you can set for sending a text-only MMS without specifying a media_urls.

Response Format

On success, the HTTP status code in the response header is 202 ACCEPTED and the response body contains the messagerecord ID. On error, the header status code is an error code and the response body contains an error object.