---
title: Call Total API over HTTP
project: Total API
version: 2026
section: guides
language: en
license: 
url: https://totaljs.es/docs/total-api/2026/guides/call-over-http/
updated: 2026-11-19T06:09:14.885Z
---

# Call Total API over HTTP

> Call any service from any language with a POST request, your token and a JSON body.

Every service is a `POST` request to its own address. Any language or tool that sends HTTP requests can use Total API.

## The request

| Part | Value |
| --- | --- |
| Method | `POST` |
| Address | `https://api.totaljs.com/{service}/`, for example `https://api.totaljs.com/weather/` |
| Header `Content-Type` | `application/json` |
| Header `X-Token` | Your token |
| Body | The data of the service as JSON |

```bash
curl -X POST https://api.totaljs.com/weather/ \
	-H "Content-Type: application/json" \
	-H "X-Token: YOUR_TOKEN" \
	-d '{ "value": "Bratislava" }'
```

## The answer

- **Success:** status `200` and the result: JSON, or the file itself for the services that create files ([print](../../reference/documents-and-images/#print) and [convert](../../reference/documents-and-images/#convert)).
- **Error:** status `400` and a JSON array with the message:

```json
[{ "error": "Invalid token" }]
```
