---
title: "Get a diagram"
method: GET
path: "/diagrams/{uuid}"
tags: ["Diagrams"]
---

# Get a diagram

`GET /diagrams/{uuid}`

## Request

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

Metadata for a single diagram. Unknown, malformed, and unauthorized
UUIDs all return an identical `404` (no enumeration signal).
Rate limit: 60 requests/minute per token.

## Path parameters

- `uuid` string, uuid, required

## Response `200`

The diagram.

- object
  - `data` Diagram, required: A diagram's public metadata. Never exposes internal ids or FKs.
    - `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

## 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`).
- `404`: No such diagram, or it is not visible to this token.
- `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)
