---
title: "List diagrams"
method: GET
path: "/diagrams"
tags: ["Diagrams"]
---

# List diagrams

`GET /diagrams`

## Request

- Base URL: `https://api.drawsql.app/v1`
- URL: `https://api.drawsql.app/v1/diagrams`
- Auth: HTTP bearer

Cursor-paginated list of the diagrams visible to the token, newest
activity first. Rate limit: 60 requests/minute per token.

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

A page of diagrams.

- object
  - `data` Diagram[], required
    - `uuid` string, uuid, required
    - `name` string, required
    - `slug` string, required
    - `description` string, nullable, required
    - `team` object, required
      - `name` string, required
      - `slug` string, required
    - `table_count` integer, nullable, required: Null while `status` is `importing` — the tables are not known yet.
    - `url` string, uri, required: Absolute canonical URL of the diagram.
    - `embed_url` string, uri, required: Absolute embeddable URL of the diagram.
    - `updated_at` string, date-time, nullable, required: ISO 8601 timestamp of the last update.
    - `status` 'ready' | 'importing' | 'failed', required: `ready` for every diagram made in the app. Diagrams created from SQL DDL through the API are `importing` until the import finishes.
    - `error` object, nullable, required: Why the import failed. Null unless `status` is `failed`.
      - `code` string, required
      - `message` string, required
  - `meta` CursorMeta, required
    - `next_cursor` string, nullable, required: Cursor for the next page, or `null` on the last page.
    - `has_more` boolean, required: Whether another page is available.

## Other responses

- `401`: Missing, malformed, expired, or revoked token (code `unauthenticated`), or a valid token whose team no longer exists or whose user is no longer a member of that team (code `invalid_token`).
- `403`: The token's team is not on a paid plan (code `plan_required`), or the token is not allowed to perform this action (code `forbidden`).
- `422`: A query parameter failed validation.
- `429`: Too many requests.

---

[API](https://skmtc.dev/drawsql/apis/drawsql-api.md) - [All operations](https://skmtc.dev/drawsql/apis/drawsql-api/llms.txt) - [OpenAPI document](https://skmtc.dev/drawsql/apis/drawsql-api/revisions/8b333e0bae67?raw)
