# Thermolinks SMS API v1 docs

The RESTful API allows developers to expand and build their apps on Matrix. The API makes it easy to send messages to one or many destinations, check balance and routing, as well as *enabling bulk messaging*.

SMS Messages can be transmitted using the RESTful API, the following requirements must be met to enable the service:

> * You need a Matrix user account
> * You need sufficient credit on your Matrix user account

#### Services

The Services resource represents all web services currently available via Thermolinks’s RESTful API.

<table><thead><tr><th width="109.33333333333331">Method</th><th width="179">Service</th><th>Description / Notes</th></tr></thead><tbody><tr><td>POST</td><td><a href="#send-a-single-message">/api/v1/send</a></td><td>Send a single message to one destination address.</td></tr></tbody></table>

### Authentication

Services having the **/api/** path (such as [Send a single message](https://smsapi-docs.thermolinks.com/broken-reference)) require authentication using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication) which transmits Matrix account credentials .

Example:

```
curl -X GET -H 'Authorization: apikey_Zm9vOmJhcg==' http://sms-api.thermolinks.com/api/v1/balance
```

We have passed the base64 encoded credentials through the **Authorization** header, ‘*Zm9vOmJhcg==*’ is the encoded username:password pair (‘*foo:bar*’), you can use any [tool](https://www.base64encode.org/) to base64 encode/decode.

If wrong or no authentication credentials are provided, a **401 Unauthorized** error will be returned.

### Send a single message

Send a single message to one destination address.

Definition:

```
https://sms-api.thermolinks.com/api/v1/send
```

Examples:

```
curl -X POST -H 'Authorization: Basic Zm9vOmJhcg==' -d '{
  "to": 19012233451,
  "from": "Thermolinks",
  "message": "Hello",
  "dlr-url": "http://yoururl/dlr_receiver.php",
  "external-id": "<your external id>"
}' https://sms-api.thermolinks.com/api/v1/send
```

Note

Do not include **API Key** in the parameters, they are already provided through the [Authorization header](https://smsapi-docs.thermolinks.com/broken-reference).

Result Format:

```
{"data": "Success \"c723d42a-c3ee-452c-940b-3d8e8b944868"}
```

If successful, response header HTTP status code will be **200 OK** and the message will be sent, the *message id* will be returned in **data**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smsapi-docs.thermolinks.com/thermolinks-sms-api-v1-docs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
