---
title: REST API overview
project: OpenTemplates
version: 1.0
section: reference
language: en
license: MIT
url: https://totaljs.es/docs/opentemplates/1-0/reference/rest-api/
updated: 2026-11-19T07:56:22.329Z
---

# REST API overview

> The endpoints your apps call and how to send the token.

Your apps talk to OpenTemplates over HTTP. The address of every endpoint starts with your OpenTemplates address, for example `https://templates.example.com`.

## Endpoints

| Method and path | What it does |
|---|---|
| `POST /` | [Render a template](../render/). |
| `GET /profiles/` | [List the profiles and templates](../profiles/). |
| `GET /download/{id}.{ext}` | Open an [uploaded file](../../guides/files/). Public, no token. |

## Send the token

Every request to `/` and `/profiles/` needs an [API token](../../guides/api-tokens/). Send it in one of two ways:

- in the `x-token` header:

```bash
curl -H "x-token: YOUR_TOKEN" -H "Content-Type: application/json" -d '{"id":"demo/welcome","data":{"name":"Jane Doe"}}' https://templates.example.com/
```

- or as the `token` query argument:

```bash
curl -H "Content-Type: application/json" -d '{"id":"demo/welcome","data":{"name":"Jane Doe"}}' "https://templates.example.com/?token=YOUR_TOKEN"
```

The header keeps the token out of server logs, so prefer it when your app can set headers.

The primary access token of the interface does not work here: use an API token.

## Too many wrong tokens

When one address sends more than five requests with a wrong token, OpenTemplates refuses every request from that address for a while, even with a correct token. The block ends by itself within 15 minutes. Check the token in your app before you try again. See [Errors](../errors/).
