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

# GraphQL API

> The same reads as the MCP tools, as GraphQL operations.

The API is GraphQL at one address:

```text theme={null}
POST https://api.taskadmin.ai/graphql
```

Send an [API key](https://docs.taskadmin.ai/guides/api-keys.md) as a bearer token.

```sh theme={null}
curl -s https://api.taskadmin.ai/graphql \
  -H "Authorization: Bearer $TASKADMIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ apiKeyContext { orgName agents { id name } retentionDays } }"}'
```

```json theme={null}
{
  "data": {
    "apiKeyContext": {
      "orgName": "Example Dental",
      "agents": [{ "id": "3f2c1d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f", "name": "Front desk" }],
      "retentionDays": 60
    }
  }
}
```

## What a key can call

Seven queries, all reads. See [operations](https://docs.taskadmin.ai/api/operations.md).

Every other operation answers `API keys cannot do this`. That includes every mutation.

## Conventions

* **Dates** are ISO 8601 strings in UTC. `startDate` and `endDate` are required where they appear. A range can be at most 731 days.
* **Pages** start at 0. `pageSize` is at most 100, or 25 when messages are included.
* **IDs.** Agent IDs are UUIDs. Conversation IDs are strings.
* **Roles in messages.** `USER` is the visitor. `ASSISTANT` is the agent.
* **Visitor conversations only.** A key reads the public chat. It never gets the internal staff chat, and the `internalFilter` argument has no effect for a key.
* **Introspection is off.** This reference is the list of what a key can call.

## Fields a key gets empty

`ipAddress`, `userAgent`, `model`, token counts and cost come back `null`. `visitorId` comes back as an empty string. The agent's `prompt`, `tools` and keys come back `null`. See [security and privacy](https://docs.taskadmin.ai/security.md).


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