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

# API introduction and authentication for Chamelio

> Overview of the Chamelio external API, including authentication, base URLs, request patterns, and how to integrate contract data, workflows, and webhooks.

The Chamelio External API provides programmatic access to core platform functionality:

* **Retrieve organization information** - Access details about your organization and configuration
* **Manage documents in Knowledge Center** - Programmatically upload documents and update their attributes
* **Manage workflows** - List, initiate, and monitor workflow execution
* **Control tasks** - Get task status, approve, cancel, and manage task operations
* **Handle files** - Download files and documents associated with workflows
* **Ask the agent and search** - Hand plain-language questions to the Chamelio Agent and search across workflows, contracts, and files (OAuth apps only)
* **Receive webhooks** - Subscribe to real-time event notifications for documents, vault files, workflows, and tasks
* **Integrate with your systems** - Connect Chamelio with your existing tech stack

## Base URL

All API requests should be made to:

```
https://platform.chamelio.ai
```

## Choose your access model

Chamelio offers two ways to authenticate, and they behave differently. Pick the one that matches
what you are building before you write any code - the credential you use determines the base path,
the permissions that apply, and who your calls are attributed to.

> [card] [API Keys](https://docs.chamelio.ai/api-reference/api-keys.md)
>
> A single organization-wide credential. Every call has full access to everything in the
> organization. Best for trusted server-to-server integrations you control end to end.

> [card] [OAuth Apps](https://docs.chamelio.ai/api-reference/oauth-apps.md)
>
> A registered application that acts on behalf of a specific user, limited to the scopes that user
> consented to. Best for applications used by more than one person, or where a call should never
> reach data its user cannot see.

### How they compare

| | API Keys | OAuth Apps |
| - | - | - |
| **Credential** | `X-API-Key: ca_...` | `Authorization: Bearer ...` |
| **Base path** | `https://platform.chamelio.ai` | `https://platform.chamelio.ai/v2` |
| **Acts as** | The organization | The user who granted access |
| **Access** | Everything in the organization | Only what the granting user may reach |
| **Permission granularity** | None - full access | Per-resource scopes, granted at consent time |
| **How access is limited** | Not limited; guard the key itself | Scopes on the token, plus the user's own permissions |
| **Attribution** | The key's creator | The user behind the token |
| **Revocation** | Revoke the key | Revoke a single token, or delete the application |
| **Rate limiting** | Per API key | Per organization |
| **Best for** | Back-office jobs, ETL, single-tenant automation | Multi-user products, per-user integrations, least-privilege access |

> [!TIP]
>
> The two models are independent, not layered. An API key is rejected on `/v2` paths, and an OAuth
> access token is rejected on the API-key paths. Follow one section end to end.

## Getting Started

**1. Pick an access model**

Read [API Keys](https://docs.chamelio.ai/api-reference/api-keys.md) or [OAuth Apps](https://docs.chamelio.ai/api-reference/oauth-apps.md) and choose
based on the comparison above.

**2. Get a credential**

Generate an API key, or register an OAuth application and complete a token request.

**3. Verify it works**

Call `GET /users/org-info` with an API key, or `GET /v2/users/user-info` with an access token.
Both are read-only and confirm your credential resolves to the right organization.

**4. Start integrating**

Work through the endpoints in your section's navigation group.

## MCP Server (beta)

To connect an AI assistant such as Claude instead of writing code, use the Chamelio MCP server. It
handles OAuth for you.

> [card] [MCP Server (beta)](https://docs.chamelio.ai/api-reference/mcp/overview.md)
>
> Connection details, scopes, and the full tool reference for MCP clients

## Webhooks

Webhooks are independent of the access model you choose.

> [card] [Webhooks Overview](https://docs.chamelio.ai/api-reference/webhooks/introduction.md)
>
> Subscribe to real-time event notifications for documents, vault files, workflows, and tasks

## Support

For questions about the API or integration support, contact our team at [support@chamelio.ai](mailto:support@chamelio.ai).
