Endpoint

POST /messages

Request Parameters

Body Parameters

  • to
    string required

    Valid phone number that you're sending the message to. This number must be compliant with E.164 number standards+12065551234

  • from
    string required

    Flowroute phone number that you're sending the message from. This number must be compliant with E.164 number standards+12065550101

  • body
    string required

    The content of the message to deliver. Depending on the length of your message, it may be broken into multiple fragments which will be reassembled on the receiver's handset. See Message Length & Concatenation for specific information.

  • dlr_callback
    string

    A callback URL that you can configure on a per message basis for delivery receipt updates. Upon sending your SMS, Flowroute will post the delivery receipts to the dlr_callback that you've set. To learn more, see Receive an SMS DLR.

Response Format

On success, the HTTP status code in the response header is 202 Accepted and the response body contains the message record ID with mdr2 prefix. On error, the header status code is an error code and the response body contains an array of error objects.

Response Fields

Upon successful configuration, Flowroute will start posting your inbound SMS messages to your SMS Callback URL. The HTTP status code in the response header is 200 OK and the response body contains a detailed message object in JSON format. If you don't receive the POST notifications, check that your callback service and SMS Callback URL are set up correctly.

  • data
    object

    Message object composed of the following:

    • price_details object - The pricing details of the message sent.

      • base_rate decimal - The base cost per message segment. Unit is USD.

      • charged_cost decimal - The total cost of the message. This is calculate by the following formula: (base_rate + surcharge_rate) * segment_count

      • segment_count int - The SMS industry standard for a single message is 160 characcters as defined in the GSM 03.38 standard

      • surcharge_rate decimal - The surcharge price per segment that the message incurred.

  • id
    string

    ID of the SMS message with the mdr2 prefix.

  • type
    string

    This will always be message.