{"openapi":"3.1.0","info":{"title":"Sealed Print API","version":"1.0.0","description":"The Sealed Print REST API. The web app uses it as well.\n\n## Authentication\n\n- **API token** for programs: `Authorization: Bearer sp_api_…`. Create tokens in the web app under\n  *Settings → API tokens*. A token belongs to the organization, acts on behalf of the person who created it with\n  at most their role, and can expire or be revoked.\n- **Session** for the web app: the cookie from `/api/auth/sign-in/email`.\n- **Relay token** (`rly_…`) for the relay client only.\n\n## Ingress channels\n\nJobs arrive through different ingress channels (printer URL, web upload, REST API …). Each channel can be switched on\nand off in the organization settings. For `POST /api/jobs` with an API token, the \"REST API\" ingress channel\nmust be enabled.\n\n## Errors\n\nErrors come as JSON with `statusCode` and `statusMessage`, validation errors additionally with details in `data`."},"servers":[{"url":"https://www.sealedprint.com"}],"tags":[{"name":"Jobs","description":"Submit, query, route and cancel print jobs. Members only see their own jobs, admins see all jobs of the organization."},{"name":"Live","description":"Server-sent events for the live queue."},{"name":"Sources","description":"Sources are computers or people that print via personal printer URLs (IPP)."},{"name":"Destinations (sinks)","description":"Destinations to which jobs are delivered."},{"name":"Settings","description":"Routing and ingress channels of the organization."},{"name":"API tokens","description":"Manage tokens for machine access. Only allowed in a browser session, not with an API token."},{"name":"Account","description":"Signed-in user and active organization."},{"name":"Billing","description":"Plans, usage and limits from Stripe. Plan changes and payment details open Stripe pages (Checkout, Customer Portal); the response contains their URL."},{"name":"Legal","description":"Terms of service acceptance and the cancellation button (§ 312k BGB)."},{"name":"Relay management","description":"Pair and disconnect relay clients and share their printers."},{"name":"Relay client","description":"Endpoints for the local relay client. Authentication with the binding token (rly_…)."},{"name":"IPP","description":"Printer endpoints per RFC 8010/8011. The body is a binary IPP message (application/ipp), followed by the document data. These endpoints are set up as printers in the operating system; they are not suited for trying out in this interface."},{"name":"Documentation","description":"This OpenAPI description."},{"name":"Authentication","description":"Sign-up, sign-in and organizations (Better Auth)."}],"paths":{"/api/jobs":{"get":{"tags":["Jobs"],"summary":"List jobs","description":"The latest jobs plus the ID of the last event. The live stream continues from this cursor without gaps (`/api/stream/jobs?lastEventId=…`).","operationId":"getApiJobs","responses":{"200":{"description":"Jobs and event cursor","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"lastEventId":{"type":"integer"}},"required":["jobs","lastEventId"],"additionalProperties":false}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]},"post":{"tags":["Jobs"],"summary":"Submit a job","description":"Submits a document (PDF, JPEG or PNG, max. 50 MB). Images are converted to PDF.\n\n- **With an API token** the job counts toward the \"REST API\" ingress channel, with a browser session toward \"Web upload\". The respective channel must be enabled in the settings, otherwise 403 follows.\n- **Raw body:** file content with a matching `Content-Type`, options as query parameters.\n- **multipart/form-data:** field `file`, optionally `name` and `sinkId`.\n\nWithout `sinkId` the organization's default routing applies.\n\n```bash\ncurl -X POST https://www.sealedprint.com/api/jobs?name=Invoice \\\n  -H \"Authorization: Bearer sp_api_…\" \\\n  -H \"Content-Type: application/pdf\" \\\n  --data-binary @invoice.pdf\n```","operationId":"postApiJobs","parameters":[{"name":"name","in":"query","required":false,"description":"Job name, defaults to the file name","schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"sinkId","in":"query","required":false,"description":"Fixed destination; without it the default routing applies","schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Job created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"File too large"},"415":{"description":"Format not supported"}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"description":"Document as a raw body or as a form with the field \"file\"","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string"},"sinkId":{"type":"string","format":"uuid"}},"required":["file"]}}}}}},"/api/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Get a job","operationId":"getApiJobsId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/jobs/{id}/document":{"get":{"tags":["Jobs"],"summary":"Download the document","description":"Returns the stored PDF. With `?download=1` as an attachment instead of for display.","operationId":"getApiJobsIdDocument","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}},{"name":"download","in":"query","required":false,"description":"Deliver as an attachment","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"PDF document","content":{"application/pdf":{"schema":{"type":"string"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/jobs/{id}/route":{"post":{"tags":["Jobs"],"summary":"Route a job to a destination","description":"Routes (or re-routes) waiting or failed jobs to a destination.","operationId":"postApiJobsIdRoute","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible in the current state"}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sinkId":{"type":"string","format":"uuid"}},"required":["sinkId"]}}}}}},"/api/jobs/{id}/cancel":{"post":{"tags":["Jobs"],"summary":"Cancel a job","operationId":"postApiJobsIdCancel","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Not possible in the current state"}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/jobs/{id}/deliveries":{"get":{"tags":["Jobs"],"summary":"Deliveries of a job","description":"Every attempt to hand the job to a destination, with its timeline. A job has several deliveries when it was rerouted. The job state summarizes the latest delivery.","operationId":"getApiJobsIdDeliveries","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"Deliveries, oldest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/share-target":{"post":{"tags":["Jobs"],"summary":"Web share target","description":"Receives files shared from other apps to the installed web app (multipart, field `file`, optional `title`). Counts as ingress channel “share”. Redirects to the queue (`/app/jobs?job=<id>`) or, on errors, to `/app/jobs?shareError=disabled|file|failed`; without a session to the sign-in page.\n\n**Access:** Browser session only, not with an API token.","operationId":"postShareTarget","responses":{"303":{"description":"Redirect to the queue or the sign-in page"},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"description":"Shared file","content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string"},"sinkId":{"type":"string","format":"uuid"}},"required":["file"]}}}}}},"/api/stream/changes":{"get":{"tags":["Live"],"summary":"Live invalidation events","description":"Server-sent events. First `ready`, then `invalidate` with `{ keys: [...] }` naming the data of the organization that changed (me, sources, sinks, relays, settings, integrations, ingress, apiTokens, members, billing); clients reload it. After a reconnect clients should reload everything.","operationId":"getApiStreamChanges","responses":{"200":{"description":"Event stream","content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/stream/jobs":{"get":{"tags":["Live"],"summary":"Live events of the queue","description":"Server-sent events. First comes `ready`, then `job.created` or `job.updated` (data: JobEvent as JSON) and `ping` every 20 seconds. Missed events are replayed from `Last-Event-ID` or `?lastEventId=`.","operationId":"getApiStreamJobs","parameters":[{"name":"lastEventId","in":"query","required":false,"description":"Continue after this event","schema":{"type":"integer"}}],"responses":{"200":{"description":"Event stream","content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/sources":{"get":{"tags":["Sources"],"summary":"List sources","operationId":"getApiSources","responses":{"200":{"description":"Sources with their printer URLs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Source"}}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]},"post":{"tags":["Sources"],"summary":"Create a source","operationId":"postApiSources","responses":{"201":{"description":"Created source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}}}},"/api/sources/{id}":{"delete":{"tags":["Sources"],"summary":"Revoke a source","description":"Printer URLs of this source that are already set up stop working afterwards.","operationId":"deleteApiSourcesId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/sources/{id}/rotate":{"post":{"tags":["Sources"],"summary":"Regenerate printer URLs","description":"Creates a new token. The old URLs become invalid immediately.","operationId":"postApiSourcesIdRotate","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"Source with new URLs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/sinks":{"get":{"tags":["Destinations (sinks)"],"summary":"List destinations","operationId":"getApiSinks","responses":{"200":{"description":"Destinations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Sink"}}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]},"post":{"tags":["Destinations (sinks)"],"summary":"Create a destination","description":"INFRA and IPP push destinations. Relay destinations are created by sharing a relay printer.\n\n**Access:** Requires the role admin or owner.","operationId":"postApiSinks","responses":{"201":{"description":"Created destination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sink"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"slug":{"type":"string","minLength":2,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"type":{"type":"string","enum":["relay","infra","ipp-push"]},"pushUri":{"type":"string","pattern":"^ipps?:\\/\\/\\S+$"}},"required":["name","slug","type"]}}}}}},"/api/sinks/{id}":{"patch":{"tags":["Destinations (sinks)"],"summary":"Update a destination","description":"**Access:** Requires the role admin or owner.","operationId":"patchApiSinksId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated destination","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sink"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"pushUri":{"type":"string","pattern":"^ipps?:\\/\\/\\S+$"}}}}}}},"delete":{"tags":["Destinations (sinks)"],"summary":"Delete a destination","description":"**Access:** Requires the role admin or owner.","operationId":"deleteApiSinksId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/sinks/{id}/device":{"get":{"tags":["Destinations (sinks)"],"summary":"Device credentials of an INFRA printer","description":"Setup data for a native INFRA printer (PWG 5100.18): the INFRA URI, user name and password the printer uses to fetch jobs. Only for destinations of type `infra`.\n\n**Access:** Requires the role admin or owner.","operationId":"getApiSinksIdDevice","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"Credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCredentials"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/sinks/{id}/device/rotate":{"post":{"tags":["Destinations (sinks)"],"summary":"Renew the device password of an INFRA printer","description":"The old password stops working immediately; the printer has to be reconfigured.\n\n**Access:** Requires the role admin or owner.","operationId":"postApiSinksIdDeviceRotate","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"New credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceCredentials"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/settings":{"get":{"tags":["Settings"],"summary":"Get settings","operationId":"getApiSettings","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]},"put":{"tags":["Settings"],"summary":"Update settings","description":"**Access:** Requires the role admin or owner.","operationId":"putApiSettings","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"defaultSinkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"autoRoute":{"type":"boolean"}}}}}}}},"/api/integrations":{"get":{"tags":["Settings"],"summary":"List integrations","description":"Delivery channels of the organization. The relay client integration is always active.","operationId":"getApiIntegrations","responses":{"200":{"description":"Integrations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Integration"}}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/integrations/{channel}":{"put":{"tags":["Settings"],"summary":"Enable or disable an integration","description":"With integrations other than Sealed Print printing, documents leave Sealed Print.\n\n**Access:** Requires the role admin or owner.","operationId":"putApiIntegrationsChannel","parameters":[{"name":"channel","in":"path","required":true,"description":"Integration: relay, infra, ipp-push","schema":{"type":"string"}}],"responses":{"200":{"description":"New state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The default integration cannot be switched off"}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}}}},"/api/ingress":{"get":{"tags":["Settings"],"summary":"List ingress channels","description":"All ingress channels with their state.","operationId":"getApiIngress","responses":{"200":{"description":"Ingress channels","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Ingress"}}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/ingress/{channel}":{"put":{"tags":["Settings"],"summary":"Enable or disable an ingress channel","description":"**Access:** Requires the role admin or owner.","operationId":"putApiIngressChannel","parameters":[{"name":"channel","in":"path","required":true,"description":"Ingress channel: ipp, upload, api, share","schema":{"type":"string"}}],"responses":{"200":{"description":"New state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ingress"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}}}},"/api/api-tokens":{"get":{"tags":["API tokens"],"summary":"List API tokens","description":"Admins see all tokens of the organization, members only their own.\n\n**Access:** Browser session only, not with an API token.","operationId":"getApiApiTokens","responses":{"200":{"description":"Tokens (without secret)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiToken"}}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}]},"post":{"tags":["API tokens"],"summary":"Create an API token","description":"The token starts with `sp_api_` and is shown in full only in this response. It acts on behalf of the person who created it, with at most their role, and becomes invalid when that person leaves the organization.\n\n**Access:** Browser session only, not with an API token.","operationId":"postApiApiTokens","responses":{"201":{"description":"Token including secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiToken"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"What the token is used for, e.g. “Accounting export”"},"role":{"default":"member","description":"Permissions; at most your own role","type":"string","enum":["member","admin"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Expiry, null = never expires"}},"required":["name","expiresAt"]}}}}}},"/api/api-tokens/{id}":{"patch":{"tags":["API tokens"],"summary":"Rename an API token","description":"**Access:** Browser session only, not with an API token.","operationId":"patchApiApiTokensId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"Token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiToken"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}}},"delete":{"tags":["API tokens"],"summary":"Revoke an API token","description":"Permanent. The token stays visible in the list as \"revoked\".\n\n**Access:** Browser session only, not with an API token.","operationId":"deleteApiApiTokensId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}]}},"/api/me":{"get":{"tags":["Account"],"summary":"User and organization","operationId":"getApiMe","responses":{"200":{"description":"Context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/me/terms":{"post":{"tags":["Legal"],"summary":"Accept the terms of service","description":"Records that the signed-in person accepted the terms of service in the given version.\n\n**Access:** Browser session only, not with an API token.","operationId":"postApiMeTerms","responses":{"204":{"description":"Recorded"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string","minLength":1,"maxLength":20,"description":"Version (date) of the accepted terms of service"}},"required":["version"]}}}}}},"/api/legal/cancellation":{"post":{"tags":["Legal"],"summary":"Cancel a contract","description":"Public. Cancellation declaration as on the page “Cancel contracts here”: the confirmation with content and time of receipt is sent to the given email address. Limited to 5 requests per hour and IP address.","operationId":"postApiLegalCancellation","responses":{"201":{"description":"Received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancellationReceipt"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["ordinary","extraordinary"],"description":"Ordinary or extraordinary (for good cause)"},"reason":{"description":"Reason; required for an extraordinary cancellation","type":"string","maxLength":2000},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email","description":"The confirmation is sent to this address"},"organization":{"type":"string","minLength":1,"maxLength":120,"description":"Organization or contract to cancel"},"date":{"description":"Requested date; without it the next possible date","type":"string","format":"date"}},"required":["kind","name","email","organization"]}}}}}},"/api/organizations/{id}":{"patch":{"tags":["Account"],"summary":"Rename the active organization","description":"**Access:** Browser session only, not with an API token.","operationId":"patchApiOrganizationsId","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the active organization","schema":{"type":"string"}}],"responses":{"200":{"description":"Renamed organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMembership"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}}},"delete":{"tags":["Account"],"summary":"Delete the active organization","description":"Owners only. Cancels the Stripe subscription; all data of the organization (sources, destinations, jobs, documents, members) is deleted when Stripe confirms. User accounts are kept.\n\n**Access:** Browser session only, not with an API token.","operationId":"deleteApiOrganizationsId","parameters":[{"name":"id","in":"path","required":true,"description":"ID of the active organization","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion started or done","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationDeletion"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}]}},"/api/organizations":{"post":{"tags":["Account"],"summary":"Create an organization","description":"Creates a new organization with the signed-in user as owner. It does not become active automatically; switch to it with `POST /api/auth/organization/set-active`.\n\n**Access:** Browser session only, not with an API token.","operationId":"postApiOrganizations","responses":{"201":{"description":"Created organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMembership"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"]}}}}}},"/api/billing":{"get":{"tags":["Billing"],"summary":"Plan, usage and limits","description":"**Access:** Requires the role admin or owner.","operationId":"getApiBilling","responses":{"200":{"description":"Billing state of the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/billing/plans":{"get":{"tags":["Billing"],"summary":"Available plans","description":"Public. Prices in cents without VAT, as configured in Stripe. Customers in euro countries pay in EUR, all others in USD; without `currency` the browser language decides.","operationId":"getApiBillingPlans","parameters":[{"name":"currency","in":"query","required":false,"description":"Currency of the prices (eur or usd)","schema":{"type":"string","enum":["eur","usd"]}}],"responses":{"200":{"description":"Plans","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BillingPlan"}}}}}},"security":[]}},"/api/billing/details":{"put":{"tags":["Billing"],"summary":"Set billing address and VAT ID","description":"Needed before the first payment. Decides the VAT: German VAT for Germany and EU customers without a VAT ID, reverse charge with an EU VAT ID, no German VAT outside the EU.\n\n**Access:** Browser session only, not with an API token.","operationId":"putApiBillingDetails","responses":{"200":{"description":"Billing state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"country":{"type":"string","pattern":"^[A-Za-z]{2}$"},"line1":{"type":"string","minLength":1,"maxLength":120},"line2":{"type":"string","maxLength":120},"postalCode":{"type":"string","minLength":1,"maxLength":20},"city":{"type":"string","minLength":1,"maxLength":80},"vatId":{"anyOf":[{"type":"string","maxLength":20,"pattern":"^[A-Za-z]{2}[A-Za-z0-9 ]{2,16}$"},{"type":"string","const":""}]}},"required":["name","country","line1","postalCode","city"]}}}}}},"/api/billing/plan":{"post":{"tags":["Billing"],"summary":"Change the plan","description":"From Free to a paid plan the response contains a Stripe Checkout URL that collects the payment method. Between paid plans the change applies at once (prorated); to Free at the end of the period. Ordering a paid plan requires `confirmed` and `immediateStart` (409 `order_confirmation_required` otherwise) and sends the contract confirmation by email.\n\n**Access:** Browser session only, not with an API token.","operationId":"postApiBillingPlan","responses":{"200":{"description":"Redirect if needed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRedirect"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","team","business"]},"confirmed":{"description":"Order summary confirmed; required for paid plans","type":"boolean"},"immediateStart":{"description":"Request to begin before the withdrawal period ends; required for paid plans","type":"boolean"}},"required":["plan"]}}}}}},"/api/billing/portal":{"post":{"tags":["Billing"],"summary":"Open the Stripe Customer Portal","description":"Payment methods, billing address, VAT ID and invoices.\n\n**Access:** Browser session only, not with an API token.","operationId":"postApiBillingPortal","responses":{"200":{"description":"Portal URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRedirect"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}]}},"/api/billing/payment-method":{"post":{"tags":["Billing"],"summary":"Add a payment method","description":"Stripe Checkout in setup mode, e.g. for additional seats on the Free plan.\n\n**Access:** Browser session only, not with an API token.","operationId":"postApiBillingPaymentMethod","responses":{"200":{"description":"Checkout URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRedirect"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}]}},"/api/billing/webhook":{"post":{"tags":["Billing"],"summary":"Stripe webhook","description":"Called by Stripe only (signature in the Stripe-Signature header).","operationId":"postApiBillingWebhook","responses":{"200":{"description":"Event processed"}},"security":[],"requestBody":{"required":true,"description":"Stripe event","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}}},"/api/relays":{"get":{"tags":["Relay management"],"summary":"Paired relay clients","operationId":"getApiRelays","responses":{"200":{"description":"Relay clients with printers","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelayBinding"}}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/relays/{id}":{"delete":{"tags":["Relay management"],"summary":"Disconnect a relay client","description":"**Access:** Requires the role admin or owner.","operationId":"deleteApiRelaysId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"204":{"description":"Disconnected"},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/relays/printers/{id}":{"patch":{"tags":["Relay management"],"summary":"Share a relay printer","description":"A shared printer becomes a destination. Printers blocked by the loop guard return 409.","operationId":"patchApiRelaysPrintersId","parameters":[{"name":"id","in":"path","required":true,"description":"UUID of the entry","schema":{"type":"string"}}],"responses":{"200":{"description":"New sharing state","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shared":{"type":"boolean"},"sinkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["id","shared","sinkId"],"additionalProperties":false}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Printer must not become a destination (loop guard)"}},"security":[{"apiToken":[]},{"session":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shared":{"type":"boolean"}},"required":["shared"]}}}}}},"/api/relays/pairing/{code}":{"get":{"tags":["Relay management"],"summary":"Show a pairing request","description":"**Access:** Requires the role admin or owner.","operationId":"getApiRelaysPairingCode","parameters":[{"name":"code","in":"path","required":true,"description":"Code shown on the relay client","schema":{"type":"string"}}],"responses":{"200":{"description":"Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairingInfo"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"apiToken":[]},{"session":[]}]}},"/api/relays/pairing/{code}/approve":{"post":{"tags":["Relay management"],"summary":"Approve pairing","description":"**Access:** Requires the role admin or owner. Browser session only, not with an API token.","operationId":"postApiRelaysPairingCodeApprove","parameters":[{"name":"code","in":"path","required":true,"description":"Code shown on the relay client","schema":{"type":"string"}}],"responses":{"200":{"description":"Approved","content":{"application/json":{"schema":{"type":"object","properties":{"approved":{"type":"boolean","const":true}},"required":["approved"],"additionalProperties":false}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}]}},"/api/relays/pairing/{code}/deny":{"post":{"tags":["Relay management"],"summary":"Deny pairing","description":"**Access:** Requires the role admin or owner. Browser session only, not with an API token.","operationId":"postApiRelaysPairingCodeDeny","parameters":[{"name":"code","in":"path","required":true,"description":"Code shown on the relay client","schema":{"type":"string"}}],"responses":{"200":{"description":"Denied","content":{"application/json":{"schema":{"type":"object","properties":{"denied":{"type":"boolean","const":true}},"required":["denied"],"additionalProperties":false}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"session":[]}]}},"/api/relay/pair/start":{"post":{"tags":["Relay client"],"summary":"Start pairing","description":"No sign-in required. Returns a device code (secret) and a user code for display.","operationId":"postApiRelayPairStart","responses":{"200":{"description":"Codes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairStartResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"installationId":{"type":"string","minLength":8,"maxLength":100},"hostname":{"type":"string","maxLength":200},"platform":{"type":"string","maxLength":50},"version":{"type":"string","maxLength":50}},"required":["installationId"]}}}}}},"/api/relay/pair/poll":{"post":{"tags":["Relay client"],"summary":"Poll pairing status","description":"After approval the binding token is delivered exactly once.","operationId":"postApiRelayPairPoll","responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairPollResponse"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","maxLength":200,"format":"starts_with"}},"required":["deviceCode"]}}}}}},"/api/relay/config":{"get":{"tags":["Relay client"],"summary":"Get configuration","operationId":"getApiRelayConfig","responses":{"200":{"description":"Shared printers and INFRA endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelayConfig"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"relayToken":[]}]}},"/api/relay/printers":{"put":{"tags":["Relay client"],"summary":"Report printer inventory","operationId":"putApiRelayPrinters","responses":{"204":{"description":"Saved"},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"relayToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string","maxLength":50},"printers":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"localName":{"type":"string","minLength":1,"maxLength":200},"uri":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["localName"]}}},"required":["printers"]}}}}}},"/api/relay/stream":{"get":{"tags":["Relay client"],"summary":"Wake-up channel","description":"Server-sent events: `ready`, `job.available`, `config.changed`, `revoked`, `ping`.","operationId":"getApiRelayStream","responses":{"200":{"description":"Event stream","content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"relayToken":[]}]}},"/api/releases/relay":{"get":{"tags":["Relay client"],"summary":"Latest relay client release","description":"Version and downloads of the relay client. Only releases with a valid signature are listed.","operationId":"getApiReleasesRelay","responses":{"200":{"description":"Release","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelayRelease"}}}}},"security":[]}},"/downloads/{path}":{"get":{"tags":["Relay client"],"summary":"Download a release file","description":"Signed manifest (`relay/manifest.json`, checked by the client against the compiled-in Ed25519 key), binaries (`relay/<version>/<file>`) and tools such as SumatraPDF (`tools/<file>`, checked against a pinned SHA-256).","operationId":"getDownloadsPath","parameters":[{"name":"path","in":"path","required":true,"description":"relay/manifest.json, relay/<version>/<file> or tools/<file>","schema":{"type":"string"}}],"responses":{"200":{"description":"File","content":{"application/octet-stream":{"schema":{"type":"string"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/ipp/print/{token}":{"post":{"tags":["IPP"],"summary":"Printer URL (default routing)","description":"IPP Everywhere printer of a source. Supports Print-Job, Validate-Job, Create-Job, Send-Document, Cancel-Job, Cancel-My-Jobs, Get-Job-Attributes, Get-Jobs, Get-Printer-Attributes, Close-Job and Identify-Printer. Formats: PDF, JPEG, PNG and PWG raster. The token in the URL is the access key. Requires the \"Printer URL (IPP)\" ingress channel to be enabled.","operationId":"postIppPrintToken","parameters":[{"name":"token","in":"path","required":true,"description":"Source token (src_…)","schema":{"type":"string"}}],"responses":{"200":{"description":"IPP response","content":{"application/ipp":{"schema":{"type":"string"}}}},"403":{"description":"Ingress channel disabled"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[],"requestBody":{"required":true,"description":"IPP message, possibly with document data","content":{"application/ipp":{"schema":{"type":"string","format":"binary"}}}}}},"/ipp/print/{token}/{sink}":{"post":{"tags":["IPP"],"summary":"Printer URL with a fixed destination","description":"Like the default URL, but every job goes directly to the given destination.","operationId":"postIppPrintTokenSink","parameters":[{"name":"token","in":"path","required":true,"description":"Source token (src_…)","schema":{"type":"string"}},{"name":"sink","in":"path","required":true,"description":"Short name (slug) of the destination","schema":{"type":"string"}}],"responses":{"200":{"description":"IPP response","content":{"application/ipp":{"schema":{"type":"string"}}}},"403":{"description":"Ingress channel disabled"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[],"requestBody":{"required":true,"description":"IPP message, possibly with document data","content":{"application/ipp":{"schema":{"type":"string","format":"binary"}}}}}},"/ipp/infra/{sinkId}":{"post":{"tags":["IPP"],"summary":"INFRA endpoint of a destination","description":"Infrastructure Printer per PWG 5100.18 for relay clients and INFRA-capable printers: Get-Jobs, Fetch-Job, Acknowledge-Job, Fetch-Document, Acknowledge-Document, Update-Job-Status, Update-Document-Status, Update-Output-Device-Attributes, Get-Output-Device-Attributes.","operationId":"postIppInfraSinkId","parameters":[{"name":"sinkId","in":"path","required":true,"description":"UUID of the destination","schema":{"type":"string"}}],"responses":{"200":{"description":"IPP response, possibly with document data","content":{"application/ipp":{"schema":{"type":"string"}}}},"401":{"description":"Not signed in or token invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"relayToken":[]},{"deviceBasic":[]}],"requestBody":{"required":true,"description":"IPP message","content":{"application/ipp":{"schema":{"type":"string","format":"binary"}}}}}},"/llms.txt":{"get":{"tags":["Documentation"],"summary":"Index for AI agents (llms.txt)","description":"Short Markdown overview with links to the full guide and the API description (llmstxt.org).","operationId":"getLlmsTxt","responses":{"200":{"description":"Markdown","content":{"text/markdown":{"schema":{"type":"string"}}}}},"security":[]}},"/llms-full.txt":{"get":{"tags":["Documentation"],"summary":"Complete guide for developers and AI agents","description":"Concepts, printing setup, API usage with examples and the list of all endpoints in Markdown.","operationId":"getLlmsFullTxt","responses":{"200":{"description":"Markdown","content":{"text/markdown":{"schema":{"type":"string"}}}}},"security":[]}},"/.well-known/api-catalog":{"get":{"tags":["Documentation"],"summary":"API catalog (RFC 9727)","description":"Linkset pointing to the OpenAPI description and the documentation.","operationId":"getWellKnownApiCatalog","responses":{"200":{"description":"Linkset","content":{"application/linkset+json":{"schema":{"type":"string"}}}}},"security":[]}},"/robots.txt":{"get":{"tags":["Documentation"],"summary":"Robots rules","description":"Only production (ENVIRONMENT=production) may be crawled; staging and development disallow everything.","operationId":"getRobotsTxt","responses":{"200":{"description":"Plain text","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[]}},"/sitemap.xml":{"get":{"tags":["Documentation"],"summary":"Sitemap of the public pages","description":"Only available in production.","operationId":"getSitemapXml","responses":{"200":{"description":"XML sitemap","content":{"application/xml":{"schema":{"type":"string"}}}},"404":{"description":"Not production"}},"security":[]}},"/api/health":{"get":{"tags":["Documentation"],"summary":"Health check","description":"For load balancers and deploys: 200 when the database is reachable and migrations are applied.","operationId":"getApiHealth","responses":{"200":{"description":"Healthy"},"503":{"description":"Starting (migrations running) or database unavailable"}},"security":[]}},"/api/openapi.json":{"get":{"tags":["Documentation"],"summary":"OpenAPI description","operationId":"getApiOpenapiJson","responses":{"200":{"description":"OpenAPI 3.1"}},"security":[]}},"/api/auth/get-session":{"get":{"tags":["Authentication"],"description":"Get the current session","operationId":"getSession","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}},"post":{"tags":["Authentication"],"description":"Get the current session","operationId":"getSessionPost","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/sign-out":{"post":{"tags":["Authentication"],"description":"Sign out the current user","operationId":"signOut","security":[],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The URL to redirect to after provider logout"},"disableRedirect":{"type":"boolean","description":"Return the provider logout URL without redirecting"},"state":{"type":"string","description":"State to pass to the provider logout endpoint"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string","description":"Provider logout URL when RP-initiated logout is available"},"redirect":{"type":"boolean","description":"Whether the client should redirect to the provider logout URL"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/sign-up/email":{"post":{"tags":["Authentication"],"description":"Sign up a user using email and password","operationId":"signUpWithEmailAndPassword","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"image":{"type":"string","description":"The profile image URL of the user"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"required":["name","email","password"]}}}},"responses":{"200":{"description":"Successfully created user","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"Authentication token for the session"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"422":{"description":"Unprocessable Entity. User already exists or failed to create user.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/sign-in/email":{"post":{"tags":["Authentication"],"description":"Sign in with email and password","operationId":"signInEmail","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user"},"password":{"type":"string","description":"Password of the user"},"callbackURL":{"type":"string","description":"Callback URL to use as a redirect for email verification"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"required":["email","password"]}}}},"responses":{"200":{"description":"Success - Returns either session details or redirect URL","content":{"application/json":{"schema":{"type":"object","description":"Session response when idToken is provided","properties":{"redirect":{"type":"boolean","enum":[false]},"token":{"type":"string","description":"Session token"},"url":{"type":"string","nullable":true},"user":{"type":"object","$ref":"#/components/schemas/User"}},"required":["redirect","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/reset-password":{"post":{"tags":["Authentication"],"description":"Reset the password for a user","operationId":"resetPassword","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"token":{"type":"string","description":"The token to reset the password"}},"required":["newPassword"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/verify-password":{"post":{"tags":["Authentication"],"description":"Verify the current user's password","operationId":"verifyPassword","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The password to verify"}},"required":["password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/verify-email":{"get":{"tags":["Authentication"],"description":"Verify the email of the user","security":[],"parameters":[{"name":"token","in":"query","description":"The token to verify the email","required":true,"schema":{"type":"string"}},{"name":"callbackURL","in":"query","description":"The URL to redirect to after email verification","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the email was verified successfully"}},"required":["user","status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/send-verification-email":{"post":{"tags":["Authentication"],"description":"Send a verification email to the user","operationId":"sendVerificationEmail","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email to send the verification email to","example":"user@example.com"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback","example":"https://example.com/callback","nullable":true}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the email was sent successfully","example":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Verification email isn't enabled"}}}}}},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/change-email":{"post":{"tags":["Authentication"],"operationId":"changeEmail","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","description":"The new email address to set must be a valid email address"},"callbackURL":{"type":"string","description":"The URL to redirect to after email verification"}},"required":["newEmail"]}}}},"responses":{"200":{"description":"Email change request processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the request was successful"},"message":{"type":"string","enum":["Email updated","Verification email sent"],"description":"Status message of the email change process","nullable":true}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/change-password":{"post":{"tags":["Authentication"],"description":"Change the password of the user","operationId":"changePassword","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"currentPassword":{"type":"string","description":"The current password is required"},"revokeOtherSessions":{"type":"boolean","description":"Must be a boolean value"}},"required":["newPassword","currentPassword"]}}}},"responses":{"200":{"description":"Password successfully changed","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"New session token if other sessions were revoked"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/update-session":{"post":{"tags":["Authentication"],"description":"Update the current session","operationId":"updateSession","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string","description":"Field name must be a string"},"additionalProperties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","$ref":"#/components/schemas/Session"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/update-user":{"post":{"tags":["Authentication"],"description":"Update the current user","operationId":"updateUser","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","description":"The image of the user","nullable":true}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/delete-user":{"post":{"tags":["Authentication"],"description":"Delete the user","operationId":"deleteUser","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The callback URL to redirect to after the user is deleted"},"password":{"type":"string","description":"The user's password. Required if session is not fresh"},"token":{"type":"string","description":"The deletion verification token"}}}}}},"responses":{"200":{"description":"User deletion processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"message":{"type":"string","enum":["User deleted","Verification email sent"],"description":"Status message of the deletion process"}},"required":["success","message"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/request-password-reset":{"post":{"tags":["Authentication"],"description":"Send a password reset email to the user","operationId":"requestPasswordReset","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to send a password reset email to"},"redirectTo":{"type":"string","description":"The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/reset-password/{token}":{"get":{"tags":["Authentication"],"description":"Redirects the user to the callback URL with the token","operationId":"resetPasswordCallback","security":[],"parameters":[{"name":"token","in":"path","required":true,"description":"The token to reset the password","schema":{"type":"string"}},{"name":"callbackURL","in":"query","required":true,"description":"The URL to redirect the user to reset their password","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/list-sessions":{"get":{"tags":["Authentication"],"description":"List all active sessions for the user","operationId":"listUserSessions","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/revoke-session":{"post":{"tags":["Authentication"],"description":"Revoke a single session","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The token to revoke"}},"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the session was revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/revoke-sessions":{"post":{"tags":["Authentication"],"description":"Revoke all sessions for the user","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/revoke-other-sessions":{"post":{"tags":["Authentication"],"description":"Revoke all other sessions for the user except the current one","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all other sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/ok":{"get":{"tags":["Authentication"],"description":"Check if the API is working","security":[],"parameters":[],"responses":{"200":{"description":"API is working","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Indicates if the API is working"}},"required":["ok"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/error":{"get":{"tags":["Authentication"],"description":"Displays an error page","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","description":"The HTML content of the error page"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/create":{"post":{"tags":["Authentication"],"description":"Create an organization","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the organization"},"slug":{"type":"string","minLength":1,"description":"The slug of the organization"},"userId":{"type":"string","description":"The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: \"user-id\""},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The metadata of the organization"},"keepCurrentActiveOrganization":{"type":"boolean","description":"Whether to keep the current active organization active after creating a new one. Eg: true"}},"required":["name","slug"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization that was created","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/update":{"post":{"tags":["Authentication"],"description":"Update an organization","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the organization"},"slug":{"type":"string","minLength":1,"description":"The slug of the organization"},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The metadata of the organization"}}},"organizationId":{"type":"string","description":"The organization ID. Eg: \"org-id\""}},"required":["data"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The updated organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/delete":{"post":{"tags":["Authentication"],"description":"Delete an organization","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization id to delete"}},"required":["organizationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string","description":"The organization id that was deleted"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/set-active":{"post":{"tags":["Authentication"],"description":"Set the active organization","operationId":"setActiveOrganization","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":["string","null"],"description":"The organization id to set as active. It can be null to unset the active organization. Eg: \"org-id\""},"organizationSlug":{"type":"string","description":"The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: \"org-slug\""}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-organization":{"get":{"tags":["Authentication"],"description":"Get the organization metadata","operationId":"getOrganization","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-full-organization":{"get":{"tags":["Authentication"],"description":"Get the full organization","operationId":"getFullOrganization","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list":{"get":{"tags":["Authentication"],"description":"List all organizations","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/invite-member":{"post":{"tags":["Authentication"],"description":"Create an invitation to an organization","operationId":"createOrganizationInvitation","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to invite"},"role":{"anyOf":[{"type":"string","description":"The role to assign to the user"},{"type":"array","items":{"type":"string","description":"The roles to assign to the user"}}],"description":"The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\""},"organizationId":{"type":"string","description":"The organization ID to invite the user to"},"resend":{"type":"boolean","description":"Resend the invitation email, if the user is already invited. Eg: true"},"teamId":{"anyOf":[{"type":"string","description":"The team ID to invite the user to"},{"type":"array","items":{"type":"string"},"description":"The team IDs to invite the user to"}]}},"required":["email","role"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","createdAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/cancel-invitation":{"post":{"tags":["Authentication"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to cancel"}},"required":["invitationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/accept-invitation":{"post":{"tags":["Authentication"],"description":"Accept an invitation to an organization","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to accept"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-invitation":{"get":{"tags":["Authentication"],"description":"Get an invitation by ID","security":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string","description":"The ID of the invitation to get"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"inviterEmail":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","organizationName","organizationSlug","inviterEmail"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/reject-invitation":{"post":{"tags":["Authentication"],"description":"Reject an invitation to an organization","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to reject"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object","nullable":true}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list-invitations":{"get":{"tags":["Authentication"],"security":[],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-active-member":{"get":{"tags":["Authentication"],"description":"Get the member details of the active organization","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/check-slug":{"post":{"tags":["Authentication"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"The organization slug to check. Eg: \"my-org\""}},"required":["slug"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/remove-member":{"post":{"tags":["Authentication"],"description":"Remove a member from an organization","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"memberIdOrEmail":{"type":"string","description":"The ID or email of the member to remove"},"organizationId":{"type":"string","description":"The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\""}},"required":["memberIdOrEmail"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/update-member-role":{"post":{"tags":["Authentication"],"description":"Update the role of a member in an organization","operationId":"updateOrganizationMemberRole","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]"},"memberId":{"type":"string","description":"The member id to apply the role update to. Eg: \"member-id\""},"organizationId":{"type":"string","description":"An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: \"organization-id\""}},"required":["role","memberId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/leave":{"post":{"tags":["Authentication"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization Id for the member to leave. Eg: \"organization-id\""}},"required":["organizationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list-user-invitations":{"get":{"tags":["Authentication"],"description":"List all invitations a user has received","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"inviterId":{"type":"string","description":"The ID of the user who created the invitation"},"teamId":{"type":"string","description":"The ID of the team associated with the invitation","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","organizationName","inviterId","status","expiresAt","createdAt"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/list-members":{"get":{"tags":["Authentication"],"security":[],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/get-active-member-role":{"get":{"tags":["Authentication"],"security":[],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/auth/organization/has-permission":{"post":{"tags":["Authentication"],"description":"Check if the user has permission","security":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"object","description":"The permission to check","deprecated":true},"permissions":{"type":"object","description":"The permission to check"}},"required":["permissions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}}},"components":{"schemas":{"PrinterUrl":{"type":"object","properties":{"label":{"type":"string","description":"Display name, e.g. “Default routing” or the name of the destination (sink)"},"sinkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Fixed destination (sink) of this URL, null for the default routing"},"url":{"type":"string","format":"uri","description":"Printer URL to set up in the operating system"}},"required":["label","sinkId","url"],"additionalProperties":false},"Source":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"tokenPrefix":{"type":"string","description":"Beginning of the source token, to tell sources apart"},"createdByName":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Last IPP contact"},"urls":{"type":"array","items":{"$ref":"#/components/schemas/PrinterUrl"}}},"required":["id","name","tokenPrefix","createdByName","createdAt","lastSeenAt","urls"],"additionalProperties":false},"Sink":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["relay","infra","ipp-push"]},"channel":{"type":"string","enum":["relay","infra","ipp-push"],"description":"Delivery channel (integration) of this destination"},"state":{"type":"string","enum":["online","offline"],"description":"Pull channels: derived from the device's last sign of life; push channels are always online"},"pushUri":{"type":["string","null"]},"isDefault":{"type":"boolean","description":"Default destination for automatic routing"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","slug","name","type","channel","state","pushUri","isDefault","createdAt"],"additionalProperties":false},"JobState":{"type":"string","enum":["received","pending_routing","queued","fetched","printing","completed","failed","canceled"],"description":"received = sealed (accepted), pending_routing = awaiting assignment, queued/fetched/printing = in transit, completed = delivered, failed = failed, canceled = canceled"},"JobStateReason":{"type":"string","enum":["delivery_retry","delivery_failed","canceled_by_source","canceled_in_app","submission_incomplete","document_invalid","quota_documents","quota_document_size"],"description":"Machine-readable reason for the current state; stateMessage holds details or device text"},"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","description":"Sequential job number (IPP job-id)"},"name":{"type":"string"},"state":{"$ref":"#/components/schemas/JobState"},"stateReason":{"anyOf":[{"$ref":"#/components/schemas/JobStateReason"},{"type":"null"}]},"stateMessage":{"type":["string","null"]},"ingress":{"type":"string","enum":["ipp","upload","api","share"],"description":"Ingress channel through which the job was submitted"},"format":{"type":"string","description":"Stored format, always application/pdf"},"originalFormat":{"description":"Submitted format, if converted","type":["string","null"]},"sizeBytes":{"type":"integer"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}]},"hasDocument":{"type":"boolean"},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"sink":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"submittedBy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"originatingUser":{"description":"User name as reported by the IPP source","type":["string","null"]},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Job attributes (copies, duplex, media …)"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","number","name","state","stateReason","stateMessage","ingress","format","originalFormat","sizeBytes","pages","hasDocument","source","sink","submittedBy","originatingUser","attributes","createdAt","updatedAt","completedAt"],"additionalProperties":false},"JobEvent":{"type":"object","properties":{"id":{"type":"integer","description":"Event ID, usable as Last-Event-ID for replay"},"type":{"type":"string","enum":["job.created","job.updated"]},"job":{"$ref":"#/components/schemas/Job"}},"required":["id","type","job"],"additionalProperties":false},"Settings":{"type":"object","properties":{"defaultSinkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"autoRoute":{"type":"boolean"}},"required":["defaultSinkId","autoRoute"],"additionalProperties":false},"OrganizationMembership":{"type":"object","properties":{"id":{"type":"string","description":"ID of the organization"},"name":{"type":"string"},"role":{"type":"string","description":"Role of the signed-in user: owner, admin or member"}},"required":["id","name","role"],"additionalProperties":false},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}},"required":["id","name","email"],"additionalProperties":false},"role":{"type":"string"},"isAdmin":{"type":"boolean"},"isOwner":{"type":"boolean"},"authenticatedVia":{"type":"string","enum":["session","api-token"]},"organization":{"$ref":"#/components/schemas/OrganizationMembership"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMembership"}}},"required":["role","isAdmin","isOwner","authenticatedVia","organizations"],"additionalProperties":false},"DeviceCredentials":{"type":"object","properties":{"infraUri":{"type":"string","description":"INFRA URI (Infrastructure Printer) to configure in the printer"},"username":{"type":"string","description":"User name for HTTP Basic (the destination's short name)"},"password":{"type":"string","description":"Device password (sp_dev_…); also accepted as bearer token"}},"required":["infraUri","username","password"],"additionalProperties":false},"RelayRelease":{"type":"object","properties":{"release":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"releasedAt":{"type":"string","format":"date-time"},"files":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string","description":"Platform, e.g. win32-x64, darwin-arm64, linux-x64"},"file":{"type":"string"},"sha256":{"type":"string"},"size":{"type":"integer"},"url":{"type":"string","description":"Download path on this server"}},"required":["target","file","sha256","size","url"],"additionalProperties":false}}},"required":["version","releasedAt","files"],"additionalProperties":false},{"type":"null"}],"description":"null if no release has been published yet"}},"required":["release"],"additionalProperties":false},"DeliveryEvent":{"type":"object","properties":{"id":{"type":"integer"},"phase":{"type":"string","enum":["pending","accepted","in_progress","retry_scheduled","delivered","failed","canceled"]},"channelState":{"description":"Raw state reported by the device or provider","type":["string","null"]},"message":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","phase","channelState","message","createdAt"],"additionalProperties":false},"Delivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"sink":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"Destination (sink); null if it was deleted"},"channel":{"type":"string","enum":["relay","infra","ipp-push"]},"phase":{"type":"string","enum":["pending","accepted","in_progress","retry_scheduled","delivered","failed","canceled"],"description":"pending = waiting (pull: fetchable, push: in the dispatch queue), accepted = taken over by the device or provider, in_progress = printing/transmitting, retry_scheduled = temporary error, delivered, failed, canceled"},"channelState":{"type":["string","null"]},"stateMessage":{"type":["string","null"]},"externalId":{"description":"ID at the device or provider, e.g. the printer's job-id","type":["string","null"]},"attempt":{"type":"integer","description":"Number of delivery attempts so far"},"nextAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"events":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryEvent"},"description":"Timeline, oldest first"}},"required":["id","sink","channel","phase","channelState","stateMessage","externalId","attempt","nextAttemptAt","createdAt","updatedAt","completedAt","events"],"additionalProperties":false},"Integration":{"type":"object","properties":{"id":{"type":"string","enum":["relay","infra","ipp-push"]},"enabled":{"type":"boolean"},"alwaysOn":{"type":"boolean","description":"The default integration cannot be switched off"}},"required":["id","enabled","alwaysOn"],"additionalProperties":false},"Ingress":{"type":"object","properties":{"id":{"type":"string","enum":["ipp","upload","api","share"]},"enabled":{"type":"boolean"}},"required":["id","enabled"],"additionalProperties":false},"ApiToken":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"tokenPrefix":{"type":"string","description":"Beginning of the token, for recognition"},"role":{"type":"string","enum":["member","admin"],"description":"Permissions of the token; never higher than those of its creator"},"state":{"type":"string","enum":["active","expired","revoked"]},"createdBy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"null = never expires"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","name","tokenPrefix","role","state","createdBy","expiresAt","lastUsedAt","revokedAt","createdAt"],"additionalProperties":false},"CreatedApiToken":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"tokenPrefix":{"type":"string","description":"Beginning of the token, for recognition"},"role":{"type":"string","enum":["member","admin"],"description":"Permissions of the token; never higher than those of its creator"},"state":{"type":"string","enum":["active","expired","revoked"]},"createdBy":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"null = never expires"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"token":{"type":"string","description":"Full token. Shown only this once."}},"required":["id","name","tokenPrefix","role","state","createdBy","expiresAt","lastUsedAt","revokedAt","createdAt","token"],"additionalProperties":false},"PairStartResponse":{"type":"object","properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string","description":"Code the user confirms in the web app"},"verificationUrl":{"type":"string","format":"uri"},"expiresIn":{"type":"integer","description":"Validity in seconds"},"interval":{"type":"integer","description":"Polling interval in seconds"}},"required":["deviceCode","userCode","verificationUrl","expiresIn","interval"],"additionalProperties":false},"PairPollResponse":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","denied","expired"]}},"required":["status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"approved"},"bindingId":{"type":"string","format":"uuid"},"bindingToken":{"type":"string"},"organizationName":{"type":"string"}},"required":["status","bindingId","bindingToken","organizationName"],"additionalProperties":false}]},"RelaySinkConfig":{"type":"object","properties":{"sinkId":{"type":"string","format":"uuid"},"sinkName":{"type":"string"},"sinkSlug":{"type":"string"},"localName":{"type":"string"},"infraUri":{"type":"string","description":"INFRA endpoint of this destination (Infrastructure Printer)"}},"required":["sinkId","sinkName","sinkSlug","localName","infraUri"],"additionalProperties":false},"RelayConfig":{"type":"object","properties":{"bindingId":{"type":"string","format":"uuid"},"organizationName":{"type":"string"},"sinks":{"type":"array","items":{"$ref":"#/components/schemas/RelaySinkConfig"}}},"required":["bindingId","organizationName","sinks"],"additionalProperties":false},"RelayPrinter":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"localName":{"type":"string"},"available":{"type":"boolean"},"excludedReason":{"description":"Loop guard: set when the printer itself forwards to SealedPrint","type":["string","null"]},"shared":{"type":"boolean"},"sinkId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"capabilities":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","localName","available","excludedReason","shared","sinkId","capabilities"],"additionalProperties":false},"RelayBinding":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"hostname":{"type":["string","null"]},"platform":{"type":["string","null"]},"version":{"type":["string","null"]},"connected":{"type":"boolean"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"printers":{"type":"array","items":{"$ref":"#/components/schemas/RelayPrinter"}}},"required":["id","hostname","platform","version","connected","lastSeenAt","createdAt","printers"],"additionalProperties":false},"PairingInfo":{"type":"object","properties":{"userCode":{"type":"string"},"hostname":{"type":["string","null"]},"platform":{"type":["string","null"]},"version":{"type":["string","null"]},"expiresAt":{"type":"string","format":"date-time"}},"required":["userCode","hostname","platform","version","expiresAt"],"additionalProperties":false},"BillingPlan":{"type":"object","properties":{"key":{"type":"string","enum":["free","team","business"]},"name":{"type":"string"},"currency":{"type":"string","enum":["eur","usd"],"description":"ISO currency code, lowercase; EUR in euro countries, else USD"},"basePrice":{"type":"number","description":"Price per month in cents, without VAT"},"includedSeats":{"type":"number"},"seatPrice":{"type":"number","description":"Price per additional seat and month in cents"},"includedDocuments":{"type":"number"},"documentPrice":{"type":"number","description":"Price per additional document in cents; 0 = documents beyond wait"},"documentOverage":{"type":"string","enum":["hold","bill"],"description":"hold = documents beyond the volume are not delivered"},"maxDocumentMb":{"type":"number"},"features":{"type":"array","items":{"type":"string"},"description":"Stripe feature lookup keys included in the plan"}},"required":["key","name","currency","basePrice","includedSeats","seatPrice","includedDocuments","documentPrice","documentOverage","maxDocumentMb","features"],"additionalProperties":false},"Billing":{"type":"object","properties":{"enabled":{"type":"boolean","description":"false when billing is not configured (no limits apply)"},"plan":{"type":"string","enum":["free","team","business"]},"status":{"description":"Stripe subscription status","type":["string","null"]},"cancelAtPeriodEnd":{"type":"boolean"},"periodEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"seats":{"type":"object","properties":{"used":{"type":"number"},"included":{"type":"number"}},"required":["used","included"],"additionalProperties":false},"documents":{"type":"object","properties":{"used":{"type":"number"},"included":{"type":"number"}},"required":["used","included"],"additionalProperties":false},"maxDocumentMb":{"type":"number"},"hasPaymentMethod":{"type":"boolean"},"hasBillingDetails":{"type":"boolean"},"billingDetails":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"country":{"type":"string"},"line1":{"type":"string"},"line2":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"vatId":{"type":"string"}},"required":["name","country","line1","line2","postalCode","city","vatId"],"additionalProperties":false},{"type":"null"}]},"currency":{"type":"string","enum":["eur","usd"],"description":"Currency of the organization's invoices: of the subscription, else from the billing country"},"taxTreatment":{"anyOf":[{"type":"string","enum":["de_vat","reverse_charge","outside_eu"]},{"type":"null"}],"description":"VAT treatment from the billing details (de_vat = 19 % German VAT); null without billing details"},"plans":{"type":"array","items":{"$ref":"#/components/schemas/BillingPlan"},"description":"Plans with prices in the organization's currency"}},"required":["enabled","plan","status","cancelAtPeriodEnd","periodEnd","seats","documents","maxDocumentMb","hasPaymentMethod","hasBillingDetails","billingDetails","currency","taxTreatment","plans"],"additionalProperties":false},"BillingRedirect":{"type":"object","properties":{"url":{"description":"Stripe page to continue on, or null if nothing is needed","type":["string","null"]}},"required":["url"],"additionalProperties":false},"OrganizationDeletion":{"type":"object","properties":{"status":{"type":"string","enum":["deleted","pending"],"description":"pending = the subscription is canceled, the data is deleted when Stripe confirms"}},"required":["status"],"additionalProperties":false},"CancellationReceipt":{"type":"object","properties":{"receivedAt":{"type":"string","format":"date-time","description":"Time of receipt of the cancellation"}},"required":["receivedAt"],"additionalProperties":false},"Error":{"type":"object","properties":{"statusCode":{"type":"integer"},"statusMessage":{"type":"string"},"message":{"type":"string"},"data":{"description":"Details, e.g. validation errors"}},"required":["statusCode","statusMessage"]},"User":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean","default":false,"readOnly":true},"image":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","email","emailVerified","createdAt","updatedAt"]},"Session":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"expiresAt":{"type":"string","format":"date-time"},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"ipAddress":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"activeOrganizationId":{"type":"string","readOnly":true}},"required":["id","expiresAt","token","createdAt","updatedAt","userId"]},"Account":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"accountId":{"type":"string"},"providerId":{"type":"string"},"userId":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"idToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"},"scope":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","providerId","userId","createdAt","updatedAt"]},"Verification":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"identifier":{"type":"string"},"value":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","identifier","value","expiresAt","createdAt","updatedAt"]},"Organization":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"metadata":{"type":"string"}},"required":["id","name","slug","createdAt"]},"Member":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organizationId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","default":"member"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","organizationId","userId","role","createdAt"]},"Invitation":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organizationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","default":"pending"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"inviterId":{"type":"string"}},"required":["id","organizationId","email","status","expiresAt","createdAt","inviterId"]}},"securitySchemes":{"apiToken":{"type":"http","scheme":"bearer","bearerFormat":"sp_api_…","description":"API token from Settings → API tokens"},"session":{"type":"apiKey","in":"cookie","name":"better-auth.session_token"},"relayToken":{"type":"http","scheme":"bearer","bearerFormat":"rly_…"},"deviceBasic":{"type":"http","scheme":"basic","description":"Native INFRA printers: short name of the destination and device password (sp_dev_…)"}}}}