Zindex Auth API

API key management

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /v1/auth/keys Create a new API key #
DELETE /v1/auth/keys/{id} Revoke an API key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zindex-ai:zindex-ai-auth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zindex-ai-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Zindex Auth API
  description: 'Immutable diagrams for AI agents. Agents save diagrams to Zindex as structured scenes in the Diagram Scene Protocol (DSP), with stable element IDs, and change them with typed operations. Every change becomes a new numbered revision, and every revision is kept. Agents can read any revision by number or by date and diff any two. Zindex validates scenes, computes layout, and renders to SVG or PNG. No model runs inside Zindex. Validation, layout and rendering are deterministic code. ## Recommended Agent Workflow


    1. **Save** - `POST /v1/diagrams` with a DSP scene document, or Mermaid, and your own `key`. Returns the diagram''s ID and revision 1. 2. **Change incrementally** - `POST /v1/diagrams/{id}/revisions` with `baseRevision` and operations (or edited Mermaid). An edit that changes the diagram makes the next immutable revision; one that changes nothing returns `noop`. An edit whose operations fail, or whose revision would break a rule the diagram didn''t break, saves nothing. Every save returns `warnings` for the revision it made: the diagram family''s rules it breaks, what drawing it noticed, and notes on what an edit changed besides what its operations named. 3. **Render** - `GET /v1/images/{id}@{revision}.svg` (or `.png`) for one version''s image. The first REST version, `/v1/scenes`, is retired: every path answers 410 with `code: "MOVED"` and the `method` and `path` that replace it. This persistence-first workflow gives you revision history, incremental editing without regenerating the full scene, and visual diff between revisions - so agents edit one diagram over time instead of regenerating it from scratch on every prompt. ## Worked Examples


    Worked examples ship at https://zindex.ai/examples/ (er-diagram-from-migrations, pr-architecture-diff, aws-architecture-from-terraform, gcp-architecture-from-terraform, deploy-pipeline-from-github-actions, compliance-pii-flow, multi-agent-workflow, api-dependency-map, living-architecture-docs, layered-architecture-from-codebase, public-interfaces-for-security-review, request-flow-from-handler). Every example exposes `/examples/.scene.json` (canonical scene), `.ops.json` (typed-op envelope), `.workflow.json` (agent recipe), `.diff.json` (sample revision diff), `.svg` (rendered), and `.md` (markdown summary) - fetch directly. Showcase examples (er-diagram-from-migrations, pr-architecture-diff, aws-architecture-from-terraform, gcp-architecture-from-terraform, deploy-pipeline-from-github-actions, public-interfaces-for-security-review, request-flow-from-handler) additionally expose `.before.svg` for the revision diff''s before picture. The manifest at https://zindex.ai/examples/index.json lists them for programmatic discovery. ## Auto-Layout


    Auto-layout is the default: omit `layout` from nodes and the engine computes node positions, edge routing, and label placement. `diagramFamily` decides how it places nodes, and the optional `layoutStrategy` sets the direction and spacing of the layered layout that architecture, flowchart, workflow, entityRelationship and uiflow diagrams use. Put `diagramFamily`, `layoutStrategy` and `palette` at the scene-document root (alongside `schemaVersion`, `scene`, `elements` - NOT nested inside `scene.scene`). Nested inside `scene.scene`, they are moved to the root before the scene is checked, and stored there. Nodes keep their positions after the first save unless one of these applies, and the edit''s `changed.moved` lists each node that only moves or is saved at a new size:

    - A node that grows pushes the nodes in its way. - A new node whose edge label needs more room than the column it joins pushes that column along the flow too. - A node an edit inserts in a flowchart, between two placed nodes, goes on the first one''s line, and what lies past it moves along the flow. A new node on a decision''s no exit goes beside the decision instead. In a flowchart with a frame that has no `layout`, new nodes are placed as in other families.'
  version: 10.6.0+build.5202
  contact:
    name: Zindex
    url: https://zindex.ai
servers:
- url: https://api.zindex.ai
  description: Production
tags:
- name: Auth
  description: API key management
