> For the complete documentation index, see [llms.txt](https://docs.quadratichq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quadratichq.com/developer-api.md).

# Developer API

## Developer API

The Quadratic Developer API lets you programmatically create and edit spreadsheets: write cells, run code, import files, manage sheets, and read results. Use it to integrate Quadratic into data pipelines, internal tools, and scheduled jobs.

### Authentication

Create an API token from your team settings under **API tokens**. Tokens are team-scoped and shown once at creation — store them like passwords.

Pass the token in the Authorization header:

```
Authorization: Bearer qdx_live_...
```

### What you can do

| Area                | Capabilities                                                                                        |
| ------------------- | --------------------------------------------------------------------------------------------------- |
| Files               | List, get, create, and import files                                                                 |
| Sheets              | Add, rename, delete, duplicate, reorder, color, freeze panes                                        |
| Cells               | Get/set values, code cells (Python, JavaScript, SQL, Formula), rerun code, formats, borders, merges |
| Tables              | Create data tables, convert ranges, column settings                                                 |
| Rows & columns      | Insert, delete, resize                                                                              |
| Validations         | List, add, remove                                                                                   |
| Conditional formats | Get and update                                                                                      |
| Search & context    | File outline, cell data, text search                                                                |
| History             | Undo, redo                                                                                          |
| Connections         | List connections and fetch database schemas                                                         |

Files cannot be deleted through the API — deletion stays in the app.

### Client libraries

Generated TypeScript and Python client libraries are available, so you can call the API with typed methods instead of raw HTTP.

### Developer API vs. MCP

Both surfaces expose the same underlying operations. Use the **Developer API** for deterministic automation from your own code; use the MCP server when an AI agent should operate Quadratic on your behalf.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.quadratichq.com/developer-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
