Spanish Total.js
English
Documentation For AI agents
Contents

Call Total API over HTTP

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

.md Website
On this page

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

The request

PartValue
MethodPOST
Addresshttps://api.totaljs.com/{service}/, for example https://api.totaljs.com/weather/
Header Content-Typeapplication/json
Header X-TokenYour token
BodyThe data of the service as JSON
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 and convert).
  • Error: status 400 and a JSON array with the message:
[{ "error": "Invalid token" }]
Made in Europe