paths:
  /v1/auth/keys:
    post:
      tags:
      - Auth
      summary: Create a new API key
      description: Creates a new API key for the authenticated person, once their email is verified (403 `EMAIL_NOT_VERIFIED` before then). It acts in the workspace the request acts in, and a key made with a key gets a scope no wider than its own. The key is returned in plaintext only once - store it securely. Use a descriptive name to identify the key's purpose (e.g., 'Production', 'Claude Desktop', 'Cursor').
      operationId: createApiKey
      security:
      - bearerAuth: []
      - apiKeyHeader: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 64
                  description: 'A descriptive name for this key to identify its purpose. Examples: ''Production API'', ''Claude Desktop'', ''Cursor'', ''Development''. If omitted, the key has no name (null).'
                  examples:
                  - Production API
                  - Claude Desktop
                  - Cursor
                  - Local Development
                expiresInDays:
                  type:
                  - integer
                  - 'null'
                  minimum: 1
                  maximum: 366
                  description: 'Number of days until the key expires. Integer in [1, 366] inclusive (covers a leap year), or null/omitted for a key that never expires. After expiry, requests with this key return 401 with code ''API_KEY_EXPIRED''. Default: null (never expires) - matches the agent-host integration pattern where the key lives in a long-lived MCP config file.'
                scope:
                  type: string
                  enum:
                  - write
                  - read
                  description: 'write: read, change, share and report diagrams. read: read only. Default write when the caller can write, else read.'
      responses:
        '201':
          description: API key created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  key:
                    type: string
                    description: The API key (shown only once). Prefixed with dsp_sk_
                  ownerId:
                    type: string
                  workspaceId:
                    type: string
                    description: 'The workspace the key acts in: the one the request acted in'
                  scope:
                    type: string
                    enum:
                    - write
                    - read
                  name:
                    type:
                    - string
                    - 'null'
                  expiresAt:
                    type:
                    - string
                    - 'null'
                    format: date-time
                    description: ISO-8601 UTC timestamp when the key expires, or null if it never expires. Echoes the server-computed expiry from the request's expiresInDays (now + N days). Used by clients to display 'Expires on YYYY-MM-DD' in their UI.
                required:
                - id
                - key
                - ownerId
                - workspaceId
                - scope
                - expiresAt
        '400':
          description: 'INVALID_EXPIRES_IN_DAYS: expiresInDays isn''t an integer from 1 to 366 or null. INVALID_REQUEST: name isn''t text of at most 64 characters, or scope isn''t write or read.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                    - INVALID_EXPIRES_IN_DAYS
                    - INVALID_REQUEST
                required:
                - error
                - code
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: 'PLAN_LIMIT_EXCEEDED: the workspace has reached its plan''s `apiKeys` limit (Free 3, Pro 10, Team 10 for each owner and member, at least 2 seats'' worth), or a viewer already holds 3 keys in it (`maximumAllowed: 3`); `error` states the limit and the count. READ_ONLY: `write` asked for without write access (a read key, or a viewer); `reason` says which. EMAIL_NOT_VERIFIED: the account''s email isn''t verified yet; `error` links to https://zindex.ai/verify-email/.'
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PlanLimitExceededError'
                - $ref: '#/components/schemas/DiagramError'
        '429':
          $ref: '#/components/responses/RateLimited'
  /v1/auth/keys/{id}:
    delete:
      tags:
      - Auth
      summary: Revoke an API key
      description: Revokes one of your API keys at once, in whichever of your workspaces it acts. Requests that send it then answer 401 with code API_KEY_REVOKED. Revoking frees a place under the plan's apiKeys limit.
      operationId: revokeApiKey
      security:
      - bearerAuth: []
      - apiKeyHeader: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: The key's id, as POST /v1/auth/keys returned it
      responses:
        '200':
          description: Revoked
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    const: true
                required:
                - ok
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No such key of yours, or it is already revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    PlanLimitExceededError:
      type: object
      description: 'Error body for creating an API key past the workspace''s `apiKeys` limit (HTTP 403). `error` states the limit and the count; `limit`, `current` and `maximumAllowed` give them for branching. Do not retry: the limit holds until a key is revoked.'
      properties:
        error:
          type: string
          description: The limit and the count, in one sentence
        code:
          type: string
          enum:
          - PLAN_LIMIT_EXCEEDED
        limit:
          type: string
          enum:
          - scenes
          - updatesPerMonth
          - rendersPerMonth
          - apiKeys
          description: Which cap was hit
        current:
          type: integer
          description: Resource count at the time of the request
        maximumAllowed:
          type: integer
          description: 'The workspace''s numeric cap: the plan''s limit, times the number of owners and members on Team (at least 2 seats'' worth), or 3 for a viewer''s keys. `unlimited` plans never produce this response.'
      required:
      - error
      - code
      - limit
      - current
      - maximumAllowed
    FeedbackPreview:
      type: object
      description: A feedback item exactly as Zindex staff will see it
      properties:
        kind:
          type: string
          enum:
          - bug
          - docs
          - request
          - other
        summary:
          type: string
        expected:
          type:
          - string
          - 'null'
        observed:
          type:
          - string
          - 'null'
        confidence:
          type:
          - string
          - 'null'
          enum:
          - seen
          - likely
          - unsure
          - null
        engine:
          type: string
          description: The Zindex build that took the item
        client:
          type:
          - string
          - 'null'
          description: The app that sent it, or dashboard
        diagram:
          description: The attached diagram version, or null
          oneOf:
          - type: object
            required:
            - id
            - revision
            properties:
              id:
                type: string
              revision:
                type: integer
                minimum: 1
          - type: 'null'
        anonymized:
          type:
          - boolean
          - 'null'
          description: Whether the attached document is anonymized; null with nothing attached
        snippet:
          description: 'The attached document as staff see it: a scene object or Mermaid text; null with nothing attached'
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
      - error
    DiagramError:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: 'INVALID_REQUEST, CONFIRMATION_REQUIRED (400); AUTH_REQUIRED, API_KEY_INVALID, API_KEY_REVOKED, API_KEY_EXPIRED (401); LIMIT_REACHED, FEATURE_UNAVAILABLE, EMAIL_NOT_VERIFIED, LINK_INVALID, READ_ONLY, SHARING_DISABLED, OWNER_REQUIRED, SESSION_REQUIRED (403); NOT_FOUND (404; also a path with no endpoint), NO_REVISION_AS_OF (404); KEY_EXISTS, REVISION_CONFLICT, STORAGE_HOLD, and INVALID_REQUEST from PUT sharing (409); MOVED (410, /v1/scenes); INPUT_TOO_LARGE (413); VALIDATION_FAILED, REQUEST_ID_REUSED, PARSE_ERROR, UNSUPPORTED_DIAGRAM_TYPE, IMPORT_TIMEOUT, IMPORT_FAILED, MERMAID_FAMILY_MISMATCH, DRAW_TIMEOUT (422); RATE_LIMITED (429: a rate limit, or feedback); INTERNAL_ERROR (500); UNSUPPORTED (501); UNAVAILABLE, BUSY, STORAGE_UNAVAILABLE (503). STORAGE_UNAVAILABLE and STORAGE_HOLD come only from a workspace that keeps its diagrams in its own GitHub repository, with bring your own storage (https://zindex.ai/docs/storage/); Zindex''s own storage, the default, never answers them.'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/DiagramWarning'
          description: 'With VALIDATION_FAILED: each problem, with a code, the element when there is one, and a one-line fix. The codes: https://zindex.ai/docs/reference/validation-rules/'
        revision:
          type: integer
          description: 'With REVISION_CONFLICT: the current revision. With KEY_EXISTS: the existing diagram''s revision'
        changes:
          type: string
          description: 'With REVISION_CONFLICT: what changed since baseRevision, one element per line, then, when any element only moved, one moved: line naming them'
        id:
          type: string
          description: 'With KEY_EXISTS: the diagram that holds the key'
        method:
          type: string
          description: 'With MOVED: the method of the request to send instead'
        path:
          type: string
          description: 'With MOVED: the path of the request to send instead'
        limit:
          type: string
          enum:
          - scenes
          - updatesPerMonth
          - rendersPerMonth
          description: 'With LIMIT_REACHED: which plan limit'
        maximum:
          type: integer
          description: 'With LIMIT_REACHED: the workspace''s limit'
        current:
          type: integer
          description: 'With LIMIT_REACHED: the workspace''s count now'
        feature:
          type: string
          enum:
          - privateShareLinks
          - longShareLinks
          description: 'With FEATURE_UNAVAILABLE: the feature the workspace''s plan doesn''t include. privateShareLinks: links to the latest version or to every version. longShareLinks: links that end later than maxDays days away, or never'
        maxDays:
          type: integer
          description: 'With FEATURE_UNAVAILABLE and longShareLinks: the latest end date allowed, in days after today (UTC)'
        reason:
          type: string
          enum:
          - credential
          - role
          - installation_missing
          - installation_suspended
          - repository_missing
          - repository_public
          - branch_missing
          - push_refused
          - external_change
          - credentials
          - disconnected
          description: 'With READ_ONLY: `credential` when the key or connected app can only read, `role` when the person is a viewer in the workspace. With STORAGE_HOLD: why a workspace owner is needed, one of installation_missing, installation_suspended, repository_missing, repository_public (the repository was made public; the hold lifts once it is private or internal), branch_missing, push_refused, credentials, external_change (the storage changed outside Zindex) or disconnected (an owner disconnected the workspace''s storage; saves resume when it is reconnected or the diagrams are moved back)'
        line:
          type: integer
          description: 'With PARSE_ERROR, when Mermaid names a place: the line of the Mermaid text sent where the parser stopped, counted from 1'
        column:
          type: integer
          description: 'With PARSE_ERROR, when Mermaid names one: the column on that line, counted from 0. The sentence in `error` counts it from 1'
        retryAfter:
          type: integer
          description: 'With RATE_LIMITED: the seconds until the next feedback item can go. With BUSY: the seconds to wait before trying again, half the budget of the drawing refused. With STORAGE_UNAVAILABLE: the seconds to wait before trying again, also sent as the Retry-After header'
        detail:
          type: string
          description: 'With STORAGE_UNAVAILABLE and STORAGE_HOLD: what the workspace''s storage answered, naming the cause'
        confirm:
          type: string
          description: 'With CONFIRMATION_REQUIRED from POST /v1/feedback: the token to send the item with, once the person agrees'
        preview:
          $ref: '#/components/schemas/FeedbackPreview'
          description: 'With CONFIRMATION_REQUIRED from POST /v1/feedback: the item as staff will see it'
      required:
      - error
      - code
    DiagramWarning:
      type: object
      properties:
        code:
          type: string
          description: The warning's code
        element:
          type: string
          description: The element it concerns, when there is one
        fix:
          type: string
          description: One line on what to change
      required:
      - code
      - fix
      description: 'A problem that doesn''t block a save: a rule of the scene or its diagram family, what laying out and drawing it noticed (TEXT_OVERFLOW, ICON_NOT_FOUND, NODE_OVERLAP_DETECTED, NODE_OUTSIDE_FRAME, FRAME_OVERLAP_DETECTED, NODE_IN_WRONG_FRAME, LABEL_DUPLICATION_DETECTED, EDGE_CROSSES_NODE, SPAN_COVERS_NODE, CHARACTER_NOT_DRAWN), a note from converting Mermaid, a note on a field it dropped from what it was sent (PORTS_REMOVED), or a note on what a deleteElement changed besides the element it named: a constraint it removed (CONSTRAINT_REMOVED), an element placed relative to the deleted one (RELATIVE_LAYOUT_FIXED), a spanning frame it left spanning nothing and removed (SPAN_REMOVED), or a sequence diagram''s operand or activation bar it left with nothing and removed (FRAGMENT_OPERAND_REMOVED, ACTIVATION_REMOVED; a move with after or before can remove an operand too). Or a plan limit near at hand (LIMIT_NEAR: fix gives the count, the limit and what stops there). Other changes an edit makes on its own get no note; changed lists every element it added, updated or removed, and every element it only moved or resized. At most 10 per response. Every other code: https://zindex.ai/docs/reference/validation-rules/'
  responses:
    RateLimited:
      description: 'RATE_LIMITED: over the request rate limit (see Rate Limiting). Wait retryAfter seconds (also the Retry-After header), then try again.'
      headers:
        Retry-After:
          description: Seconds until the rate limit resets
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests remaining in the current window
          schema:
            type: integer
        X-RateLimit-Reset:
          description: Unix timestamp when the limit resets
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              code:
                type: string
                enum:
                - RATE_LIMITED
              retryAfter:
                type: integer
                description: Seconds to wait, as in Retry-After
            required:
            - error
            - code
            - retryAfter
    Unauthorized:
      description: 'Missing or invalid API key. Response includes a `code` field that distinguishes the failure mode so clients (dashboard, MCP server) can render actionable copy: `AUTH_REQUIRED` (no key or session was sent), `API_KEY_INVALID` (key not found), `API_KEY_REVOKED` (key was revoked, or its person is no longer in its workspace), `API_KEY_EXPIRED` (key passed its expires_at), and for the site''s session cookie `SESSION_EXPIRED` (past its 24 hours), `SESSION_REVOKED` (the account''s sessions were ended, for example by a password reset) and `SESSION_INVALID` (not a session this server signed).'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Human-readable error message.
              code:
                type: string
                enum:
                - AUTH_REQUIRED
                - API_KEY_INVALID
                - API_KEY_REVOKED
                - API_KEY_EXPIRED
                - SESSION_EXPIRED
                - SESSION_REVOKED
                - SESSION_INVALID
                description: Machine-readable failure reason. Clients should branch on this rather than parsing `error`.
            required:
            - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key as Bearer token: `Authorization: Bearer dsp_sk_...`'
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key via header: `X-API-Key: dsp_sk_...`'