# API reference

Every route of Texa's APIs, with its parameters, its answers and examples in cURL, Python and JavaScript.


Texa has one API for Texa AI and a family of APIs for Texa Desk. Pick by what you're building.

| API | Base URL | Authenticates with | For |
|---|---|---|---|
| [Texa API](/api-reference/texa-api) | `https://api.texadesk.com/v1` | `Authorization: Bearer texa_live_…` | Texa AI in your own software: conversations, events, actions, voice, widgets |
| [Texa Desk Application API](/api-reference/desk) | `https://desk.texadesk.com/api/v1` | `api_access_token: <a person's or agent bot's token>` | the helpdesk: conversations, messages, contacts, inboxes, teams, reports, settings |
| [Tickets API](/api-reference/desk-texa) | `https://desk.texadesk.com/api/v1` | the same | tickets, their types and states, tasks and reports |
| [Client API](/api-reference/client) | `https://desk.texadesk.com/public/api/v1` | an inbox identifier and a contact identifier | a customer-facing chat on an API inbox |
| [Customer portal API](/api-reference/portal) | `https://desk.texadesk.com/public/api/v1/portals/{slug}/texa` | a portal session | customers' own requests, in your app |
| [Platform API](/api-reference/platform) | `https://desk.texadesk.com/platform/api/v1` | a platform app's token | accounts and people across a [dedicated instance](/hosting/dedicated) |

## OpenAPI documents

Generate a client in any language from these:

- **Texa API:** [https://api.texadesk.com/v1/openapi.json](https://api.texadesk.com/v1/openapi.json), always the live one
  ([a copy here](/openapi/texa-api.json)).
- **Texa Desk**, every family above: [/openapi/texa-desk.json](/openapi/texa-desk.json).

## Conventions

| | Texa API | Texa Desk APIs |
|---|---|---|
| Errors | `{"error": {"type", "code", "message", "field"}}` and `X-Request-Id` ([errors](/api-basics/errors)) | `{"error": "…"}` or `{"message", "errors"}`, a sentence you can show |
| Ids | `cnv_…`, `evt_…`, your own `customer_ref` | numbers; a conversation by its display id, a ticket by its number |
| Times | ISO 8601 | Unix seconds for tickets, ISO elsewhere |
| Lists | cursors, `after` and `next` ([lists](/api-basics/pagination)) | pages, `page` and `meta` |
| Retries | `Idempotency-Key` on any `POST` ([retries](/api-basics/idempotency)) | none: check before you send again |
| Limits | per minute, per environment ([limits](/api-basics/rate-limits)) | per person and address |
