# API overview

The base URL, the request format, the OpenAPI description and every operation of the Summonmade API.


The Summonmade API does everything that the website dashboard does. People, agents and scripts use the same API and the same accounts.

## Base URL

```text
https://summonmade.com/api/v1
```

## Format

- Requests and answers are JSON (`application/json`), except file uploads and downloads.
- A file upload sends the raw file as the body. A file download answers with the raw file.
- Times are ISO 8601 strings in UTC, for example `2026-12-03T09:30:00.000Z`.
- An error answers with a problem document (`application/problem+json`). See [Errors](/docs/api/errors).

## Authentication

Send an API key in the `Authorization` header: `Authorization: Bearer sm_…`. The website uses a session cookie. See [Authentication](/docs/api/authentication).

## Descriptions

| Address | What it holds |
| --- | --- |
| `https://summonmade.com/openapi.json` | The OpenAPI 3.1 description of every operation: paths, fields, limits and answers. |
| `https://summonmade.com/.well-known/api-catalog` | The API catalog (RFC 9727), with links to the description. |

The router, the request checks and the OpenAPI description come from one declaration of each operation. So the description always matches the API.

## Operations

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | `/catalog` | [List the processes, materials and finishes](/docs/api/orders#the-catalog). No key needed. |
| `GET` | `/orders` | [List the orders](/docs/api/orders#list-orders) in your account. |
| `POST` | `/orders` | [Start an order](/docs/api/orders#create-an-order) as a draft. |
| `GET` | `/orders/{id}` | [Read an order](/docs/api/orders#read-an-order), with the assembly guide and the history. |
| `PUT` | `/orders/{id}` | [Change an order](/docs/api/orders#change-an-order) before payment. |
| `PUT` | `/orders/{id}/files/{name}` | [Upload a file](/docs/api/orders#upload-a-file) to a draft order; Summonmade checks it. |
| `GET` | `/orders/{id}/files/{name}` | [Download a file](/docs/api/orders#download-a-file) of an order. |
| `DELETE` | `/orders/{id}/files/{name}` | [Remove a file](/docs/api/orders#remove-a-file) from a draft order. |
| `POST` | `/orders/{id}/submit` | [Send a draft to the quote](/docs/api/orders#submit-an-order). |
| `POST` | `/orders/{id}/pay` | [Get the payment page](/docs/api/orders#pay-for-an-order) of a quoted order. |
| `POST` | `/orders/{id}/cancel` | [Cancel an order](/docs/api/orders#cancel-an-order) before payment. |
| `POST` | `/orders/{id}/messages` | [Write a message](/docs/api/orders#messages) on an order. |
| `GET`, `PUT` | `/orders/{id}/instructions` | [Read or write the assembly guide](/docs/api/orders#the-assembly-guide). |
| `GET`, `POST` | `/webhooks` | [List or add webhooks](/docs/api/webhooks) for the changes of your orders. |
| `DELETE` | `/webhooks/{id}` | [Delete a webhook](/docs/api/webhooks#list-and-delete-webhooks). |
| `POST` | `/agents/sign-up` | [Sign up as an agent](/docs/api/agents#sign-up) and get an API key. |
| `POST` | `/agents/claim` | [Send the email](/docs/api/agents#claim) of the person who claims the account. |
| `POST` | `/agents/claim/verify` | [Send the code](/docs/api/agents#verify-the-claim) from that email. |

## First request

List the orders of your account:

```sh tab="curl"
curl https://summonmade.com/api/v1/orders \
  -H "Authorization: Bearer $SUMMONMADE_API_KEY"
```

```js tab="JavaScript"
const response = await fetch("https://summonmade.com/api/v1/orders", {
  headers: { Authorization: `Bearer ${process.env.SUMMONMADE_API_KEY}` },
});
const { orders } = await response.json();
```

```python tab="Python"
import os
import requests

response = requests.get(
    "https://summonmade.com/api/v1/orders",
    headers={"Authorization": f"Bearer {os.environ['SUMMONMADE_API_KEY']}"},
)
orders = response.json()["orders"]
```

The answer:

```json
{ "orders": [] }
```

## The order flow

1. Start an order with `POST /orders`. It starts as a `draft`.
2. Upload each file with `PUT /orders/{id}/files/{name}`.
3. Send it to the quote with `POST /orders/{id}/submit`. The status becomes `quoting`.
4. Read it with `GET /orders/{id}`. When the quote is ready, the order gets a payment link for the person.
