{
  "openapi": "3.1.0",
  "info": {
    "title": "Proofscene API",
    "version": "1.1.0",
    "summary": "Turn proof PDFs into interactive 3D proof links from your own systems.",
    "description": "The Proofscene API puts the 3D Proof Studio inside your order system, your automations and your AI assistant.\nSend a proof PDF, Proofscene reads it and builds the product in 3D, and one more call publishes it on your branded link at yourcompany.proofscene.com.\n\nEvery request carries your API key as a Bearer token. Make a key in the dashboard under Settings > API keys (owners and admins of a workspace).\nA key acts as the person who made it, in that person's workspace: proofs sent through the API are read, counted and published exactly as proofs dropped into the Studio, on the same plan.",
    "termsOfService": "https://proofscene.com/terms/",
    "contact": {
      "name": "Proofscene",
      "url": "https://proofscene.com/developers/"
    }
  },
  "externalDocs": {
    "description": "Developer guide with copy-paste examples",
    "url": "https://proofscene.com/developers/"
  },
  "servers": [
    {
      "url": "https://proofscene.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "3D proofs",
      "description": "Send a proof PDF, follow its reading and publish it as a live 3D proof link."
    },
    {
      "name": "Proof links",
      "description": "Your proof links: list them, read one, reserve a new one."
    },
    {
      "name": "Logo Finder",
      "description": "A company's logos from its website address."
    },
    {
      "name": "Account",
      "description": "The workspace a key belongs to."
    }
  ],
  "paths": {
    "/api/v1/me": {
      "get": {
        "operationId": "getMe",
        "tags": [
          "Account"
        ],
        "summary": "The key's workspace",
        "description": "The workspace and key a request runs as. A good first call to check a key, and the name to show for a connection.",
        "responses": {
          "200": {
            "description": "The workspace and key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                },
                "example": {
                  "company": {
                    "slug": "yourcompany",
                    "name": "Your Company",
                    "link_base": "https://yourcompany.proofscene.com/",
                    "plan": "pro"
                  },
                  "key": {
                    "name": "MIS integration",
                    "prefix": "ps_live_Ab3dE5f"
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proofs": {
      "get": {
        "operationId": "listProofs",
        "tags": [
          "Proof links"
        ],
        "summary": "List proof links",
        "description": "Your workspace's proof links, newest first. Pass `next` from a reply as `before` to read the page after it.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Links per page (1 to 200).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 200
            }
          },
          {
            "name": "before",
            "in": "query",
            "description": "The `next` value of the previous page.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d\\|[\\w-]{1,40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "proofs",
                    "next"
                  ],
                  "properties": {
                    "proofs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Proof"
                      }
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page; null on the last page."
                    }
                  }
                },
                "example": {
                  "proofs": [
                    {
                      "id": "prf_8c1e2f9a7b",
                      "slug": "CG261128-1",
                      "url": "https://yourcompany.proofscene.com/CG261128-1",
                      "title": "Harbor Hotel key card",
                      "client_name": "Harbor Hotel",
                      "product_type": "Cards and credentials",
                      "status": "active",
                      "offline": false,
                      "protected": true,
                      "file_name": "CG261128-1 Harbor.pdf",
                      "file_size": 1843221,
                      "has_og": false,
                      "view_count": 3,
                      "last_viewed_at": "2026-11-28 14:02:11",
                      "created_at": "2026-11-28 13:40:02",
                      "updated_at": "2026-11-28 13:41:10",
                      "settings": {
                        "viewer": "html",
                        "rev": "k3m9q2x7aa"
                      }
                    }
                  ],
                  "next": null
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createProofLink",
        "tags": [
          "Proof links"
        ],
        "summary": "Reserve a proof link",
        "description": "Makes a proof link right away, so your order system can send the address to your customer at once. It shows that the proof is being prepared until a 3D proof is published onto it (`proof_id` on `POST /api/v1/jobs` or on publish). The link is live from the start and takes one of your plan's live links.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewProofLink"
              },
              "example": {
                "slug": "ORDER-1042",
                "title": "Order 1042 key cards",
                "client_name": "Harbor Hotel",
                "password": "harbor"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "proof"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "proof": {
                      "$ref": "#/components/schemas/Proof"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The link code is not 1 to 60 letters, digits, hyphens or underscores.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "bad_slug": {
                    "value": {
                      "error": "bad_slug"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Every live link of the plan is in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkLimit"
                }
              }
            }
          },
          "409": {
            "description": "`slug_taken`: that code is used in your workspace. `name_required`: the workspace has not chosen its company link yet (dashboard).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "slug_taken": {
                    "value": {
                      "error": "slug_taken"
                    }
                  },
                  "name_required": {
                    "value": {
                      "error": "name_required"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/proofs/{proof}": {
      "get": {
        "operationId": "getProof",
        "tags": [
          "Proof links"
        ],
        "summary": "Read one proof link",
        "parameters": [
          {
            "name": "proof",
            "in": "path",
            "required": true,
            "description": "The link's id (`prf_...`) or its link code, as its address ends.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "proof"
                  ],
                  "properties": {
                    "proof": {
                      "$ref": "#/components/schemas/Proof"
                    }
                  }
                },
                "example": {
                  "proof": {
                    "id": "prf_8c1e2f9a7b",
                    "slug": "CG261128-1",
                    "url": "https://yourcompany.proofscene.com/CG261128-1",
                    "title": "Harbor Hotel key card",
                    "client_name": "Harbor Hotel",
                    "product_type": "Cards and credentials",
                    "status": "active",
                    "offline": false,
                    "protected": true,
                    "file_name": "CG261128-1 Harbor.pdf",
                    "file_size": 1843221,
                    "has_og": false,
                    "view_count": 3,
                    "last_viewed_at": "2026-11-28 14:02:11",
                    "created_at": "2026-11-28 13:40:02",
                    "updated_at": "2026-11-28 13:41:10",
                    "settings": {
                      "viewer": "html",
                      "rev": "k3m9q2x7aa"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such link in your workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "error": "not_found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/jobs": {
      "post": {
        "operationId": "createJob",
        "tags": [
          "3D proofs"
        ],
        "summary": "Send a proof PDF",
        "description": "Starts a 3D proof from a proof PDF, sent as the request body or fetched from an address you name. Proofscene reads the artwork, die line and specification from the sheet; follow the reading with `GET /api/v1/jobs/{job}` (usually 5 to 30 seconds), then publish it. With `publish`, Proofscene publishes it by itself as soon as it is read, on its reserved link (`proof_id`) or on a new one. A proof counts toward your plan's monthly 3D proofs once it is read, as in the Studio.",
        "parameters": [
          {
            "name": "proof_id",
            "in": "query",
            "description": "Put the 3D proof on a link you reserved before (`POST /api/v1/proofs`).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "publish",
            "in": "query",
            "description": "`1`: publish it by itself once it is read (with the body as the PDF).",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true"
              ]
            }
          },
          {
            "name": "slug",
            "in": "query",
            "description": "With `publish=1` and no `proof_id`: the new link's code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file_name",
            "in": "query",
            "description": "The file name to keep with the proof when the body is the PDF.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/pdf": {
              "schema": {
                "type": "string",
                "contentMediaType": "application/pdf",
                "description": "The proof PDF, up to 32 MB."
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "contentMediaType": "application/pdf",
                    "description": "The proof PDF, up to 32 MB (`curl -F file=@proof.pdf`)."
                  },
                  "proof_id": {
                    "type": "string",
                    "description": "Put the 3D proof on a link you reserved before."
                  },
                  "publish": {
                    "type": "string",
                    "enum": [
                      "true",
                      "1"
                    ],
                    "description": "`true`: publish it by itself once it is read."
                  },
                  "slug": {
                    "type": "string",
                    "description": "With `publish` and no `proof_id`: the new link's code."
                  },
                  "title": {
                    "type": "string",
                    "description": "With `publish`: the new link's title."
                  },
                  "client_name": {
                    "type": "string",
                    "description": "With `publish`: the customer's company."
                  },
                  "file_name": {
                    "type": "string",
                    "description": "The file name to keep; the file's own when left out."
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewJobFromUrl"
              },
              "example": {
                "url": "https://files.example.com/proofs/CG261128-1.pdf",
                "proof_id": "prf_8c1e2f9a7b"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The proof is being read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "job"
                  ],
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "job": {
                      "$ref": "#/components/schemas/NewJob"
                    }
                  }
                },
                "example": {
                  "ok": true,
                  "job": {
                    "id": "stj_4kq9x2m1za",
                    "status": "queued",
                    "file_name": "CG261128-1 Harbor.pdf",
                    "file_size": 1843221,
                    "proof_id": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "The address is not one Proofscene fetches (http or https on a public name), the body is empty, or `publish` names a code that is not one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "bad_url": {
                    "value": {
                      "error": "bad_url"
                    }
                  },
                  "blocked_url": {
                    "value": {
                      "error": "blocked_url"
                    }
                  },
                  "empty_upload": {
                    "value": {
                      "error": "empty_upload"
                    }
                  },
                  "bad_slug": {
                    "value": {
                      "error": "bad_slug"
                    }
                  },
                  "bad_form": {
                    "value": {
                      "error": "bad_form"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "This month's 3D proofs are used (`quota_exceeded`, with when the allowance renews), or, with `publish` for a new link, every live link of the plan is in use (`link_limit`). More come with a bigger plan or an add-on.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Quota"
                    },
                    {
                      "$ref": "#/components/schemas/LinkLimit"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The key's person has not verified their email address yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "verify_required": {
                    "value": {
                      "error": "verify_required"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`proof_id` names no link of yours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "link_not_found": {
                    "value": {
                      "error": "link_not_found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "`link_attached`: `proof_id` names a link that already has its 3D proof. With `publish`: `slug_taken` (that code is used), `name_required` (choose the company link first).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "link_attached": {
                    "value": {
                      "error": "link_attached"
                    }
                  },
                  "slug_taken": {
                    "value": {
                      "error": "slug_taken"
                    }
                  },
                  "name_required": {
                    "value": {
                      "error": "name_required"
                    }
                  }
                }
              }
            }
          },
          "411": {
            "description": "A form upload without a declared length.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "length_required": {
                    "value": {
                      "error": "length_required"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Over 32 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "too_large": {
                    "value": {
                      "error": "too_large"
                    }
                  }
                }
              }
            }
          },
          "415": {
            "description": "Not a PDF, or a body that is neither a PDF nor JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_pdf": {
                    "value": {
                      "error": "not_pdf"
                    }
                  },
                  "pdf_or_json_required": {
                    "value": {
                      "error": "pdf_or_json_required"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The address did not give a file in time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "url_unreachable": {
                    "value": {
                      "error": "url_unreachable"
                    }
                  },
                  "url_timeout": {
                    "value": {
                      "error": "url_timeout"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Over 60 proofs sent in 10 minutes by one workspace. The reply carries `limit` and `window_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "error": "rate_limited"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Reading could not start. Send the proof again in a minute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "engine_unreachable": {
                    "value": {
                      "error": "engine_unreachable"
                    }
                  }
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "uploads": 60,
          "per_seconds": 600,
          "scope": "workspace"
        }
      }
    },
    "/api/v1/jobs/{job}": {
      "get": {
        "operationId": "getJob",
        "tags": [
          "3D proofs"
        ],
        "summary": "Follow a proof's reading",
        "description": "The reading of a proof you sent: `queued` and `running` while Proofscene reads it, `ready` when it can be published, `error` with a plain-English `problem` (what went wrong and what to change). Asking moves the reading on, so ask every few seconds until it is `ready`.",
        "parameters": [
          {
            "name": "job",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^stj_[A-Za-z0-9_-]{1,40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "job"
                  ],
                  "properties": {
                    "job": {
                      "$ref": "#/components/schemas/Job"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such job in your workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "error": "not_found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/jobs/{job}/publish": {
      "post": {
        "operationId": "publishJob",
        "tags": [
          "3D proofs"
        ],
        "summary": "Publish a 3D proof link",
        "description": "Publishes a `ready` proof as an interactive 3D proof on your branded link: a new link (your `slug`, or a random code), the link it was sent for (`proof_id`), or the link it was published on before (publishing again updates that link). The link shows exactly this build until you publish an update.",
        "parameters": [
          {
            "name": "job",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^stj_[A-Za-z0-9_-]{1,40}$"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Publish"
              },
              "example": {
                "slug": "CG261128-1",
                "title": "Harbor Hotel key card",
                "client_name": "Harbor Hotel",
                "password": "harbor"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Live: send the link to your customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Published"
                },
                "example": {
                  "ok": true,
                  "rev": "k3m9q2x7aa",
                  "proof": {
                    "id": "prf_8c1e2f9a7b",
                    "slug": "CG261128-1",
                    "url": "https://yourcompany.proofscene.com/CG261128-1",
                    "title": "Harbor Hotel key card",
                    "client_name": "Harbor Hotel",
                    "product_type": "Cards and credentials",
                    "status": "active",
                    "offline": false,
                    "protected": true,
                    "file_name": "CG261128-1 Harbor.pdf",
                    "file_size": 1843221,
                    "has_og": false,
                    "view_count": 3,
                    "last_viewed_at": "2026-11-28 14:02:11",
                    "created_at": "2026-11-28 13:40:02",
                    "updated_at": "2026-11-28 13:41:10",
                    "settings": {
                      "viewer": "html",
                      "rev": "k3m9q2x7aa"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A link code that is not 1 to 60 letters, digits, hyphens or underscores, or a password under 4 characters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "bad_slug": {
                    "value": {
                      "error": "bad_slug"
                    }
                  },
                  "weak_password": {
                    "value": {
                      "error": "weak_password"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Every live link of the plan is in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkLimit"
                }
              }
            }
          },
          "403": {
            "description": "The key's person has not verified their email address yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "verify_required": {
                    "value": {
                      "error": "verify_required"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such job, or `proof_id` names no link of yours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "error": "not_found"
                    }
                  },
                  "link_not_found": {
                    "value": {
                      "error": "link_not_found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "`job_not_ready`: still being read (the reply carries its `status`). `publish_in_studio`: the proof was adjusted or paired in the Studio, so publish it there (`studio_url`). `publish_in_progress`: it is being published right now (a publish asked for at upload). `slug_taken`, `link_attached`, `link_offline`, `name_required`, `scene_changed` (it changed while publishing: publish again).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "job_not_ready": {
                    "value": {
                      "error": "job_not_ready",
                      "status": "running"
                    }
                  },
                  "publish_in_studio": {
                    "value": {
                      "error": "publish_in_studio",
                      "studio_url": "https://proofscene.com/dashboard/studio/?job=stj_4kq9x2m1za"
                    }
                  },
                  "slug_taken": {
                    "value": {
                      "error": "slug_taken"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Publishing could not finish. Try again in a minute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "viewer_unavailable": {
                    "value": {
                      "error": "viewer_unavailable"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/logo": {
      "get": {
        "operationId": "findLogo",
        "tags": [
          "Logo Finder"
        ],
        "summary": "Find a company's logos",
        "description": "The logos on a company's website, best first: the same finder as the free Logo Finder at /tools/logo-finder/. Each found result draws on the workspace's daily logo allowance (10 a day on the Free plan, 500 on a paid plan); a search that finds nothing is given back.",
        "parameters": [
          {
            "name": "site",
            "in": "query",
            "required": true,
            "description": "A website address or host name, such as `harborhotel.com`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The logos found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoResult"
                }
              }
            }
          },
          "400": {
            "description": "Not a website address, or one Proofscene does not fetch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "bad_site": {
                    "value": {
                      "error": "bad_site"
                    }
                  },
                  "blocked_site": {
                    "value": {
                      "error": "blocked_site"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key, or a key that is not (or no longer) valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "auth_required": {
                    "value": {
                      "error": "auth_required"
                    }
                  },
                  "bad_key": {
                    "value": {
                      "error": "bad_key"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: over 120 lookups in 10 minutes. `quota`: today's logo allowance is used.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoLimit"
                }
              }
            }
          },
          "502": {
            "description": "The website did not answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "site_unreachable": {
                    "value": {
                      "error": "site_unreachable"
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "The website took too long.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "site_timeout": {
                    "value": {
                      "error": "site_timeout"
                    }
                  }
                }
              }
            }
          }
        },
        "x-rate-limit": {
          "lookups": 120,
          "per_seconds": 600,
          "scope": "workspace"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ps_live_ key",
        "description": "Your API key from Settings > API keys, as `Authorization: Bearer ps_live_...`. Keep it secret: it acts as your account."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "A short code, stable for your code to branch on."
          }
        },
        "additionalProperties": true
      },
      "Me": {
        "type": "object",
        "required": [
          "company",
          "key"
        ],
        "properties": {
          "company": {
            "type": "object",
            "required": [
              "slug",
              "name",
              "link_base",
              "plan"
            ],
            "properties": {
              "slug": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name_required": {
                "type": "boolean",
                "description": "The workspace has not chosen its company link yet (dashboard): until then `slug` and `link_base` are null."
              },
              "link_base": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "Every link of the workspace starts with this address."
              },
              "plan": {
                "type": "string",
                "examples": [
                  "free",
                  "creator",
                  "starter",
                  "pro",
                  "studio",
                  "enterprise"
                ],
                "description": "The plan id (pricing page)."
              }
            }
          },
          "key": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "prefix": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The first characters of the key, as Settings shows them."
              }
            }
          }
        }
      },
      "Proof": {
        "type": "object",
        "required": [
          "id",
          "slug",
          "url",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "prf_8c1e2f9a7b"
            ]
          },
          "slug": {
            "type": "string",
            "description": "The link code: the end of the link's address."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The address your customer opens."
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "product_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "approved",
              "draft",
              "archived"
            ],
            "description": "`active` and `approved` links are live; `archived` is offline."
          },
          "offline": {
            "type": "boolean",
            "description": "Taken offline by Proofscene support."
          },
          "protected": {
            "type": "boolean",
            "description": "The link asks for a password."
          },
          "file_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The proof PDF the link keeps."
          },
          "file_size": {
            "type": [
              "integer",
              "null"
            ]
          },
          "has_og": {
            "type": "boolean",
            "description": "The link has its own share picture."
          },
          "view_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_viewed_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "UTC, `YYYY-MM-DD HH:MM:SS`."
          },
          "created_at": {
            "type": "string",
            "description": "UTC, `YYYY-MM-DD HH:MM:SS`."
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "settings": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "The link's settings; `viewer: \"html\"` once a 3D proof is published on it."
          }
        }
      },
      "NewProofLink": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{1,58}[A-Za-z0-9]$|^[A-Za-z0-9]{1,2}$",
            "description": "Your own reference, such as the job number. A random code when left out."
          },
          "title": {
            "type": "string",
            "maxLength": 120
          },
          "client_name": {
            "type": "string",
            "maxLength": 120
          },
          "product_type": {
            "type": "string",
            "maxLength": 60
          },
          "password": {
            "type": "string",
            "description": "Ask for this password before the proof opens."
          }
        }
      },
      "NewJobFromUrl": {
        "type": "object",
        "description": "The proof PDF by its address (`url`), or as a ChatGPT action sends a file the user attached (`openaiFileIdRefs`).",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "An http or https address of the proof PDF (up to 32 MB). Redirects are followed."
          },
          "openaiFileIdRefs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 1,
            "description": "For GPT actions: the one proof-sheet PDF the user attached in the chat. ChatGPT fills it with the file's name and download link."
          },
          "proof_id": {
            "type": "string",
            "description": "Put the 3D proof on a link you reserved before."
          },
          "file_name": {
            "type": "string",
            "description": "The file name to keep; the address's own when left out."
          },
          "publish": {
            "description": "Publish it by itself once it is read: `true`, or the new link as `{ slug, title, client_name }`. For a password, reserve the link with it first and name it in `proof_id`.",
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "client_name": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            ]
          }
        }
      },
      "NewJob": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "stj_4kq9x2m1za"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued"
            ]
          },
          "file_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "file_size": {
            "type": [
              "integer",
              "null"
            ]
          },
          "proof_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "publish": {
            "type": "string",
            "enum": [
              "when_ready"
            ],
            "description": "Sent with `publish`: it goes live by itself once read."
          }
        }
      },
      "Job": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "syncing",
              "ready",
              "error"
            ]
          },
          "file_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "file_size": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The job name read from the proof sheet."
          },
          "product": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "What was read: type, label, material, thickness, size, shape, effects such as foil or raised UV."
          },
          "faces": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The sides with artwork, such as front and back."
          },
          "warnings": {
            "type": "array",
            "items": {}
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "A short code when the reading failed."
          },
          "problem": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "fix": {
                "type": "string"
              }
            },
            "description": "When the reading failed: what went wrong and what to change, in plain English."
          },
          "published": {
            "type": "boolean",
            "description": "Its link shows this reading."
          },
          "publish": {
            "type": "string",
            "enum": [
              "when_ready"
            ],
            "description": "Sent with `publish` and not live yet: it goes live by itself once read."
          },
          "publish_error": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "error": {
                "type": "string"
              },
              "status": {
                "type": "integer"
              },
              "limit": {
                "type": "integer"
              },
              "live": {
                "type": "integer"
              }
            },
            "description": "Why the publish asked for at upload was refused (such as `link_limit` or `slug_taken`). It is tried again on a read a minute later, or publish it yourself."
          },
          "proof": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Proof"
              },
              {
                "type": "null"
              }
            ],
            "description": "The link it is published on or was sent for."
          }
        }
      },
      "Publish": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "The new link's code (a random one when left out). Not used when the job already has a link."
          },
          "proof_id": {
            "type": "string",
            "description": "Publish onto a link you reserved before."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120,
            "description": "The link's title; the proof sheet's job name when left out on a new link. Left out or empty keeps the link's; `null` clears it."
          },
          "client_name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 120,
            "description": "Left out or empty keeps the link's; `null` clears it."
          },
          "password": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 4,
            "description": "Set a password; `null` removes it; leave it out (or empty) to keep the link's."
          }
        }
      },
      "Published": {
        "type": "object",
        "required": [
          "ok",
          "rev",
          "proof"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "rev": {
            "type": "string",
            "description": "The build now live on the link."
          },
          "proof": {
            "$ref": "#/components/schemas/Proof"
          }
        }
      },
      "LinkLimit": {
        "type": "object",
        "required": [
          "error",
          "limit",
          "live"
        ],
        "properties": {
          "error": {
            "const": "link_limit"
          },
          "limit": {
            "type": "integer"
          },
          "live": {
            "type": "integer"
          }
        }
      },
      "Quota": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "const": "quota_exceeded"
          },
          "limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "used": {
            "type": "integer"
          },
          "plan": {
            "type": "string"
          },
          "in_progress": {
            "type": "integer"
          },
          "resets_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LogoCandidate": {
        "type": "object",
        "required": [
          "id",
          "url",
          "kind",
          "source",
          "score"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "kind": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "score": {
            "type": "number"
          },
          "data_url": {
            "type": "string"
          },
          "light": {
            "type": "boolean"
          },
          "alpha": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "LogoQuota": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer"
          },
          "used": {
            "type": "integer"
          },
          "left": {
            "type": "integer"
          }
        }
      },
      "LogoResult": {
        "type": "object",
        "required": [
          "site",
          "name",
          "candidates",
          "quota"
        ],
        "properties": {
          "site": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogoCandidate"
            }
          },
          "quota": {
            "$ref": "#/components/schemas/LogoQuota"
          },
          "warnings": {
            "type": "array",
            "items": {}
          }
        }
      },
      "LogoLimit": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "rate_limited",
              "quota"
            ]
          },
          "quota": {
            "$ref": "#/components/schemas/LogoQuota"
          }
        }
      }
    }
  }
}
