{
  "openapi": "3.1.0",
  "info": {
    "title": "Collect24 Registry API",
    "version": "v1",
    "summary": "Publish once. Distribute everywhere.",
    "description": "Read and publish artwork, artist, gallery and museum data in the Collect24 global art registry. Every artwork carries a permanent Collect24 Art ID (`C24-…`) that stays stable across ownership, gallery, collection, status and location changes. The API is a permissioned projection of the same data the collect24.art website serves — private owner data is never exposed. Access to the API does not grant rights to redistribute copyrighted images or third-party content.",
    "contact": {
      "name": "Collect24",
      "url": "https://collect24.art/developers"
    }
  },
  "servers": [
    {
      "url": "https://collect24.art/api/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "BearerKey": []
    },
    {
      "ApiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Service",
      "description": "Key and scope discovery."
    },
    {
      "name": "Artworks",
      "description": "Read, search, publish and update artworks."
    },
    {
      "name": "Integrations",
      "description": "Platform-agnostic installations, batch sync and source state."
    },
    {
      "name": "Artists"
    },
    {
      "name": "Galleries"
    },
    {
      "name": "Museums"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": [
          "Service"
        ],
        "operationId": "getService",
        "summary": "Service descriptor",
        "description": "Verifies a key and returns the organisation, its scopes and the available endpoints.",
        "responses": {
          "200": {
            "description": "Service descriptor.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/artworks": {
      "get": {
        "tags": [
          "Artworks"
        ],
        "operationId": "listArtworks",
        "summary": "List and search artworks",
        "description": "Unknown query parameters are rejected with `400 invalid_query`. Without `updated_since` results are newest-first; with `updated_since` they are ordered ascending on `(updated_at, id)` for reliable incremental synchronisation.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Free-text match on title and artist name.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "artist",
            "in": "query",
            "required": false,
            "description": "Artist slug, artist uuid or partial artist name.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "gallery",
            "in": "query",
            "required": false,
            "description": "Gallery slug.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "museum",
            "in": "query",
            "required": false,
            "description": "Museum slug.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "collection",
            "in": "query",
            "required": false,
            "description": "Collection slug.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "medium",
            "in": "query",
            "required": false,
            "description": "Partial medium match.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "description": "Exact `year_created` value.",
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "name": "availability",
            "in": "query",
            "required": false,
            "description": "Filter on public availability.",
            "schema": {
              "type": "string",
              "enum": [
                "private_collection",
                "open_to_offers",
                "for_sale"
              ]
            }
          },
          {
            "name": "collect24_id",
            "in": "query",
            "required": false,
            "description": "Exact Collect24 Art ID.",
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "name": "installation_id",
            "in": "query",
            "required": false,
            "description": "Only artworks this installation is responsible for. Cannot be combined with content filters.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "Only artworks sourced from this platform. Cannot be combined with content filters.",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          },
          {
            "name": "price_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Minimum public asking price."
          },
          {
            "name": "price_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Maximum public asking price."
          },
          {
            "name": "updated_since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "ISO 8601 timestamp with offset. Enables ascending, sync-safe ordering."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of artworks.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_query` — an unknown or invalid query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Artworks"
        ],
        "operationId": "createArtwork",
        "summary": "Publish an artwork",
        "description": "Creates an artwork inside the organisation's own profile. Placement is derived server-side; ownership fields cannot be set. Deduplication runs on fingerprint, `external_id`, `source_url`, image URL and `inventory_ref`: a match returns `200` with `duplicate: true` and creates nothing.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Retry-safe key. A repeat with the same body replays the stored response; a repeat with a different body returns `409 idempotency_key_reused`."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtworkCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An existing artwork matched; nothing was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkWriteResult"
                }
              }
            }
          },
          "201": {
            "description": "Registered.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkWriteResult"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_json` — the body is not valid JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "`idempotency_key_reused`, `idempotent_request_in_progress` or `source_conflict`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_body`, `protected_field` or `unknown_installation`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/artworks/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Collect24 Art ID (`C24-4711`) or record uuid."
        }
      ],
      "get": {
        "tags": [
          "Artworks"
        ],
        "operationId": "getArtwork",
        "summary": "Retrieve an artwork",
        "responses": {
          "200": {
            "description": "The artwork.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`artwork_not_found` — unknown, withdrawn or private.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Artworks"
        ],
        "operationId": "updateArtwork",
        "summary": "Update an artwork",
        "description": "Only artworks inside the key's own organisation profile can be updated. Moving a work to `fully_private` removes it from the public projection: the response carries `data: null`, `public: false` and later reads return `404`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtworkUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkUpdateResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`missing_scope`, `organisation_inactive`, or `not_permitted` when the artwork is not inside your organisation's profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`artwork_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_body`, `protected_field` or `unknown_installation`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/artists/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Artist slug or uuid."
        }
      ],
      "get": {
        "tags": [
          "Artists"
        ],
        "operationId": "getArtist",
        "summary": "Retrieve an artist",
        "responses": {
          "200": {
            "description": "The artist.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtistEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`artist_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/artists/{id}/artworks": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Artist slug or uuid."
        }
      ],
      "get": {
        "tags": [
          "Artists"
        ],
        "operationId": "listArtistArtworks",
        "summary": "List an artist's artworks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of artworks.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`artist_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/galleries/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Gallery slug or uuid."
        }
      ],
      "get": {
        "tags": [
          "Galleries"
        ],
        "operationId": "getGallery",
        "summary": "Retrieve a gallery",
        "responses": {
          "200": {
            "description": "The gallery.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GalleryEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`gallery_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/galleries/{id}/artworks": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Gallery slug or uuid."
        }
      ],
      "get": {
        "tags": [
          "Galleries"
        ],
        "operationId": "listGalleryArtworks",
        "summary": "List a gallery's artworks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of artworks.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`gallery_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/museums/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Museum slug or uuid."
        }
      ],
      "get": {
        "tags": [
          "Museums"
        ],
        "operationId": "getMuseum",
        "summary": "Retrieve a museum",
        "responses": {
          "200": {
            "description": "The museum.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MuseumEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`museum_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/museums/{id}/artworks": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Museum slug or uuid."
        }
      ],
      "get": {
        "tags": [
          "Museums"
        ],
        "operationId": "listMuseumArtworks",
        "summary": "List a museum's artworks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of artworks.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`museum_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/access-requests": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "operationId": "requestApiAccess",
        "summary": "Request API access (no key required)",
        "security": [],
        "description": "The pre-key step. Submits the same request the public form at /developers/request-access creates, so an integration can collect it inside its own onboarding wizard. `access_type: read` is issued immediately and the plain key is returned once; `publishing` and `both` always queue for the existing manual review and no key is returned. Rate limited per sending address and per email.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Either an issued read key or a queued request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRequestResult"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_json`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_body`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/connect": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "operationId": "connectIntegration",
        "summary": "Register an integration installation",
        "description": "The single handshake every integration performs, whatever the platform. Idempotent per (API key owner, platform, site_url): re-running onboarding returns the same `installation_id` and keeps sync history. Unknown `platform` values are stored as `custom` with the literal value kept in `platform_label`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationConnect"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The installation and the profiles this key may publish to.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationConnection"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_json`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`site_url_required` or `invalid_body`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/integrations/sync": {
      "post": {
        "tags": [
          "Integrations"
        ],
        "operationId": "syncArtworks",
        "summary": "Batch publish artworks",
        "description": "Up to 50 artworks per call. Each item carries its own `idempotency_key` and behaves exactly like an individual `POST /artworks`, including deduplication and idempotent replay. One failing item never fails the batch: the response reports each item separately.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationSync"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSyncResult"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_json`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_body` or `unknown_installation`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/artworks/{id}/source": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Collect24 Art ID or uuid."
        }
      ],
      "get": {
        "tags": [
          "Integrations"
        ],
        "operationId": "getArtworkSource",
        "summary": "Read an artwork's integration sources",
        "responses": {
          "200": {
            "description": "The sources attached to this artwork.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkSourceResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key does not carry the required scope, or the organisation is not active.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`artwork_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Integrations"
        ],
        "operationId": "updateArtworkSource",
        "summary": "Update source state only",
        "description": "Reports that the record was unpublished, removed or re-synced in the connected system, without resending content. The artwork and its permanent Collect24 Art ID are never deleted or hidden by a source status change. Only an installation belonging to the calling key may update a source.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ArtworkSourcePatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Source updated; content unchanged.",
            "headers": {
              "x-ratelimit-limit": {
                "description": "Requests allowed per minute for this key.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-remaining": {
                "description": "Requests left in the current minute.",
                "schema": {
                  "type": "integer"
                }
              },
              "x-ratelimit-reset": {
                "description": "Unix seconds at which the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtworkUpdateResult"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_json`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, unknown, revoked or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "`source_ownership_mismatch`, missing scope, or inactive organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "`artwork_not_found` or `source_not_found`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "`invalid_body` or `installation_id_required`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded. Carries `Retry-After`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "`Authorization: Bearer c24_live_…`. Server-to-server only; never ship a key in a browser."
      },
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "missing_scope"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        }
      },
      "ProfileRef": {
        "type": "object",
        "nullable": true,
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ArtworkSource": {
        "type": "object",
        "nullable": true,
        "description": "Integration provenance: which installation published this record and whether it is still published there. `null` when no integration owns the record. Source state never affects `collect24_id`.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "artwork_source"
            ]
          },
          "platform": {
            "type": "string"
          },
          "platform_label": {
            "type": "string",
            "nullable": true
          },
          "installation_id": {
            "type": "string",
            "nullable": true
          },
          "site_url": {
            "type": "string",
            "nullable": true
          },
          "external_id": {
            "type": "string",
            "nullable": true
          },
          "source_url": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "unpublished",
              "removed"
            ]
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time"
          },
          "registry_identity_persists": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "ArtworkSourceInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "installation_id"
        ],
        "description": "Where this record comes from. Provenance, not content.",
        "properties": {
          "installation_id": {
            "type": "string",
            "minLength": 3,
            "maxLength": 120
          },
          "platform": {
            "type": "string",
            "maxLength": 80
          },
          "external_id": {
            "type": "string",
            "maxLength": 200
          },
          "source_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "unpublished",
              "removed"
            ],
            "default": "active"
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ArtworkSourcePatch": {
        "type": "object",
        "additionalProperties": false,
        "description": "At least one of `status`, `last_synced_at`, `source_url`, `external_id` is required.",
        "properties": {
          "installation_id": {
            "type": "string",
            "maxLength": 120,
            "description": "Required when several of your installations hold a source on this artwork."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "unpublished",
              "removed"
            ]
          },
          "last_synced_at": {
            "type": "string",
            "format": "date-time"
          },
          "source_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "external_id": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "ArtworkSourceResponse": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "artwork_source_response"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/ArtworkSource"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArtworkSource"
            }
          },
          "deletes_artwork": {
            "type": "boolean",
            "enum": [
              false
            ]
          }
        }
      },
      "AccessRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "email",
          "website",
          "access_type",
          "intended_use"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 150
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 200
          },
          "organization": {
            "type": "string",
            "maxLength": 200
          },
          "website": {
            "type": "string",
            "format": "uri",
            "maxLength": 300
          },
          "access_type": {
            "type": "string",
            "enum": [
              "read",
              "publishing",
              "both"
            ]
          },
          "intended_use": {
            "type": "string",
            "minLength": 20,
            "maxLength": 3000
          },
          "expected_volume": {
            "type": "string",
            "maxLength": 200
          },
          "platform": {
            "type": "string",
            "maxLength": 80,
            "description": "Same meaning as IntegrationConnect.platform — shows reviewers which integration asked."
          },
          "platform_version": {
            "type": "string",
            "maxLength": 50
          },
          "profile_hint": {
            "type": "string",
            "maxLength": 500,
            "description": "Free text: which verified gallery, museum, artist or collection profile is the requester's, or a note that none exists yet. Not an artist_profile_id."
          }
        }
      },
      "AccessRequestResult": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "issued",
              "pending_review"
            ]
          },
          "request_id": {
            "type": "string",
            "example": "areq_9f2c…"
          },
          "api_key": {
            "type": "string",
            "description": "Only present when status is `issued`. Shown once and never recoverable.",
            "example": "c24_live_…"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "IntegrationConnect": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "site_url"
        ],
        "properties": {
          "platform": {
            "type": "string",
            "maxLength": 80,
            "description": "wordpress, wix, shopify, squarespace, artlogic, museum_database, custom or any label."
          },
          "platform_version": {
            "type": "string",
            "maxLength": 50
          },
          "site_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "site_name": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "IntegrationConnection": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "integration_connection"
            ]
          },
          "installation_id": {
            "type": "string",
            "example": "inst_9f2c…"
          },
          "connected": {
            "type": "boolean"
          },
          "installation": {
            "type": "object"
          },
          "profiles": {
            "type": "array",
            "description": "Artist, gallery, museum or collection profiles this key may publish to.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "collection",
                    "gallery",
                    "museum",
                    "artist"
                  ]
                },
                "slug": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "IntegrationSync": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "installation_id",
          "artworks"
        ],
        "properties": {
          "installation_id": {
            "type": "string",
            "minLength": 3,
            "maxLength": 120
          },
          "artworks": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "idempotency_key",
                "artwork"
              ],
              "properties": {
                "idempotency_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "artwork": {
                  "$ref": "#/components/schemas/ArtworkCreate"
                }
              }
            }
          }
        }
      },
      "IntegrationSyncResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "integration_sync_result"
            ]
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "idempotency_key": {
                  "type": "string"
                },
                "status": {
                  "type": "integer"
                },
                "ok": {
                  "type": "boolean"
                },
                "data": {
                  "type": "object",
                  "nullable": true
                },
                "error": {
                  "type": "object",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "Artwork": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "artwork"
            ]
          },
          "collect24_id": {
            "type": "string",
            "example": "C24-4711",
            "description": "Permanent Collect24 Art ID."
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "artist": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "nullable": true
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "year_created": {
            "type": "string",
            "nullable": true
          },
          "medium": {
            "type": "string",
            "nullable": true
          },
          "dimensions_cm": {
            "type": "object",
            "properties": {
              "height": {
                "type": "number",
                "nullable": true
              },
              "width": {
                "type": "number",
                "nullable": true
              },
              "depth": {
                "type": "number",
                "nullable": true
              }
            }
          },
          "dimensions_text": {
            "type": "string",
            "nullable": true,
            "description": "Free-text measurements fallback."
          },
          "materials": {
            "type": "string",
            "nullable": true
          },
          "signature": {
            "type": "string",
            "nullable": true
          },
          "edition_info": {
            "type": "string",
            "nullable": true
          },
          "edition": {
            "type": "string",
            "nullable": true,
            "description": "Alias of `edition_info`."
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "availability": {
            "type": "string",
            "enum": [
              "private_collection",
              "open_to_offers",
              "for_sale"
            ],
            "description": "Public availability state. `fully_private` works are never returned."
          },
          "registry_source": {
            "type": "string",
            "nullable": true,
            "description": "How the record entered the registry (`museum`, `gallery`, ...)."
          },
          "source": {
            "$ref": "#/components/schemas/ArtworkSource"
          },
          "price": {
            "type": "object",
            "nullable": true,
            "description": "Present only when the work is `for_sale` with a public asking price.",
            "properties": {
              "amount": {
                "type": "number"
              },
              "currency": {
                "type": "string",
                "example": "EUR"
              }
            }
          },
          "location": {
            "type": "object",
            "properties": {
              "country": {
                "type": "string",
                "nullable": true
              }
            },
            "description": "Country is present only when the holder allows it to be shown."
          },
          "current_collection": {
            "type": "object",
            "nullable": true,
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "city": {
                "type": "string",
                "nullable": true
              },
              "country": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "gallery": {
            "$ref": "#/components/schemas/ProfileRef"
          },
          "museum": {
            "$ref": "#/components/schemas/ProfileRef"
          },
          "provenance": {
            "type": "string",
            "nullable": true
          },
          "exhibition_history": {
            "type": "string",
            "nullable": true
          },
          "literature": {
            "type": "string",
            "nullable": true
          },
          "images": {
            "type": "object",
            "properties": {
              "cover_url": {
                "type": "string",
                "nullable": true
              },
              "thumbnail_url": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "external_source": {
            "type": "object",
            "nullable": true,
            "description": "Source metadata of an imported record. Never the Collect24 Art ID.",
            "properties": {
              "provider": {
                "type": "string"
              },
              "external_id": {
                "type": "string"
              },
              "source_url": {
                "type": "string",
                "nullable": true
              },
              "open_access": {
                "type": "boolean"
              }
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "public_page": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ArtworkEnvelope": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "artwork"
            ]
          }
        },
        "allOf": [
          {
            "$ref": "#/components/schemas/Artwork"
          }
        ]
      },
      "ArtworkList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Artwork"
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              },
              "has_more": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ArtworkCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "title"
        ],
        "description": "Provide `artist_name` or `artist_profile_id`.",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "artist_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Optional when `artist_profile_id` is supplied."
          },
          "artist_id": {
            "type": "string",
            "format": "uuid"
          },
          "artist_profile_id": {
            "type": "string",
            "format": "uuid",
            "description": "Registry artist profile id, as returned by POST /integrations/connect. Preferred over free text."
          },
          "year_created": {
            "type": "string",
            "maxLength": 50
          },
          "medium": {
            "type": "string",
            "maxLength": 300
          },
          "materials": {
            "type": "string",
            "maxLength": 300
          },
          "signature": {
            "type": "string",
            "maxLength": 300
          },
          "dimensions_cm": {
            "type": "object",
            "additionalProperties": false,
            "description": "Numeric measurements plus a free-text `text` fallback when exact values are unknown.",
            "properties": {
              "height": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "width": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "depth": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "text": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "edition": {
            "type": "string",
            "maxLength": 300,
            "description": "Alias of `edition_info`."
          },
          "images": {
            "type": "array",
            "maxItems": 24,
            "description": "Ordered images. The `primary` image (or the first item) also becomes `cover_image_url`.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 2000
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "gallery",
                    "detail"
                  ],
                  "default": "gallery"
                },
                "caption": {
                  "type": "string",
                  "maxLength": 500
                }
              }
            }
          },
          "source": {
            "$ref": "#/components/schemas/ArtworkSourceInput"
          },
          "height_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10000
          },
          "width_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10000
          },
          "depth_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10000
          },
          "edition_info": {
            "type": "string",
            "maxLength": 300
          },
          "description": {
            "type": "string",
            "maxLength": 20000
          },
          "availability": {
            "type": "string",
            "enum": [
              "private_collection",
              "open_to_offers",
              "for_sale",
              "fully_private"
            ],
            "default": "private_collection"
          },
          "price": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 3,
                "maxLength": 3
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "cover_image_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "public_provenance": {
            "type": "string",
            "maxLength": 5000
          },
          "public_exhibition_history": {
            "type": "string",
            "maxLength": 5000
          },
          "public_literature": {
            "type": "string",
            "maxLength": 5000
          },
          "external_id": {
            "type": "string",
            "maxLength": 200
          },
          "source_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "inventory_ref": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "ArtworkUpdate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "artist_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Optional when `artist_profile_id` is supplied."
          },
          "artist_id": {
            "type": "string",
            "format": "uuid"
          },
          "artist_profile_id": {
            "type": "string",
            "format": "uuid",
            "description": "Registry artist profile id, as returned by POST /integrations/connect. Preferred over free text."
          },
          "year_created": {
            "type": "string",
            "maxLength": 50
          },
          "medium": {
            "type": "string",
            "maxLength": 300
          },
          "materials": {
            "type": "string",
            "maxLength": 300
          },
          "signature": {
            "type": "string",
            "maxLength": 300
          },
          "dimensions_cm": {
            "type": "object",
            "additionalProperties": false,
            "description": "Numeric measurements plus a free-text `text` fallback when exact values are unknown.",
            "properties": {
              "height": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "width": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "depth": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              },
              "text": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "edition": {
            "type": "string",
            "maxLength": 300,
            "description": "Alias of `edition_info`."
          },
          "images": {
            "type": "array",
            "maxItems": 24,
            "description": "Ordered images. The `primary` image (or the first item) also becomes `cover_image_url`.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri",
                  "maxLength": 2000
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "primary",
                    "gallery",
                    "detail"
                  ],
                  "default": "gallery"
                },
                "caption": {
                  "type": "string",
                  "maxLength": 500
                }
              }
            }
          },
          "source": {
            "$ref": "#/components/schemas/ArtworkSourceInput"
          },
          "height_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10000
          },
          "width_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10000
          },
          "depth_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 10000
          },
          "edition_info": {
            "type": "string",
            "maxLength": 300
          },
          "description": {
            "type": "string",
            "maxLength": 20000
          },
          "availability": {
            "type": "string",
            "enum": [
              "private_collection",
              "open_to_offers",
              "for_sale",
              "fully_private"
            ],
            "default": "private_collection"
          },
          "price": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "amount": {
                "type": "number",
                "minimum": 0
              },
              "currency": {
                "type": "string",
                "minLength": 3,
                "maxLength": 3
              }
            },
            "required": [
              "amount",
              "currency"
            ]
          },
          "cover_image_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "public_provenance": {
            "type": "string",
            "maxLength": 5000
          },
          "public_exhibition_history": {
            "type": "string",
            "maxLength": 5000
          },
          "public_literature": {
            "type": "string",
            "maxLength": 5000
          },
          "external_id": {
            "type": "string",
            "maxLength": 200
          },
          "source_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "inventory_ref": {
            "type": "string",
            "maxLength": 200
          }
        }
      },
      "ArtworkWriteResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "artwork_write_result"
            ]
          },
          "duplicate": {
            "type": "boolean"
          },
          "matched_on": {
            "type": "string",
            "nullable": true,
            "example": "fingerprint"
          },
          "data": {
            "$ref": "#/components/schemas/Artwork"
          }
        }
      },
      "ArtworkUpdateResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "artwork"
            ]
          },
          "public": {
            "type": "boolean",
            "description": "false when the work left the public projection."
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Artwork"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "Artist": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "artist"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nationality": {
            "type": "string",
            "nullable": true
          },
          "birth_year": {
            "type": "integer",
            "nullable": true
          },
          "death_year": {
            "type": "integer",
            "nullable": true
          },
          "birth_place": {
            "type": "string",
            "nullable": true
          },
          "death_place": {
            "type": "string",
            "nullable": true
          },
          "movements": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "short_bio": {
            "type": "string",
            "nullable": true
          },
          "biography": {
            "type": "string",
            "nullable": true
          },
          "portrait": {
            "type": "object",
            "nullable": true,
            "properties": {
              "url": {
                "type": "string"
              },
              "credit": {
                "type": "string",
                "nullable": true
              },
              "license": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "references": {
            "type": "object",
            "properties": {
              "wikipedia_url": {
                "type": "string",
                "nullable": true
              },
              "wikidata_id": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "artworks": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ArtistEnvelope": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Artist"
          }
        ]
      },
      "Gallery": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "gallery"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "logo_url": {
            "type": "string",
            "nullable": true
          },
          "claim_state": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "artworks": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GalleryEnvelope": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Gallery"
          }
        ]
      },
      "Museum": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "museum"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "website": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "artworks": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MuseumEnvelope": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Museum"
          }
        ]
      },
      "Service": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "service"
            ]
          },
          "service": {
            "type": "string",
            "example": "Collect24 Registry API"
          },
          "version": {
            "type": "string",
            "example": "v1"
          },
          "organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              }
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "artworks:read",
                "artworks:write",
                "artists:read",
                "artists:write",
                "galleries:read",
                "museums:read",
                "certificates:read",
                "provenance:read",
                "webhooks:manage"
              ]
            }
          },
          "available_scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "artworks:read",
                "artworks:write",
                "artists:read",
                "artists:write",
                "galleries:read",
                "museums:read",
                "certificates:read",
                "provenance:read",
                "webhooks:manage"
              ]
            }
          },
          "webhook_events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "artwork.created",
                "artwork.updated",
                "artwork.sold",
                "artwork.removed",
                "artwork.ownership_changed",
                "certificate.created",
                "gallery.updated"
              ]
            }
          },
          "rate_limit_per_minute": {
            "type": "integer"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  },
  "x-webhooks": {
    "events": [
      "artwork.created",
      "artwork.updated",
      "artwork.sold",
      "artwork.removed",
      "artwork.ownership_changed",
      "certificate.created",
      "gallery.updated"
    ],
    "signature": {
      "header": "x-collect24-signature",
      "algorithm": "sha256=HMAC_SHA256(signing_secret, `${timestamp}.${rawBody}`)",
      "timestamp_header": "x-collect24-timestamp",
      "delivery_header": "x-collect24-delivery",
      "attempt_header": "x-collect24-attempt",
      "retries": "Exponential backoff, max 6 attempts. Retries reuse the delivery id; deduplicate on it."
    }
  }
}