# API reference

REST API v1: JSON over HTTPS. Every method below is open on api.sendsms.to and is checked before every release.

## Base URL

https://api.sendsms.to

## Authentication

Send the key in the X-API-Key header. Keep it on your server only. The key’s permissions decide which methods are available; the account is identified by the key. Requests are accepted only from the IP addresses listed for the key; any other address gets 403 ip_not_allowed.

- [Send an SMS](https://docs.sendsms.to/en/api/send-sms/) — `POST /v1/messages`
- [Message status](https://docs.sendsms.to/en/api/message-status/) — `GET /v1/messages/{id}`
- [Message statuses](https://docs.sendsms.to/en/api/message-statuses/) — `POST /v1/messages/statuses`
- [Batch SMS sending](https://docs.sendsms.to/en/api/batch-send/) — `POST /v1/messages/batch`
- [Scenario event](https://docs.sendsms.to/en/api/scenario-event/) — `POST /v1/scenarios/{id}/events`
- [Scenario event state](https://docs.sendsms.to/en/api/scenario-event-state/) — `GET /v1/scenarios/{id}/events/{eventId}`
- [Create a template](https://docs.sendsms.to/en/api/create-template/) — `POST /v1/templates`
- [List templates](https://docs.sendsms.to/en/api/list-templates/) — `GET /v1/templates`
- [Template variables](https://docs.sendsms.to/en/api/template-variables/) — `GET /v1/templates/variables`
- [Read a template](https://docs.sendsms.to/en/api/get-template/) — `GET /v1/templates/{id}`
- [Update a template](https://docs.sendsms.to/en/api/update-template/) — `PUT /v1/templates/{id}`
- [Archive a template](https://docs.sendsms.to/en/api/archive-template/) — `DELETE /v1/templates/{id}`
- [Preview a template](https://docs.sendsms.to/en/api/preview-template/) — `POST /v1/templates/{id}/preview`
- [List Sender IDs](https://docs.sendsms.to/en/api/list-senders/) — `GET /v1/senders`
- [Read a Sender ID](https://docs.sendsms.to/en/api/get-sender/) — `GET /v1/senders/{id}`
- [Money balance & SMS credits](https://docs.sendsms.to/en/api/balance/) — `GET /v1/balance`
