The Xanti API for developers

Do you want to connect your own program or import to your website? Everything you do with items in the admin, a program can also do through the Xanti API. This page is for developers.

Getting started

  1. Ask Telartis for a user in the API group with an API policy. For an automatic link, use a separate user, for example Import job, with only the permissions and folders that are needed.
  2. Make an API token for that user (see Making and revoking an API token).
  3. Open the API description on your own website: https://www.example.com/api/openapi. This is an OpenAPI 3.1 description of all endpoints, with their parameters. You don't need a token for it.
  4. Test the token with the whoami endpoint:
curl -H "Authorization: Bearer xt_..." https://www.example.com/api/whoami

You get back the user, the permissions and the endpoints this token may use.

Good to know

  • The API works over https only. Reading uses GET, writing uses POST with a JSON body.
  • Every response is JSON with error, message and result. On an error there is also a code, such as not_found or forbidden. Check error and code, not the text of message: that is in the language of the website.
  • The program works with the permissions of the token's user, within the token's Scopes and the API policy.
  • A deleted item goes to the trash. You restore it with item_restore.
  • With item_update, send the modified value you read. If someone else changed the item in the meantime, nothing is saved.
  • Every call is listed under Statistics > API.

Do you still use the old export functions export_query, export_obj or export_answer with a shared key? They also work with an API token with read. For this, the user must also be a webmaster. These exports are not in /api/openapi.

Connecting an AI assistant through MCP? See Connecting an AI assistant. The MCP address is /api/mcp.

See also

  • Making and revoking an API token
  • Connecting an AI assistant
  • Working safely with an AI assistant

Checked: November 2026