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

# Updating Dittofeed's API Docs

We maintain a copy of the OpenAPI spec for the production API in the docs package - `packages/docs/open-api.json`. The following page describes how to update this file.

This schema is used to generate the API reference docs.

## Updating `packages/docs/open-api.json`

Run the following command to copy the OpenAPI / Swagger spec to the docs package:

```bash theme={null}
curl "https://app.dittofeed.com/documentation/json" | jq "." > packages/docs/open-api.json
```

Note this command assumes you have [jq](https://stedolan.github.io/jq/) installed, which formats the JSON output from the API server.

## Adding New Endpoints to the Docs

Run the following command to add new endpoints to the docs:

```bash theme={null}
npx @mintlify/scraping@latest openapi-file packages/docs/open-api.json --outDir packages/docs/api-reference/auto
```

Then add the new endpoints to the [mint.json](https://github.com/dittofeed/dittofeed/blob/main/packages/docs/mint.json) file.

```json mint.json theme={null}
{
  "group": "API Reference",
  "pages": [
    "api-reference/auto/content/get-apiadmincontenttemplates",
    ...
  ]
}
```

## Running the Docs Locally

cd into docs directory

```bash theme={null}
cd packages/docs
```

Run the mintlify dev server.

```bash theme={null}
mintlify dev
```
