> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Use the Decimal API to chat with your AI agent, escalate conversations, and manage tickets and knowledge articles.

The Decimal API puts your AI agent behind your own interface and lets you manage the data it works from. Teams use it to:

* Answer customer questions in their own app, from your knowledge base and code
* Hand a conversation to your helpdesk when the customer needs a person
* List, look up, or delete tickets synced from your helpdesk
* Search, audit, and clean up knowledge articles
* Read audit logs, pull requests, gaps, and automations

## Fundamentals

* The API is REST over HTTPS. Requests and responses are JSON.
* Every request goes to `https://api.getdecimal.ai/v0/...` with a [Bearer token](https://docs.decimal.app/api-reference/authentication.md). Its scopes decide which endpoints it can call.
* Requests are [rate limited](https://docs.decimal.app/api-reference/rate-limits.md) per token and per organization.
* Errors share one [response shape](https://docs.decimal.app/api-reference/errors.md) with a machine-readable `code`.
* List endpoints use [cursor pagination](https://docs.decimal.app/api-reference/pagination.md).
* Endpoints that create something accept an [idempotency key](https://docs.decimal.app/api-reference/idempotency.md), so a retry never sends a message twice.
* Every response has a `Request-Id` header. Include it when you [email support](mailto:support@getdecimal.ai).

## Quickstart

Create a token under **Settings → API Keys** with the `chat:write` and `chat:read` scopes, then send a message:

```bash theme={null}
curl -X POST https://api.getdecimal.ai/v0/chat \
  -H "Authorization: Bearer sk-de-..." \
  -H "Content-Type: application/json" \
  -d '{"message": "How do I configure SSO?"}'
```

The API answers `202 Accepted` right away with a `conversation_id`. The agent works in the background, so poll the conversation until `status` is `completed`:

```bash theme={null}
curl https://api.getdecimal.ai/v0/chat/abc123 \
  -H "Authorization: Bearer sk-de-..."
```

To ask a follow-up, send another message with the same `conversation_id`.

## API playground

Every endpoint page has a **Try it** button. Paste your token into the **Authorization** field, fill in the parameters, and send the request against your workspace. The panel beside it shows the same request as code in several languages.

The playground calls the production API. Deleting a ticket or knowledge article from it can't be undone.

## API families

> [accordion] Chat
>
> The [Chat API](https://docs.decimal.app/api-reference/chat/overview.md) sends a customer's question to your agent and returns its answer with citations. Answers draw on your public knowledge base and code, and follow your [Policies](https://docs.decimal.app/policies.md).

> [accordion] Escalation
>
> The [Escalation API](https://docs.decimal.app/api-reference/escalation/overview.md) hands a conversation to your helpdesk as a ticket, with the transcript and an AI summary.

> [accordion] Tickets
>
> The [Tickets API](https://docs.decimal.app/api-reference/tickets/overview.md) lists tickets synced from your helpdesk, fetches one by Decimal ID or helpdesk ID, downloads its files, and deletes a ticket by helpdesk ID.

> [accordion] Knowledge
>
> The [Knowledge API](https://docs.decimal.app/api-reference/knowledge/overview.md) lists, searches, and deletes the articles your agent answers from.

> [accordion] Audit logs
>
> The Audit logs API lists who did what in your organization. Requires audit logs on your plan.

> [accordion] Pull requests
>
> The Pull requests API lists and reads pull requests from your connected repositories.

> [accordion] Gaps
>
> The Gaps API lists and reads the changes Decimal proposes to your knowledge base, docs, and code.

> [accordion] Automations
>
> The Automations API lists and reads your automation definitions, triggers, and run history.

> [accordion] Utility
>
> [Check a token's](https://docs.decimal.app/api-reference/utility/get-current-token-info.md) name, scopes, and organization.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.