API

API docs

The TODAY SMS API is a JSON API over HTTPS. Send your API key in the Authorization header with every request. Prices, refunds and the 20-minute wait time are the same as on the website. Choose a method from the list to see request and response samples.

Create your API key on the API key page once your first top-up is credited. Replace YOUR_API_KEY in the samples below with your own key.

GET

/balance

Get balance

Returns your account's current balance in US dollars. Receiving codes and sending SMS use the same balance.

Parameters

No parameters.

Sample request

request
$ curl https://today-sms.com/api/v1/balance \
  -H "Authorization: Bearer YOUR_API_KEY"

Sample response

response
{
  "balance": "42.5000",
  "currency": "USD"
}

Possible errors

unauthorizedAPI key is missing or wrong
not_allowedThe API opens after your first top-up is credited
rate_limitedToo many requests in 1 minute