> For the complete documentation index, see [llms.txt](https://developer.ecall-messaging.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.ecall-messaging.com/api-references/rest-api.md).

# REST API

Use the eCall REST API to build SMS, Whatsapp and RCS messaging into your app.

Send messages over JSON and HTTPS.

Track delivery status.

Receive webhook events and inbound SMS.

### At a glance

* Base URL: `https://rest.ecall.ch`
* API style: REST over JSON and HTTPS
* Authentication: HTTP Basic Authentication
* Supports: SMS messaging, RCS messaging, status queries, media upload, and webhooks

{% hint style="info" %}
Enable the REST interface in the eCall portal under **Interfaces → Overview** before you start.
{% endhint %}

### Core features

* Send SMS, Whatsapp and RCS messages.
* Send to one recipient or many recipients in one request.
* Query delivery status for up to seven days.
* Receive webhook events for status changes and inbound SMS and Whatsapp.
* Upload media for rich RCS and Whatsapp messages.

### When to use this interface

* You need an SMS API for a backend, integration, or automation workflow.
* You need an RCS API with rich content and uploaded media.
* You want webhook-based delivery tracking and inbound SMS handling.

### What this REST API supports

The eCall REST API supports SMS messaging, Whatsapp messaging, RCS messaging, delivery status queries, media upload, and webhook-based event handling.

Use it for single-message sends, batch sends, and inbound SMS forwarding.

The API is provided by **F24 Schweiz AG**.

Use this base URL:

```
https://rest.ecall.ch
```

The connection uses **TLS 1.2** or **TLS 1.3**.

Plain HTTP is not supported.

### Authentication

Send every request with an `Authorization` header.

Use **HTTP Basic Authentication**.

```
Authorization: Basic <base64(username:password)>
```

Use either of these credential types:

* Your eCall account credentials
* A dedicated API sub-user from **Interfaces → Overview**

### API versioning

Two API versions are available.

Target a version in the URL path or request header.

If you omit the version, the default is `v1`.

This default can change in later updates.

| Version          | Released     | Changes vs. v1                                                                                           |
| ---------------- | ------------ | -------------------------------------------------------------------------------------------------------- |
| **v1** (default) | `2023-02-02` | –                                                                                                        |
| **v2**           | `2023-12-12` | `GET /api/message/{messageId}` and `POST /api/message` return timestamps in UTC using ISO 8601 with `Z`. |

#### Use the URL path

```
https://rest.ecall.ch/api/v2/message
```

#### Use the request header

```http
X-API-Version: 2
```

Accepted header values:

* `1` or `1.0` for v1
* `2` or `2.0` for v2

### General rules

* JSON field names are **case-insensitive**.
* Enum values are **case-sensitive**.
* Send all text as **UTF-8**.
* Account settings are cached. Changes can apply with a delay.
* Every response includes the `x-f24-request-id` header.

Include `x-f24-request-id` in support requests.

### Notification webhooks

Set `notification.addresses` in a send request to receive status updates.

eCall sends these notifications to your endpoint.

Allow inbound traffic from these source IPs:

* `193.93.208.200`
* `193.93.208.149`
* `193.93.208.153`

Your endpoint must return **HTTP 200 OK**.

### Incoming SMS forwarding

Incoming SMS on a rented eCall number can be forwarded.

eCall sends the message to your HTTP or HTTPS endpoint with `POST`.

Configure the target URL in the portal for the SMS number.

The request schema is documented under `ReceivedMessage`.

The inbound endpoint is `POST /api/webhooks/receivedmessage`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://developer.ecall-messaging.com/api-references/rest-api.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.
