Close mobile menu

API Reference

OverviewSMSVoice CallingVoice MessagingConversationsOmnichannel WidgetNumbersPartner AccountsVerifyMMSHLRReportingBalanceLookupContactsGroups

Balance API

MessageBird's Balance API allows you to retrieve your total balance and balance information from your account, such as currency and type of payment (prepaid, postpaid).

You can use the Balance API to expose this information in one of your app or internal dashboards, as well as to send notifications.

The Balance API uses HTTP verbs and a RESTful endpoint structure with an access key that is used as the API Authorization framework. Request and response payloads are formatted as JSON—although we provide a GET alternative for requests—using UTF-8 encoding and URL encoded values.


API Endpoint

All URLs referenced in MessageBird's Balance Messaging API documentation have the base URL in the code snippet on the right side:

API Endpoint

https://rest.messagebird.com/balance

Available HTTP methods

The MessageBird API uses HTTP verbs to understand if you want to read (GET), delete (DELETE) or create (POST) an object. When your web application cannot do a POST or DELETE, we provide the ability to set the method through the query parameter _method.

Available HTTP methods

GET /balance


The balance object

This object represents your balance at MessageBird.com

Attributes

AttributeTypeDescription
paymentstringYour payment method. Possible values are: prepaid & postpaid
typestringYour payment type. Possible values are: credits, euros, pounds & dollars. For all other supported currencies, an ISO-4217 code is returned.
amountfloatThe amount of balance of the payment type. When postpaid is your payment method, the amount will be 0.

Balance object example

{
"payment": "prepaid",
"type": "euros",
"amount": 103
}

Get your balance

Retrieves your MessageBird balance.

Example request

curl -X GET https://rest.messagebird.com/balance \
-H 'Authorization: AccessKey test_gshuPaZoeEG6ovbc8M79w0QyM'

Returns

Returns a balance object if the request was successful. If the request failed, an error object will be returned.

Blance object example

{
"payment": "prepaid",
"type": "euros",
"amount": 103
}
Next upLookup

Questions?

We’re always happy to help with code or other doubts you might have! Check out our Quickstarts, API Reference, Tutorials, SDKs, or contact our Support team.

Cookie Settings