{"openapi":"3.1.1","externalDocs":{"description":"Find out more about Steuerboard API","url":"https://docs.steuerboard.com"},"info":{"version":"0.1.0","title":"Steuerboard API"},"servers":[{"url":"https://api.steuerboard.com/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"auth","description":"Authentication and identity endpoints","x-displayName":"Auth"},{"name":"collect","description":"Public collect session endpoints","x-displayName":"Collect"},{"name":"collect.sessions","description":"Collect Sessions endpoints","x-displayName":"Collect Sessions"},{"name":"health","description":"Service health endpoints","x-displayName":"Health"},{"name":"admin.clients","description":"Admin endpoints for managing clients","x-displayName":"Clients"},{"name":"admin.users","description":"Admin user management endpoints","x-displayName":"Admin Users"},{"name":"files","description":"File management endpoints","x-displayName":"Files"},{"name":"tasks","description":"Task management endpoints","x-displayName":"Tasks"},{"name":"workspaces","description":"Workspace management endpoints","x-displayName":"Workspaces"},{"name":"workspace.members","description":"Workspace member management endpoints","x-displayName":"Workspace Members"},{"name":"webhooks","description":"Webhook event payloads and contracts","x-displayName":"Webhooks"},{"name":"users","description":"User management endpoints","x-displayName":"Users"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Bearer token authentication"}},"schemas":{"rate_limit":{"type":"object","properties":{"status_code":{"type":"integer","enum":[429]},"type":{"type":"string","enum":["rate_limit"]},"code":{"type":"string","enum":["too_many_requests"]},"message":{"type":"string"}},"required":["status_code","type","code","message"]},"internal_error":{"type":"object","properties":{"status_code":{"type":"integer","enum":[500]},"type":{"type":"string","enum":["internal_error"]},"code":{"type":"string","enum":["unexpected_exception"]},"message":{"type":"string"}},"required":["status_code","type","code","message"]},"auth_error":{"type":"object","properties":{"status_code":{"type":"integer","enum":[401]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}},"required":["status_code","type","code","message"]},"Client":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the client","example":"Muster GmbH"},"slug":{"type":"string","description":"The slug of the client","example":"muster-gmbh"},"type":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.","title":"ClientType","example":"legal_person"},"customId":{"type":["string","null"],"description":"The client's custom ID can be defined by the accountant","example":"ABC123"},"legalName":{"type":["string","null"],"description":"The legal name of the client","example":"Muster GmbH"},"archivedAt":{"type":["string","null"],"format":"date-time","description":"The date and time the client was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"datevClientId":{"type":["string","null"],"description":"The client's ID in DATEV","example":"ABC123"},"createdAt":{"type":"string","format":"date-time","description":"The date and time of the creation for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time of the last update for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"}},"required":["id","name","slug","type","customId","legalName","archivedAt","datevClientId","createdAt","updatedAt"]},"Pagination":{"type":"object","properties":{"nextCursor":{"type":"string","description":"The cursor to return the next page of items","example":"cmf41ajzv003706un4i99q19z"},"previousCursor":{"type":"string","description":"The cursor to return the previous page of items","example":"cmf41ajzv003706un4i99q19z"},"limit":{"type":"integer","minimum":0,"description":"The number of items to return","example":20},"total":{"type":"integer","minimum":0,"description":"The total number of items","example":134}},"required":["limit","total"]},"PaginatedClients":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"ClientCreate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the client","example":"Muster GmbH"},"type":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.","title":"ClientType","example":"legal_person"},"customId":{"type":"string","description":"The client's custom ID can be defined by the accountant","example":"ABC123"},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1},"line2":{"type":"string"},"city":{"type":"string","minLength":1},"postalCode":{"type":"string","minLength":1},"countryCode":{"type":"string","default":"DE"}},"required":["line1","city","postalCode"],"description":"The address of the client","example":{"line1":"Musterstraße 1","line2":"12345 Musterstadt","city":"Musterstadt","postalCode":"12345","countryCode":"DE"}}},"required":["name","type"]},"not_found":{"type":"object","properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["not_found"]},"message":{"type":"string"}},"required":["status_code","type","code","message"]},"ClientUpdate":{"type":"object","properties":{"name":{"type":"string","description":"The updated name of the client","example":"Muster GmbH"},"type":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.","title":"ClientType","example":"legal_person"},"customId":{"type":["string","null"],"description":"The client's custom ID can be defined by the accountant","example":"ABC123"},"legalName":{"type":["string","null"],"description":"The legal name of the client","example":"Muster GmbH"},"address":{"type":["object","null"],"properties":{"line1":{"type":"string","minLength":1},"line2":{"type":"string"},"city":{"type":"string","minLength":1},"postalCode":{"type":"string","minLength":1},"countryCode":{"type":"string","default":"DE"}},"required":["line1","city","postalCode"],"description":"The address of the client","example":{"line1":"Musterstraße 1","line2":"12345 Musterstadt","city":"Musterstadt","postalCode":"12345","countryCode":"DE"}}}},"AccountantUserRole":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"Identifier of the role assigned to the accountant user.","example":"cmf41ajzv003706un4i99q1a0"},"name":{"type":["string","null"],"description":"Internal identifier of the role. Null when the role is custom only.","example":"accountant_admin"},"customName":{"type":["string","null"],"description":"Custom label for the role, if defined.","example":"Head of Accounting"}},"required":["id","name","customName"]},"AccountantUser":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"Identifier of the accountant user.","example":"cmf41ajzv003706un4i99q1b1"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the accountant user record was created.","example":"2024-08-20T12:34:56Z"},"email":{"type":"string","format":"email","description":"Email address of the accountant user.","example":"alex@example.com"},"firstName":{"type":["string","null"],"description":"First name of the accountant user, if provided.","example":"Alex"},"lastName":{"type":["string","null"],"description":"Last name of the accountant user, if provided.","example":"Müller"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/AccountantUserRole"},"description":"Roles assigned to the accountant user."}},"required":["id","createdAt","email","firstName","lastName","roles"]},"conflict":{"type":"object","properties":{"status_code":{"type":"integer","enum":[409]},"type":{"type":"string","enum":["conflict"]},"code":{"type":"string","enum":["conflict"]},"message":{"type":"string"}},"required":["status_code","type","code","message"]},"InviteAccountantUser":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address that should receive the invitation.","example":"frida@example.com"},"role":{"anyOf":[{"type":"string","enum":["admin","user"]},{"type":"string","format":"cuid"}],"description":"Role to assign to the invited user. Can be 'admin', 'user', or a custom role ID.","examples":["admin","user","cmf41ajzv003706un4i99q1a0"]}},"required":["email","role"]},"UpdateAccountantUser":{"type":"object","properties":{"role":{"anyOf":[{"type":"string","enum":["admin","user"]},{"type":"string","format":"cuid"}],"description":"Role to assign to the user. Can be 'admin', 'user', or a custom role ID.","examples":["admin","user","cmf41ajzv003706un4i99q1a0"]}},"required":["role"]},"DeleteResponse":{"type":"object","properties":{"object":{"type":"string","description":"The type of the deleted object","example":"file"},"deleted":{"type":"boolean","description":"Whether the object was deleted","example":true},"id":{"type":"string","format":"cuid","description":"The ID of the deleted object","example":"cmf41ajzv003706un4i99q19z"}},"required":["object","deleted","id"]},"collectSessionByToken":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"description":{"type":"string"},"status":{"type":"string","enum":["created","active","pending_review","completed","cancelled"]},"channelConfig":{"type":"object","properties":{"channel":{"type":"string","enum":["collectUi"]},"brandingColor":{"type":"string"},"logoUrl":{"type":"string","format":"uri"},"pinProtected":{"type":"boolean","default":false},"submitButtonLabel":{"type":"string","default":"Submit"},"locale":{"type":"string","default":"de"}},"required":["channel"]},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"label":{"type":"string"},"description":{"type":["string","null"]},"sortOrder":{"type":"integer"},"evaluationMode":{"type":"string","enum":["individual","batch","bulk_match"]},"repeatable":{"type":"boolean"},"minInstances":{"type":"integer","minimum":0},"maxInstances":{"type":["integer","null"],"exclusiveMinimum":0},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["file_upload","form_field","signature","confirmation"]},"description":{"type":"string"},"status":{"type":"string","enum":["pending","submitted","fulfilled","rejected"]},"sortOrder":{"type":"integer"},"config":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["formField"]},"fieldType":{"type":"string","enum":["text","number","date","select","multiSelect","address","phone","email","taxId","iban"]},"fieldRequired":{"type":"boolean","default":true},"fieldPlaceholder":{"type":"string"},"fieldOptions":{"type":"array","items":{"type":"string"},"minItems":1},"fieldValidation":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["regex","min","max","minLength","maxLength","custom"]},"value":{"anyOf":[{"type":"string"},{"type":"number"}]},"message":{"type":"string"}},"required":["type","value"]},"default":[]},"fieldDependsOn":{"type":"object","properties":{"collectItemId":{"type":"string"},"condition":{"type":"string","enum":["equals","notEmpty","notEquals"]},"value":{"type":"string"}},"required":["collectItemId","condition"]}},"required":["type","fieldType"]},{"type":"object","properties":{"type":{"type":"string","enum":["fileUpload"]},"acceptedFileTypes":{"type":"array","items":{"type":"string","pattern":"^\\.[a-z0-9]+$"},"minItems":1},"maxFileSizeMb":{"type":"number","exclusiveMinimum":0,"default":25},"fileCount":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"default":1},"max":{"type":"integer","exclusiveMinimum":0}},"default":{}}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["signature"]},"signerName":{"type":"string","minLength":1},"signerEmail":{"type":"string","format":"email"},"documentRef":{"type":"string"}},"required":["type","signerName"]},{"type":"object","properties":{"type":{"type":"string","enum":["confirmation"]},"confirmationText":{"type":"string","minLength":1},"requiresExplicitConsent":{"type":"boolean","default":true}},"required":["type","confirmationText"]}]},"groupId":{"type":["string","null"],"format":"uuid"},"submissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"fileName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"rejectionReason":{"type":["string","null"]}},"required":["id","status","fileName","fileSize","rejectionReason"]}}},"required":["id","type","description","status","sortOrder","config","groupId","submissions"]}},"submissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"fileName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"rejectionReason":{"type":["string","null"]}},"required":["id","status","fileName","fileSize","rejectionReason"]}},"submissionSummary":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"processing":{"type":"integer","minimum":0},"matched":{"type":"integer","minimum":0},"proposed":{"type":"integer","minimum":0}},"required":["total","pending","processing","matched","proposed"]}},"required":["id","label","description","sortOrder","evaluationMode","repeatable","minInstances","maxInstances","items"]}}},"required":["id","description","status","channelConfig","groups"]},"bad_request":{"type":"object","properties":{"status_code":{"type":"integer","enum":[410]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["collect_token_expired"]},"message":{"type":"string"}},"required":["status_code","type","code","message"]},"PingSessionResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"required":["success"]},"CompleteSessionResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"required":["success"]},"CompleteSessionBody":{"type":"object","properties":{"clientNote":{"type":"string","maxLength":2000},"outcome":{"type":"string","enum":["complete","incomplete","incomplete_finished"],"description":"Explicit completion outcome picked by the client: 'complete' (everything provided), 'incomplete' (will provide the rest later), 'incomplete_finished' (cannot provide the rest; clientNote explains).","example":"complete"}},"required":["outcome"]},"RequestLinkResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"maskedEmail":{"type":["string","null"],"description":"Masked address the new link was sent to, if one was sent","example":"c***@example.com"}},"required":["success","maskedEmail"]},"CollectFileSubmission":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the submission","example":"550e8400-e29b-41d4-a716-446655440000"},"status":{"type":"string","description":"The status of the submission","example":"pending"},"fileName":{"type":["string","null"],"description":"The name of the uploaded file","example":"invoice.pdf"},"fileSize":{"type":["number","null"],"description":"The size of the uploaded file in bytes","example":1024},"fileMimeType":{"type":["string","null"],"description":"The MIME type of the uploaded file","example":"application/pdf"},"collectItemId":{"type":"string","format":"uuid","description":"The ID of the collect item","example":"550e8400-e29b-41d4-a716-446655440000"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the submission was created","example":"2024-01-01T00:00:00.000Z"}},"required":["id","status","fileName","fileSize","fileMimeType","collectItemId","createdAt"]},"CollectFileSubmitForm":{"type":"object","properties":{"file":{"type":"string","description":"The file to upload","format":"binary"},"collectItemId":{"type":"string","format":"uuid","description":"The ID of the collect item to submit against","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["file","collectItemId"]},"CollectFormDataSubmission":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the submission","example":"550e8400-e29b-41d4-a716-446655440000"},"status":{"type":"string","description":"The status of the submission","example":"pending"},"value":{"type":["string","null"],"description":"The submitted form field value","example":"Max Mustermann"},"collectItemId":{"type":"string","format":"uuid","description":"The ID of the collect item","example":"550e8400-e29b-41d4-a716-446655440000"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the submission was created","example":"2024-01-01T00:00:00.000Z"}},"required":["id","status","value","collectItemId","createdAt"]},"CollectFormDataSubmit":{"type":"object","properties":{"collectItemId":{"type":"string","format":"uuid","description":"The ID of the collect item to submit against","example":"550e8400-e29b-41d4-a716-446655440000"},"value":{"type":"string","description":"The form field value","example":"Max Mustermann"}},"required":["collectItemId","value"]},"CollectBulkSubmission":{"type":"object","properties":{"submissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string"},"fileName":{"type":["string","null"]},"fileSize":{"type":["number","null"]},"fileMimeType":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","status","fileName","fileSize","fileMimeType","createdAt"]}}},"required":["submissions"]},"CollectBulkSubmitForm":{"type":"object","properties":{"files":{"type":"array","description":"The files to upload","items":{"type":"string","format":"binary"}},"groupId":{"type":"string","format":"uuid","description":"The ID of the BULK_MATCH group to submit against","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["files","groupId"]},"DeleteCollectSubmissionResponse":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Whether the submission was deleted","example":true}},"required":["deleted"]},"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the workspace","example":"FiBu"},"createdAt":{"type":"string","format":"date-time","description":"The date and time of the creation for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time of the last update for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"archivedAt":{"type":["string","null"],"format":"date-time","description":"The date and time the workspace was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"clientId":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","name","createdAt","updatedAt","archivedAt","clientId"]},"PaginatedWorkspaces":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"WorkspaceCreate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the workspace","example":"FiBu"}},"required":["name"]},"WorkspaceUpdate":{"type":"object","properties":{"name":{"type":"string","description":"The new name of the workspace","example":"Finanzbuchhaltung"}},"required":["name"]},"WorkspaceMember":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time","description":"The date and time when the workspace membership was created. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2024-05-14T08:30:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the workspace membership was last updated. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2024-06-01T12:00:00Z"},"workspaceId":{"type":"string","format":"cuid","description":"The identifier of the workspace the member belongs to.","example":"cmf41ajzv003706un4i99q19z"},"isMuted":{"type":"boolean","description":"Whether the member has muted notifications for the workspace.","example":false},"userId":{"type":"string","format":"cuid","description":"Identifier of the user that is a member of the workspace.","example":"cmf41ajzv003706un4i99q1a0"},"user":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"Identifier of the user.","example":"cmf41ajzv003706un4i99q1a0"},"email":{"type":"string","format":"email","description":"Email address of the user.","example":"frida@example.com"},"firstName":{"type":["string","null"],"description":"First name of the user, if available.","example":"Frida"},"lastName":{"type":["string","null"],"description":"Last name of the user, if available.","example":"Meyer"},"image":{"type":["string","null"],"description":"Profile image URL of the user, if available.","example":null}},"required":["id","email","firstName","lastName","image"],"description":"Optional user object with denormalised information for convenience."}},"required":["createdAt","updatedAt","workspaceId","isMuted","userId"]},"WorkspaceMemberCreate":{"type":"object","properties":{"userId":{"type":"string","format":"cuid","description":"Identifier of the user that should be added to the workspace.","example":"cmf41ajzv003706un4i99q1a0"}},"required":["userId"]},"WorkspaceMemberRemove":{"type":"object","properties":{"userId":{"type":"string","format":"cuid","description":"Identifier of the user that should be removed from the workspace.","example":"cmf41ajzv003706un4i99q1a0"}},"required":["userId"]},"File":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"The ID of the file","example":"cmf41ajzv003706un4i99q19z"},"documentDate":{"type":["string","null"],"format":"date-time","description":"The date of the document (not the upload date)","example":"2021-01-01T00:00:00Z"},"createdAt":{"type":"string","format":"date-time","description":"The date and time of the creation for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time of the last update for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"name":{"type":"string","description":"The name of the file","example":"document.pdf"},"mimetype":{"type":"string","description":"The mime type of the file","example":"application/pdf"},"size":{"type":"number","description":"The size of the file in bytes","example":1024},"workspaceId":{"type":"string","format":"cuid","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"createdById":{"type":["string","null"],"format":"cuid","description":"The ID of the creator","example":"cmf41ajzv003706un4i99q19z"},"taskId":{"type":["string","null"],"format":"cuid","description":"The ID of the task this file was uploaded to.","example":"cmf41ajzv003706un4i99q19z"},"folderId":{"type":["string","null"],"format":"cuid","description":"The ID of the folder this file was uploaded to.","example":"cmf41ajzv003706un4i99q19z"},"labelIds":{"type":["array","null"],"items":{"type":"string","format":"cuid"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]}},"required":["id","documentDate","createdAt","updatedAt","name","mimetype","size","workspaceId","createdById","taskId","folderId","labelIds"]},"PaginatedFiles":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"FileCreate":{"type":"object","properties":{"workspaceId":{"type":"string","format":"cuid","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"file":{"type":"string","description":"The file to upload","format":"binary"},"labelIds":{"type":"array","items":{"type":"string","format":"cuid"},"description":"The IDs of the labels to add to the file","example":["cmf41ajzv003706un4i99q19z"]},"name":{"type":"string","description":"The name of the file","example":"document.pdf"},"folderId":{"type":"string","format":"cuid","description":"The ID of the folder to upload the file to","example":"cmf41ajzv003706un4i99q19z"},"taskId":{"type":"string","format":"cuid","description":"The ID of the task to upload this file to.","example":"cmf41ajzv003706un4i99q19z"}},"required":["workspaceId","file"]},"FileContent":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"A temporary presigned URL to download the file","example":"https://s3.eu-central-1.amazonaws.com/bucket/..."},"expiresIn":{"type":"integer","exclusiveMinimum":0,"description":"Seconds until the URL expires","example":600}},"required":["url","expiresIn"]},"FileUpdate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the file","example":"document.pdf"},"documentDate":{"type":"string","format":"date-time","description":"The date of the document (not the upload date). ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"folderId":{"type":"string","format":"cuid","description":"The ID of the folder to place the file in","example":"cmf41ajzv003706un4i99q19z"}}},"Task":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"The ID of the task","example":"cmf41ajzv003706un4i99q19z"},"title":{"type":"string","description":"The title of the task","example":"Task 1"},"text":{"type":["string","null"],"description":"The text of the task","example":"Upload the documents"},"status":{"type":"string","enum":["IN_PROGRESS","ACCEPTED","OPEN","IN_REVIEW","DECLINED"],"description":"The status of the task","example":"OPEN"},"dueDate":{"type":["string","null"],"format":"date-time","description":"The due date of a task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"workspaceId":{"type":"string","format":"cuid","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"createdById":{"type":["string","null"],"format":"cuid","description":"The ID of the creator","example":"cmf41ajzv003706un4i99q19z"},"actorType":{"type":"string","enum":["USER","SYSTEM","AI","API"],"description":"The type of the actor","example":"USER"},"parentId":{"type":["string","null"],"format":"cuid","description":"The ID of the parent task","example":"cmf41ajzv003706un4i99q19z"},"destinationFolderId":{"type":["string","null"],"format":"cuid","description":"The ID of the destination folder where assigned files will be stored","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","format":"date-time","description":"The date and time of the creation for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","format":"date-time","description":"The date and time of the last update for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"}},"required":["id","title","text","status","dueDate","workspaceId","createdById","actorType","parentId","destinationFolderId","createdAt","updatedAt"]},"PaginatedTasks":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"TaskCreate":{"type":"object","properties":{"title":{"type":"string","description":"The title of the task","example":"Task Upload Documents"},"text":{"type":"string","description":"The text of the task","example":"Upload the documents"},"dueDate":{"type":"string","format":"date-time","description":"The due date of a task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"workspaceId":{"type":"string","format":"cuid","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"parentId":{"type":"string","format":"cuid","description":"The ID of the parent task","example":"cmf41ajzv003706un4i99q19z"}},"required":["title","workspaceId"]},"TaskUpdate":{"type":"object","properties":{"title":{"type":"string","description":"The title of the task","example":"Updated Task Upload Documents"},"text":{"type":"string","description":"The text of the task","example":"Upload the documents"},"dueDate":{"type":["string","null"],"description":"The due date of a task","example":"2021-01-01T00:00:00Z"},"status":{"type":"string","enum":["IN_PROGRESS","ACCEPTED","OPEN","IN_REVIEW","DECLINED"],"description":"The status of the task","example":"OPEN"},"destinationFolderId":{"type":["string","null"],"format":"cuid","description":"The ID of the destination folder","example":"cmf41ajzv003706un4i99q19z"},"assetFileIds":{"type":"array","items":{"type":"string","format":"cuid"},"description":"The IDs of the files that should be attachement of this task. For example to give extra context to the user who works on this task.","example":["cmf41ajzv003706un4i99q19z"]},"parentId":{"type":["string","null"],"format":"cuid","description":"The ID of the parent task","example":"cmf41ajzv003706un4i99q19z"}}},"ClientUser":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"Identifier of the client user.","example":"cmf41ajzv003706un4i99q1a0"},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the client user record was created. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2024-05-14T08:30:00Z"},"email":{"type":"string","format":"email","description":"Email address of the client user.","example":"frida@example.com"},"firstName":{"type":["string","null"],"description":"First name of the client user, if provided.","example":"Frida"},"lastName":{"type":["string","null"],"description":"Last name of the client user, if provided.","example":"Meyer"},"roles":{"type":"array","items":{"type":"string","description":"Role name assigned to the user.","example":"client_admin"},"description":"List of role names assigned to the user."}},"required":["id","createdAt","email","firstName","lastName","roles"]},"PaginatedUsers":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClientUser"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"ClientUserInvite":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address that should receive the invitation.","example":"frida@example.com"},"role":{"type":"string","enum":["admin","user"],"description":"Role to assign to the invited user. Can be 'admin', 'user'.","title":"UserRole","examples":["admin","user"]},"workspaceIds":{"type":"array","items":{"type":"string","format":"cuid","description":"Workspace identifier the user should be granted access to.","example":"cmf41ajzv003706un4i99q19z"},"description":"Optional list of workspace IDs the user should join immediately."}},"required":["email","role"]},"ClientUserUpdate":{"type":"object","properties":{"role":{"type":"string","enum":["admin","user"],"description":"Role to assign to the invited user. Can be 'admin', 'user'.","title":"UserRole","examples":["admin","user"]}},"required":["role"]}},"parameters":{}},"paths":{"/":{"get":{"x-excluded":true,"operationId":"index","tags":["health"],"security":[],"summary":"Get API index","description":"Returns API information.","responses":{"200":{"description":"Steuerboard API Index","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"example":{"message":"Steuerboard API"}}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/health":{"get":{"operationId":"health","tags":["health"],"summary":"Health Check","description":"Returns service health status for monitoring and container orchestration.","security":[],"responses":{"200":{"description":"Health Check Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"timestamp":{"type":"string"}},"required":["status","timestamp"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/ping":{"get":{"operationId":"ping","tags":["health"],"summary":"Ping Pong","description":"Returns a pong response for health checks.","security":[],"responses":{"200":{"description":"Pong","content":{"application/json":{"schema":{"type":"object","properties":{"ping":{"type":"string"}},"required":["ping"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/me":{"get":{"operationId":"me","tags":["auth"],"summary":"Me","description":"Returns information about the authenticated principal.","responses":{"200":{"description":"Me","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"accountantId":{"type":"string"},"clientId":{"type":["string","null"]},"apiKeyId":{"type":"string"},"rateLimitMax":{"type":"number"},"rateLimitTimeWindow":{"type":"number"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["type","accountantId","clientId","apiKeyId","rateLimitMax","rateLimitTimeWindow","permissions"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/admin/clients":{"get":{"operationId":"listClients","summary":"List clients","description":"Returns a paginated list of clients.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.clients"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of items to return","example":20},"required":false,"in":"query","name":"limit"},{"schema":{"type":"string","format":"cuid","description":"The cursor to return the next page of items","example":"cmf41ajzv003706un4i99q19z"},"required":false,"in":"query","name":"cursor"},{"schema":{"type":"string","description":"The custom ID of the client","example":"455148"},"required":false,"name":"customId","in":"query"},{"schema":{"type":"string","description":"The slug of the client","example":"muster-gmbh"},"required":false,"name":"slug","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false","description":"Include archived clients","example":"false"},"required":false,"name":"archived","in":"query"},{"schema":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.","title":"ClientType","example":"legal_person"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string","enum":["createdAt","updatedAt","archivedAt","name","customId"],"default":"createdAt","description":"The sort field of the results","example":"createdAt"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The order of the results based on the sort field","example":"desc"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Clients","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedClients"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"post":{"operationId":"createClient","summary":"Create a client","description":"Creates a new client for the accountant and returns the created client.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.clients"],"requestBody":{"description":"Client create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientCreate"}}}},"responses":{"201":{"description":"Client created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["name"],"message":"Required"},{"code":"invalid_type","path":["type"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/admin/clients/{id}":{"get":{"operationId":"getClient","summary":"Get a client","description":"Returns a single client by ID.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.clients"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Client not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"patch":{"operationId":"updateClient","summary":"Update a client","description":"Updates a client by ID.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.clients"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"}],"requestBody":{"description":"Client update","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUpdate"}}}},"responses":{"200":{"description":"Client updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Client not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/admin/users":{"get":{"operationId":"listAccountantUsers","summary":"List accountant users","description":"Returns a paginated list of accountant users.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.users"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of items to return","example":20},"required":false,"in":"query","name":"limit"},{"schema":{"type":"string","format":"cuid","description":"The cursor to return the next page of items","example":"cmf41ajzv003706un4i99q19z"},"required":false,"in":"query","name":"cursor"},{"schema":{"type":"string","enum":["createdAt","updatedAt","email","firstName","lastName"],"default":"createdAt","description":"The sort field of the results"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The order of the results based on the sort field"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Accountant users","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountantUser"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"post":{"operationId":"inviteAccountantUser","summary":"Invite an accountant user","description":"Invites a new accountant user and returns the created record.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.users"],"requestBody":{"description":"Invite accountant user","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteAccountantUser"}}}},"responses":{"201":{"description":"Accountant user invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountantUser"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Accountant or role not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"409":{"description":"User already connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conflict"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["email"],"message":"Required"},{"code":"invalid_union","path":["role"],"message":"Invalid input"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/admin/users/{id}":{"get":{"operationId":"getAccountantUser","summary":"Get an accountant user","description":"Returns a single accountant user by ID.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.users"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Accountant user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountantUser"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Accountant user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"patch":{"operationId":"updateAccountantUser","summary":"Update an accountant user","description":"Updates an accountant user by ID.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.users"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"}],"requestBody":{"description":"Update accountant user","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountantUser"}}}},"responses":{"200":{"description":"Accountant user updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountantUser"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Accountant user or role not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_union","path":["role"],"message":"Invalid input"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"delete":{"operationId":"deleteAccountantUser","summary":"Delete an accountant user","description":"Deletes an accountant user by ID.","x-mint":{"content":"<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>"},"tags":["admin.users"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"}],"responses":{"200":{"description":"Accountant user removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Accountant user not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"409":{"description":"Cannot delete the acting user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conflict"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}":{"get":{"x-excluded":true,"operationId":"getcollectSessionByToken","summary":"Get collect session by token","description":"Validates the token and returns the Collect-UI session payload if valid.","security":[],"tags":["collect.sessions"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"}],"responses":{"200":{"description":"Collect session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/collectSessionByToken"}}}},"404":{"description":"Collect session not found. The token may be invalid or revoked.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/not_found"},{"properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["collect_token_not_found"]},"message":{"type":"string"}}}]}}}},"410":{"description":"Token has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad_request"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["token"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}/ping":{"post":{"x-excluded":true,"operationId":"pingCollectSession","summary":"Ping collect session","description":"Fires a session-opened tracking event. Thin, fire-and-forget.","security":[],"tags":["collect.sessions"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"}],"responses":{"202":{"description":"Ping tracked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PingSessionResponse"}}}},"404":{"description":"Collect session not found. The token may be invalid or revoked.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/not_found"},{"properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["collect_token_not_found"]},"message":{"type":"string"}}}]}}}},"410":{"description":"Token has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad_request"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}/complete":{"post":{"x-excluded":true,"operationId":"completeCollectSession","summary":"Complete collect session","description":"Marks the session as completed by the client, optionally with a note about missing documents.","security":[],"tags":["collect.sessions"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"}],"requestBody":{"description":"Completion details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSessionBody"}}}},"responses":{"202":{"description":"Session completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSessionResponse"}}}},"404":{"description":"Collect session not found. The token may be invalid or revoked.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/not_found"},{"properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["collect_token_not_found"]},"message":{"type":"string"}}}]}}}},"410":{"description":"Token has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad_request"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}/request-link":{"post":{"x-excluded":true,"operationId":"requestLinkCollectToken","summary":"Request a new collect session link","description":"Sends the current active link when possible, or creates a new session for an expired token. The recipient comes from the session itself, so no body is needed. Always returns 202 to prevent enumeration.","security":[],"tags":["collect.sessions"],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The expired collect session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"}],"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLinkResponse"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["token"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}/submit/file":{"post":{"x-excluded":true,"operationId":"submitCollectFile","summary":"Submit a file to a collect session","description":"Uploads a file submission for a collect item via a public token.","tags":["collect.sessions"],"security":[],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"}],"requestBody":{"required":true,"description":"The file to submit","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CollectFileSubmitForm"}}}},"responses":{"201":{"description":"File submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectFileSubmission"}}}},"404":{"description":"Collect session not found. The token may be invalid or revoked.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/not_found"},{"properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["collect_token_not_found"]},"message":{"type":"string"}}}]}}}},"410":{"description":"Token has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad_request"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[413]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["payload_too_large"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"custom","path":["file"],"message":"Input not instance of File"},{"code":"invalid_type","path":["collectItemId"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["token"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}/submit/form-data":{"post":{"x-excluded":true,"operationId":"submitCollectFormData","summary":"Submit form data to a collect session","description":"Submits a form field value for a collect item via a public token.","tags":["collect.sessions"],"security":[],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"}],"requestBody":{"description":"The form data to submit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectFormDataSubmit"}}}},"responses":{"201":{"description":"Form data submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectFormDataSubmission"}}}},"404":{"description":"Collect session not found. The token may be invalid or revoked.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/not_found"},{"properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["collect_token_not_found"]},"message":{"type":"string"}}}]}}}},"410":{"description":"Token has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad_request"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["collectItemId"],"message":"Required"},{"code":"invalid_type","path":["value"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["token"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}/submit/bulk":{"post":{"x-excluded":true,"operationId":"submitCollectBulk","summary":"Bulk upload files to a BULK_MATCH group","description":"Uploads multiple files for a BULK_MATCH group. Files are stored without item assignment — server-side matching happens asynchronously.","tags":["collect.sessions"],"security":[],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"}],"requestBody":{"required":true,"description":"Files to bulk upload","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/CollectBulkSubmitForm"}}}},"responses":{"201":{"description":"Files uploaded successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectBulkSubmission"}}}},"404":{"description":"Collect session not found. The token may be invalid or revoked.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/not_found"},{"properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["collect_token_not_found"]},"message":{"type":"string"}}}]}}}},"410":{"description":"Token has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad_request"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[413]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["payload_too_large"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"too_small","path":["files"],"message":"Array must contain at least 1 element(s)"},{"code":"invalid_type","path":["groupId"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["token"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/collect/sessions/{token}/submit/{submissionId}":{"delete":{"x-excluded":true,"operationId":"deleteCollectSubmission","summary":"Delete a collect submission","description":"Deletes a pending submission and its associated file from storage.","tags":["collect.sessions"],"security":[],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The session token","example":"cs_live_cmll8jh7b00013b6tlu7lvntw"},"required":true,"in":"path","name":"token"},{"schema":{"type":"string","format":"uuid","description":"The ID of the submission to delete","example":"550e8400-e29b-41d4-a716-446655440000"},"required":true,"in":"path","name":"submissionId"}],"responses":{"200":{"description":"Submission deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCollectSubmissionResponse"}}}},"400":{"description":"Cannot delete a non-pending submission","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["invalid_input"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Collect session not found. The token may be invalid or revoked.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/not_found"},{"properties":{"status_code":{"type":"integer","enum":[404]},"type":{"type":"string","enum":["not_found"]},"code":{"type":"string","enum":["collect_token_not_found"]},"message":{"type":"string"}}}]}}}},"410":{"description":"Token has expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/bad_request"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List workspaces","description":"Returns a paginated list of workspaces.","tags":["workspaces"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of items to return","example":20},"required":false,"in":"query","name":"limit"},{"schema":{"type":"string","format":"cuid","description":"The cursor to return the next page of items","example":"cmf41ajzv003706un4i99q19z"},"required":false,"in":"query","name":"cursor"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Workspaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWorkspaces"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"post":{"operationId":"createWorkspace","summary":"Create a workspace","description":"Creates a new workspace and returns the created workspace.","tags":["workspaces"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"Workspace create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}}},"responses":{"201":{"description":"Workspace created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["name"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/workspaces/{id}":{"get":{"operationId":"getWorkspace","summary":"Get a workspace","description":"Returns a single workspace by ID.","tags":["workspaces"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"patch":{"operationId":"updateWorkspace","summary":"Update a workspace","description":"Updates a workspace by ID.","tags":["workspaces"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"Workspace update","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdate"}}}},"responses":{"200":{"description":"Workspace updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Workspace not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["name"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/workspaces/{id}/members":{"get":{"operationId":"listWorkspaceMembers","summary":"List workspace members","description":"Returns workspace members for a workspace.","tags":["workspace.members"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Workspace members","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMember"}}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"post":{"operationId":"createWorkspaceMember","summary":"Create a workspace member","description":"Creates a new workspace member.","tags":["workspace.members"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"Workspace member create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberCreate"}}}},"responses":{"201":{"description":"Workspace member created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMember"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["userId"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"delete":{"operationId":"removeWorkspaceMember","summary":"Remove a workspace member","description":"Removes a workspace member from a workspace.","tags":["workspace.members"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"Workspace member remove","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberRemove"}}}},"responses":{"200":{"description":"Workspace member removed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/files":{"get":{"operationId":"listFiles","summary":"List files","description":"Returns a paginated list of files with optional workspace filters.","tags":["files"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of items to return","example":20},"required":false,"in":"query","name":"limit"},{"schema":{"type":"string","format":"cuid","description":"The cursor to return the next page of items","example":"cmf41ajzv003706un4i99q19z"},"required":false,"in":"query","name":"cursor"},{"schema":{"type":"string","format":"cuid"},"required":false,"name":"workspaceId","in":"query"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Paginated files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedFiles"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"post":{"operationId":"createFile","summary":"Upload a file","description":"Uploads a new file. Maximum file size is 500MB.","tags":["files"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"required":true,"description":"The file to upload","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FileCreate"}}}},"responses":{"201":{"description":"File created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[413]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["payload_too_large"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["workspaceId"],"message":"Required"},{"code":"custom","path":["file"],"message":"Input not instance of File"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/files/{id}":{"get":{"operationId":"getFile","summary":"Get a file","description":"Returns a single file by ID.","tags":["files"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"File","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"example":{"message":"File not found"}}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"patch":{"operationId":"updateFile","summary":"Update a file","description":"Updates a file by ID.","tags":["files"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"File update","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpdate"}}}},"responses":{"200":{"description":"File updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"example":{"message":"File not found"}}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"delete":{"operationId":"deleteFile","summary":"Delete a file","description":"Deletes a file by ID.","tags":["files"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"File deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/files/{id}/content":{"get":{"operationId":"downloadFileContent","summary":"Download file content","description":"Returns a temporary presigned URL to download the file. The URL expires after 10 minutes.","tags":["files"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Presigned download URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileContent"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"File not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"example":{"message":"File not found"}}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/tasks":{"get":{"operationId":"listTasks","summary":"List tasks","description":"Returns a paginated list of tasks with optional client and workspace filters.","tags":["tasks"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of items to return","example":20},"required":false,"in":"query","name":"limit"},{"schema":{"type":"string","format":"cuid","description":"The cursor to return the next page of items","example":"cmf41ajzv003706un4i99q19z"},"required":false,"in":"query","name":"cursor"},{"schema":{"type":"string","format":"cuid","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"required":false,"name":"workspaceId","in":"query"},{"schema":{"type":"string","format":"cuid","description":"The ID of the parent task","example":"cmf41ajzv003706un4i99q19z"},"required":false,"name":"parentId","in":"query"},{"schema":{"type":"string","enum":["createdAt","updatedAt","dueDate","status","title"],"default":"createdAt","description":"The sort field of the results","example":"createdAt"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The order of the results based on the sort field","example":"desc"},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTasks"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"post":{"operationId":"createTask","summary":"Create a task","description":"Creates a new task and returns the created task.","tags":["tasks"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"Task create","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}}},"responses":{"201":{"description":"Task created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["title"],"message":"Required"},{"code":"invalid_type","path":["workspaceId"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/tasks/{id}":{"get":{"operationId":"getTask","summary":"Get a task","description":"Returns a single task by ID.","tags":["tasks"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"patch":{"operationId":"updateTask","summary":"Update a task","description":"Updates a task by ID.","tags":["tasks"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"Task update","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdate"}}}},"responses":{"200":{"description":"Task updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"delete":{"operationId":"deleteTask","summary":"Delete a task","description":"Deletes a task by ID.","tags":["tasks"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Task","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Task not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"Invalid id error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ValidationError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/users":{"get":{"operationId":"listUsers","summary":"List users","description":"Returns a paginated list of client users.","tags":["users"],"parameters":[{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of items to return","example":20},"required":false,"in":"query","name":"limit"},{"schema":{"type":"string","format":"cuid","description":"The cursor to return the next page of items","example":"cmf41ajzv003706un4i99q19z"},"required":false,"in":"query","name":"cursor"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"Users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUsers"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["fieldName"],"message":"Expected string, received undefined"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"post":{"operationId":"inviteUser","summary":"Invite a user","description":"Invites a new client user and returns the created record.","tags":["users"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"User invite","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUserInvite"}}}},"responses":{"201":{"description":"User invited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUser"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"Role not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"409":{"description":"User already connected to client or accountant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/conflict"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["email"],"message":"Required"},{"code":"invalid_type","path":["role"],"message":"Required"}]}}},"required":["success","error"]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}},"/users/{id}":{"get":{"operationId":"getUser","summary":"Get a user","description":"Returns a single client user by ID.","tags":["users"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"User","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUser"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"},{"code":"invalid_type","path":["createdAt"],"message":"Required"},{"code":"invalid_type","path":["email"],"message":"Required"},{"code":"invalid_type","path":["firstName"],"message":"Required"},{"code":"invalid_type","path":["lastName"],"message":"Required"},{"code":"invalid_type","path":["roles"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"patch":{"operationId":"updateUser","summary":"Update a user","description":"Updates a client user by ID.","tags":["users"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"requestBody":{"description":"User update","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUserUpdate"}}}},"responses":{"200":{"description":"User updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientUser"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"User or role not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["role"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}},"delete":{"operationId":"deleteUser","summary":"Delete a user","description":"Deletes a client user from the client by ID.","tags":["users"],"parameters":[{"schema":{"type":"string","format":"cuid","description":"The ID of the item","example":"cmf41ajzv003706un4i99q19z"},"required":true,"in":"path","name":"id"},{"schema":{"type":"string","format":"cuid","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"required":true,"name":"x-client-id","in":"header"}],"responses":{"200":{"description":"User deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"description":"Missing client ID","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/bad_request"},{"properties":{"status_code":{"type":"integer","enum":[400]},"type":{"type":"string","enum":["bad_request"]},"code":{"type":"string","enum":["missing_client_id"]},"message":{"type":"string"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/auth_error"}}}},"403":{"description":"Missing scope","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/auth_error"},{"properties":{"status_code":{"type":"integer","enum":[403]},"type":{"type":"string","enum":["auth_error"]},"code":{"type":"string","enum":["missing_scope"]},"message":{"type":"string"}}}]}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/not_found"}}}},"422":{"description":"The validation error(s)","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]},{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"}},"required":["code","path"]}},"name":{"type":"string"}},"required":["issues","name"],"example":{"name":"ZodError","issues":[{"code":"invalid_type","path":["object"],"message":"Required"},{"code":"invalid_type","path":["deleted"],"message":"Required"},{"code":"invalid_type","path":["id"],"message":"Required"}]}}},"required":["success","error"]}]}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rate_limit"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/internal_error"}}}}}}}},"webhooks":{"webhooks/fileChanges":{"post":{"summary":"File changes","tags":["Webhooks"],"requestBody":{"description":"File Webhooks","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["CREATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["FILE"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the file","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"name":{"type":"string","description":"The name of the file","example":"document.pdf"},"documentDate":{"type":["string","null"],"description":"The date of the document (not the upload date). ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"mimetype":{"type":"string","description":"The mime type of the file","example":"application/pdf"},"size":{"type":"number","description":"The size of the file in bytes","example":1024},"folderId":{"type":["string","null"],"description":"The ID of the folder this file was uploaded to.","example":"cmf41ajzv003706un4i99q19z"},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]}},"required":["id","createdAt","updatedAt","name","documentDate","mimetype","size","folderId","labelIds"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["DELETED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["FILE"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the file","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"name":{"type":"string","description":"The name of the file","example":"document.pdf"},"documentDate":{"type":["string","null"],"description":"The date of the document (not the upload date). ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"mimetype":{"type":"string","description":"The mime type of the file","example":"application/pdf"},"size":{"type":"number","description":"The size of the file in bytes","example":1024},"folderId":{"type":["string","null"],"description":"The ID of the folder this file was uploaded to.","example":"cmf41ajzv003706un4i99q19z"},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]}},"required":["id","createdAt","updatedAt","name","documentDate","mimetype","size","folderId","labelIds"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["UPDATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["FILE"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the file","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"name":{"type":"string","description":"The name of the file","example":"document.pdf"},"documentDate":{"type":["string","null"],"description":"The date of the document (not the upload date). ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"mimetype":{"type":"string","description":"The mime type of the file","example":"application/pdf"},"size":{"type":"number","description":"The size of the file in bytes","example":1024},"folderId":{"type":["string","null"],"description":"The ID of the folder this file was uploaded to.","example":"cmf41ajzv003706un4i99q19z"},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]}},"required":["id","createdAt","updatedAt","name","documentDate","mimetype","size","folderId","labelIds"]},"previousData":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the file","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the file. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"name":{"type":"string","description":"The name of the file","example":"document.pdf"},"documentDate":{"type":["string","null"],"description":"The date of the document (not the upload date). ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"mimetype":{"type":"string","description":"The mime type of the file","example":"application/pdf"},"size":{"type":"number","description":"The size of the file in bytes","example":1024},"folderId":{"type":["string","null"],"description":"The ID of the folder this file was uploaded to.","example":"cmf41ajzv003706un4i99q19z"},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]}},"required":["id","createdAt","updatedAt","name","documentDate","mimetype","size","folderId","labelIds"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data","previousData"]}]}}}},"responses":{"200":{"description":"Webhook received"}}}},"webhooks/fileCommentCreated":{"post":{"summary":"File comment created","tags":["Webhooks"],"requestBody":{"description":"File Comment Webhooks","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["CREATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["FILE_COMMENT"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the file comment","example":"cmf41ajzv003706un4i99q19z"},"text":{"type":"string","description":"The text of the file comment","example":"Comment text"},"createdAt":{"type":"string","description":"The date and time of the creation for the file comment. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the file comment. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"createdById":{"type":"string","description":"The ID of the creator","example":"cmf41ajzv003706un4i99q19z"},"fileId":{"type":"string","description":"The ID of the file this comment was created for.","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","text","createdAt","updatedAt","createdById","fileId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]}]}}}},"responses":{"200":{"description":"Webhook received"}}}},"webhooks/taskChanges":{"post":{"summary":"Task changes","tags":["Webhooks"],"requestBody":{"description":"Task Webhooks","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["CREATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["TASK"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the task","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"title":{"type":"string","description":"The title of the task","example":"Task 1"},"text":{"type":["string","null"],"description":"The text of the task","example":"Task description"},"status":{"type":"string","description":"The status of the task","examples":["OPEN","IN_PROGRESS","IN_REVIEW","ACCEPTED","DECLINED"]},"dueDate":{"type":["string","null"],"description":"The due date of the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"destinationFolderId":{"type":["string","null"],"description":"The ID of the destination folder this task was created in.","example":"cmf41ajzv003706un4i99q19z"},"assetFileIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the files that should be attachement of this task. For example to give extra context to the user who works on this task.","example":["cmf41ajzv003706un4i99q19z"]},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]},"workspaceId":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","createdAt","updatedAt","title","text","status","dueDate","destinationFolderId","assetFileIds","labelIds","workspaceId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["DELETED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["TASK"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the task","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"title":{"type":"string","description":"The title of the task","example":"Task 1"},"text":{"type":["string","null"],"description":"The text of the task","example":"Task description"},"status":{"type":"string","description":"The status of the task","examples":["OPEN","IN_PROGRESS","IN_REVIEW","ACCEPTED","DECLINED"]},"dueDate":{"type":["string","null"],"description":"The due date of the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"destinationFolderId":{"type":["string","null"],"description":"The ID of the destination folder this task was created in.","example":"cmf41ajzv003706un4i99q19z"},"assetFileIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the files that should be attachement of this task. For example to give extra context to the user who works on this task.","example":["cmf41ajzv003706un4i99q19z"]},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]},"workspaceId":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","createdAt","updatedAt","title","text","status","dueDate","destinationFolderId","assetFileIds","labelIds","workspaceId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["UPDATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["TASK"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the task","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"title":{"type":"string","description":"The title of the task","example":"Task 1"},"text":{"type":["string","null"],"description":"The text of the task","example":"Task description"},"status":{"type":"string","description":"The status of the task","examples":["OPEN","IN_PROGRESS","IN_REVIEW","ACCEPTED","DECLINED"]},"dueDate":{"type":["string","null"],"description":"The due date of the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"destinationFolderId":{"type":["string","null"],"description":"The ID of the destination folder this task was created in.","example":"cmf41ajzv003706un4i99q19z"},"assetFileIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the files that should be attachement of this task. For example to give extra context to the user who works on this task.","example":["cmf41ajzv003706un4i99q19z"]},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]},"workspaceId":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","createdAt","updatedAt","title","text","status","dueDate","destinationFolderId","assetFileIds","labelIds","workspaceId"]},"previousData":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the task","example":"cmf41ajzv003706un4i99q19z"},"createdAt":{"type":"string","description":"The date and time of the creation for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"title":{"type":"string","description":"The title of the task","example":"Task 1"},"text":{"type":["string","null"],"description":"The text of the task","example":"Task description"},"status":{"type":"string","description":"The status of the task","examples":["OPEN","IN_PROGRESS","IN_REVIEW","ACCEPTED","DECLINED"]},"dueDate":{"type":["string","null"],"description":"The due date of the task. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"destinationFolderId":{"type":["string","null"],"description":"The ID of the destination folder this task was created in.","example":"cmf41ajzv003706un4i99q19z"},"assetFileIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the files that should be attachement of this task. For example to give extra context to the user who works on this task.","example":["cmf41ajzv003706un4i99q19z"]},"labelIds":{"type":["array","null"],"items":{"type":"string"},"description":"The IDs of the assigned labels","example":["cmf41ajzv003706un4i99q19z"]},"workspaceId":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","createdAt","updatedAt","title","text","status","dueDate","destinationFolderId","assetFileIds","labelIds","workspaceId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data","previousData"]}]}}}},"responses":{"200":{"description":"Webhook received"}}}},"webhooks/taskCommentCreated":{"post":{"summary":"Task comment created","tags":["Webhooks"],"requestBody":{"description":"Task Comment Webhooks","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["CREATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["TASK_COMMENT"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the task comment","example":"cmf41ajzv003706un4i99q19z"},"text":{"type":"string","description":"The text of the task comment","example":"Comment text"},"createdAt":{"type":"string","description":"The date and time of the creation for the task comment. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the task comment. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"createdById":{"type":"string","description":"The ID of the creator","example":"cmf41ajzv003706un4i99q19z"},"taskId":{"type":"string","description":"The ID of the task this comment was created for.","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","text","createdAt","updatedAt","createdById","taskId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]}]}}}},"responses":{"200":{"description":"Webhook received"}}}},"webhooks/clientChanges":{"post":{"summary":"Client changes","tags":["Webhooks"],"requestBody":{"description":"Client Webhooks","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["CREATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["CLIENT"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the client","example":"Muster GmbH"},"slug":{"type":"string","description":"The slug of the client","example":"muster-gmbh"},"type":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client","example":"legal_person"},"customId":{"type":["string","null"],"description":"The client's custom ID can be defined by the accountant","example":"ABC123"},"legalName":{"type":["string","null"],"description":"The legal name of the client","example":"Muster GmbH"},"archivedAt":{"type":["string","null"],"description":"The date and time the client was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"datevClientId":{"type":["string","null"],"description":"The client's ID in DATEV","example":"ABC123"},"createdAt":{"type":"string","description":"The date and time of the creation for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"}},"required":["id","name","slug","type","customId","legalName","archivedAt","datevClientId","createdAt","updatedAt"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["ARCHIVED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["CLIENT"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the client","example":"Muster GmbH"},"slug":{"type":"string","description":"The slug of the client","example":"muster-gmbh"},"type":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client","example":"legal_person"},"customId":{"type":["string","null"],"description":"The client's custom ID can be defined by the accountant","example":"ABC123"},"legalName":{"type":["string","null"],"description":"The legal name of the client","example":"Muster GmbH"},"archivedAt":{"type":["string","null"],"description":"The date and time the client was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"datevClientId":{"type":["string","null"],"description":"The client's ID in DATEV","example":"ABC123"},"createdAt":{"type":"string","description":"The date and time of the creation for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"}},"required":["id","name","slug","type","customId","legalName","archivedAt","datevClientId","createdAt","updatedAt"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["UPDATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["CLIENT"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the client","example":"Muster GmbH"},"slug":{"type":"string","description":"The slug of the client","example":"muster-gmbh"},"type":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client","example":"legal_person"},"customId":{"type":["string","null"],"description":"The client's custom ID can be defined by the accountant","example":"ABC123"},"legalName":{"type":["string","null"],"description":"The legal name of the client","example":"Muster GmbH"},"archivedAt":{"type":["string","null"],"description":"The date and time the client was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"datevClientId":{"type":["string","null"],"description":"The client's ID in DATEV","example":"ABC123"},"createdAt":{"type":"string","description":"The date and time of the creation for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"}},"required":["id","name","slug","type","customId","legalName","archivedAt","datevClientId","createdAt","updatedAt"]},"previousData":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the client","example":"Muster GmbH"},"slug":{"type":"string","description":"The slug of the client","example":"muster-gmbh"},"type":{"type":"string","enum":["natural_person","individual_enterprise","legal_person"],"description":"The type of the client","example":"legal_person"},"customId":{"type":["string","null"],"description":"The client's custom ID can be defined by the accountant","example":"ABC123"},"legalName":{"type":["string","null"],"description":"The legal name of the client","example":"Muster GmbH"},"archivedAt":{"type":["string","null"],"description":"The date and time the client was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"datevClientId":{"type":["string","null"],"description":"The client's ID in DATEV","example":"ABC123"},"createdAt":{"type":"string","description":"The date and time of the creation for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the client. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"}},"required":["id","name","slug","type","customId","legalName","archivedAt","datevClientId","createdAt","updatedAt"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data","previousData"]}]}}}},"responses":{"200":{"description":"Webhook received"}}}},"webhooks/workspaceChanges":{"post":{"summary":"Workspace changes","tags":["Webhooks"],"requestBody":{"description":"Workspace Webhooks","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["CREATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["WORKSPACE"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the workspace","example":"FiBu"},"createdAt":{"type":"string","description":"The date and time of the creation for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"archivedAt":{"type":["string","null"],"description":"The date and time the workspace was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","name","createdAt","updatedAt","archivedAt","clientId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["ARCHIVED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["WORKSPACE"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the workspace","example":"FiBu"},"createdAt":{"type":"string","description":"The date and time of the creation for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"archivedAt":{"type":["string","null"],"description":"The date and time the workspace was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","name","createdAt","updatedAt","archivedAt","clientId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data"]},{"type":"object","properties":{"eventTimestamp":{"type":"string","description":"Timestamp of when the event happened"},"action":{"type":"string","enum":["UPDATED"]},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"},"workspaceId":{"type":["string","null"],"description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"resource":{"type":"string","enum":["WORKSPACE"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the workspace","example":"FiBu"},"createdAt":{"type":"string","description":"The date and time of the creation for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"archivedAt":{"type":["string","null"],"description":"The date and time the workspace was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","name","createdAt","updatedAt","archivedAt","clientId"]},"previousData":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the workspace","example":"cmf41ajzv003706un4i99q19z"},"name":{"type":"string","description":"The name of the workspace","example":"FiBu"},"createdAt":{"type":"string","description":"The date and time of the creation for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"updatedAt":{"type":"string","description":"The date and time of the last update for the workspace. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"archivedAt":{"type":["string","null"],"description":"The date and time the workspace was archived. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).","example":"2021-01-01T00:00:00Z"},"clientId":{"type":"string","description":"The ID of the client","example":"cmf41ajzv003706un4i99q19z"}},"required":["id","name","createdAt","updatedAt","archivedAt","clientId"]}},"required":["eventTimestamp","action","clientId","workspaceId","resource","data","previousData"]}]}}}},"responses":{"200":{"description":"Webhook received"}}}}}}