Errors

The Flowroute API returns both an HTTP Status Code and a JSON body with each error. The status in the error will match the HTTP Status Code that is returned and the title and detail fields will give more context to the error. You can give the id to Flowroute Support and they will be able to retrieve details about the error from our logs.

Error Fields

  • detail
    string

    An expanded explanation of why your API request was unsuccessful.

  • id
    UUID

    Unique identifier associated with the API request that generated the error.

  • status
    integer

    HTTP Status code related to the error.

  • title
    string

    HTTP Short description of what error was encountered.

Error Codes

  • 400

    Bad Request – Some aspect of the request was unprocessable.

  • 401

    Unauthorized – There was an issue with your API credentials.

  • 403

    Forbidden – You don't have permission to access this resource.

  • 404

    Not Found – The specified resource does not exist.

  • 405

    Method Not Allowed – You tried to use an unsupported HTTP method.

  • 415

    Unsupported Media Types – The server refuses to accept the request because the payload format is in an unsupported format. The format problem might be due to the indicated Content-Type in the request, or as a result of inspecting the data directly.

  • 422

    Unprocessable Entity – You tried to enter an incorrect value. For example, Messages v2.1 returns this message if you attach a file in your MMS message that exceeds our size limit: "Error fetching media: File at "" is over 767840 byte limit."

  • 429

    Too Many Requests – You have sent too many requests at a given time and need to slow down how often you’re querying the API. Rate limits are defined per API endpoint, check with your sales representative for the right limits for your use case.

  • 500

    Internal Server Error – We had a problem with our server. Try again later.

  • 503

    Service Unavailable – We’re temporarily offline for maintanance. Please try again later.

            

Example Request

curl https://api.flowroute.com/v2.1/messages \
  accessKey:secretKey \
  -X POST \
  -H "Content-Type: application/json" \
  -d {"from": "12065555555","to: "18444205780", "media_urls":["https://example.com/images/e/e4/Joker_0026.jpg/"]}

            

Example Responses

415 Unsupported Media Type

{
  "errors": [
    {
      "detail": "Client Error: Must set Content-Type header to `application/vnd.api+json`",
      "id": "f135987c-acf6-40e5-98af-48f7651910bc",
      "status": 415,
      "title": "Unsupported Media Type"
    }
  ]
}

            

422 Unprocessable Entity

{
  "errors": [
    {
      "detail": "Error fetching media: File at \"https://s3-us-west-2.amazonaws.com/testing/1503617641_12067392634\" is over 767840 byte limit.",
      "id": "8f20a349-ebc0-4246-81ae-b4e7caef324c",
      "status": 422
    }
  ]
}