Common API usage

Base URL

All paths referenced for MessageBird services in the API references uses the following base URL:

https://api.bird.com/

Base media URL

All paths referenced for retrieving media uses the following base URL:

https://media.api.bird.com

Authentication

In order to authenticate HTTP requests with an access key, you must provide it in the Authorization HTTP header with the following format. Replace <access-key> with your valid access key.

Authorization: AccessKey <access-key>

Authorization

Access key Authorization is determined by the access roles attached to your access key

Formats and Headers

All HTTP responses are in JSON. It's advised to send the Accept HTTP header with the value application/json with each request. Both POST and PUT requests to the API must contain a JSON-formatted payload in the request body.

Errors

MessageBird uses standard HTTP status codes to indicate success or failure of API requests.

  • HTTP response codes in the 2xx range indicate the request was successfully processed

  • HTTP response codes in the 4xx range indicate that there was a client error - for example: authentication error, not enough balance or wrong/missing parameters. Don't worry, the HTTP response body includes a JSON-formatted response that tells you exactly what went wrong. If you're stuck, feel free to contact support, we're happy to help you out

  • HTTP response codes in the 5xx range indicate a server error. It's considered safe to retry the same request, preferably with a delay

Last updated