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

# Ontology API

> Read the deals, accounts, people, meetings and commitments in your Doris workspace over REST.

The Ontology API is a REST API over the ontology of your workspace. It reads the same data as the [MCP server](/mcp-server). The reference pages in this section list every route and parameter.

|                |                                                |
| -------------- | ---------------------------------------------- |
| Base URL       | `https://server.meetdoris.com/api/v1/ontology` |
| Authentication | `Authorization: Bearer <API key>`              |
| Format         | JSON                                           |

## Create an API key

You must be a workspace admin.

1. In Doris, open **Settings > Workspace > Developer**.
2. In **API Keys**, click **Create Key**.
3. Enter a name for the key, then click **Create**.
4. Copy the key. Doris shows it once only.

A key starts with `sk-live-`. A workspace can have up to 25 keys. To revoke a key, click its delete icon in the list.

## What a key can do

A key works only on routes under `/api/v1/ontology/`.

Keys that you create in the app have the scopes `ontology:read` and `events:read`. With these scopes, a key can call `GET` routes only. `PATCH` and `POST` routes need the `ontology:write` scope. The app does not create keys with that scope.

A key belongs to the workspace, not to a person. A call with a key counts as an agent call. The server refuses any action that can reach a buyer unless a person starts it.

## First request

```bash theme={null}
curl "https://server.meetdoris.com/api/v1/ontology/deal?limit=5&sort=amount:desc" \
  -H "Authorization: Bearer $DORIS_API_KEY"
```

The response has `results`, `total`, `count`, `offset` and `limit`.

To get one deal with related data, use `expand`:

```bash theme={null}
curl "https://server.meetdoris.com/api/v1/ontology/deal/$DEAL_ID?expand=stakeholders,commitments" \
  -H "Authorization: Bearer $DORIS_API_KEY"
```

The response has `record`, one key for each expand key, `_links` and `_meta`.

## Find the types

The types depend on your workspace. Call `GET /types` to list them. Call `GET /types/{type_name}` to get the properties, expand keys, writable fields, actions and measures of one type.

## Limits

* **10,000 requests a day** for each workspace. All keys in a workspace share this quota. The MCP server uses the same quota.
* Each route also has a per-minute limit for each workspace: 300, 120 or 60 requests. Each reference page gives the limit of its route.

When the daily quota is used up, the API returns `429` with the error `quota_exceeded`.

## Errors

An error response has this shape:

```json theme={null}
{
  "error": "unknown_type",
  "message": "Type 'insight' not registered"
}
```

| Status | Example `error` values                                                         |
| ------ | ------------------------------------------------------------------------------ |
| `400`  | `missing_query`, `too_many_expand_keys`, `invalid_request`, `validation_error` |
| `403`  | `forbidden`, `no_tenant`                                                       |
| `404`  | `not_found`, `unknown_type`, `internal_call_restricted`                        |
| `409`  | `conflict`                                                                     |
| `429`  | `quota_exceeded`, `cooldown`                                                   |

## Privacy

Read routes take a `privacy` parameter: `full`, `masked` or `anonymous`. The default is `full`. See [Privacy modes](/privacy).
