{"openapi":"3.1.0","info":{"title":"Cuiar API","description":"Control the Cuiar app, manage routines and keys, and use the model gateway. Errors have a stable `error` code. Lists are paged with `limit` and `cursor`. Writes accept `Idempotency-Key`. Every answer carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`.","license":{"name":"Proprietary"},"version":"0.1.0"},"servers":[{"url":"https://api.cuiar.com"}],"paths":{"/v1/me":{"get":{"tags":["account"],"summary":"The caller's account, plan, limits and credits.","operationId":"getMe","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["account:read"]},{"cookie":[]}]}},"/v1/plans":{"get":{"tags":["account"],"summary":"The plans and what a credit is. No sign-in is needed.","operationId":"listPlans","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plans"}}}}},"security":[{}]}},"/v1/credits/events":{"get":{"tags":["account"],"summary":"Changes to the credit balance, newest first.","operationId":"listCreditEvents","parameters":[{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditEventList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["account:read"]},{"cookie":[]}]}},"/v1/me/export":{"get":{"tags":["account"],"summary":"A copy of every record of the account, as one JSON file: the account, plan and payments,\nsessions, keys, sign-ins with their IP addresses, tasks with their steps and file links,\nroutines, approvals, channels, and the sealed vault and sync data.","operationId":"exportAccount","responses":{"200":{"description":"The export, as a JSON file (`format` is `cuiar-export/1`).","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/me/delete/code":{"post":{"tags":["account"],"summary":"Sends a code to the account's address. The code confirms `POST /v1/me/delete`.","operationId":"sendDeleteCode","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"202":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sent"}}}},"4XX":{"description":"See the error codes. `team_owner`: give the team away or delete it first.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/me/delete":{"post":{"tags":["account"],"summary":"Deletes the account for good: a card plan stops at once with no refund, and every task,\nroutine, file, vault item, sync record, key, session and license token goes. A team owner gives\nthe team away or deletes it first.","operationId":"deleteAccount","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccount"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeleted"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/me/email":{"post":{"tags":["account"],"summary":"Sends a code to a new address. `POST /v1/me/email/verify` with the code moves the account to it.","operationId":"startEmailChange","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEmail"}}},"required":true},"responses":{"202":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sent"}}}},"4XX":{"description":"See the error codes. `conflict`: another account has the address.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/me/email/verify":{"post":{"tags":["account"],"summary":"Moves the account to the new address with the code that went to it. Sign-in codes then go to\nthe new address, and the old address gets a notice.","operationId":"verifyEmailChange","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNewEmail"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserView"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/devices":{"get":{"tags":["account"],"summary":"The computers where the Cuiar app is open and connected now.","operationId":"listDevices","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["account:read"]},{"cookie":[]}]}},"/v1/auth/email/start":{"post":{"tags":["auth"],"summary":"Sends a 6-digit sign-in code to the e-mail address. A new address gets an account.","operationId":"startEmailSignIn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStart"}}},"required":true},"responses":{"202":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sent"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{}]}},"/v1/auth/email/verify":{"post":{"tags":["auth"],"summary":"Checks the code and signs in. A request from cuiar.com gets a cookie; any other caller gets a\nsession token.","operationId":"verifyEmailSignIn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailVerify"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedIn"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{}]}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Ends the session that sent the request.","operationId":"signOut","responses":{"204":{"description":"Signed out.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/sessions":{"get":{"tags":["auth"],"summary":"Lists the signed-in sessions, newest first.","operationId":"listSessions","parameters":[{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/sessions/{id}":{"delete":{"tags":["auth"],"summary":"Ends a session.","operationId":"deleteSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Ended.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/auth/device":{"post":{"tags":["auth"],"summary":"Starts device sign-in (RFC 8628) for a CLI or an app. Show `user_code`, then poll\n`/v1/auth/device/token`.","operationId":"startDeviceSignIn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceStart"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorization"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{}]}},"/v1/auth/device/token":{"post":{"tags":["auth"],"summary":"Polls for the device session. Until the user decides, the answer is the error\n`authorization_pending` (or `slow_down`).","operationId":"pollDeviceSignIn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceToken"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceSession"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{}]}},"/v1/auth/device-requests":{"get":{"tags":["auth"],"summary":"Devices that asked to sign in to this account by e-mail address (`cuiar login --email`).\nApprove or refuse each with `POST /v1/auth/device/{user_code}`.","operationId":"listDeviceRequests","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingDeviceList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/auth/device/{user_code}":{"get":{"tags":["auth"],"summary":"Shows the device that a code belongs to, before the user approves it.","operationId":"getDeviceRequest","parameters":[{"name":"user_code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceRequest"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"post":{"tags":["auth"],"summary":"Approves or refuses a device.","operationId":"decideDeviceRequest","parameters":[{"name":"user_code","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceDecision"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decided"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/keys":{"get":{"tags":["keys"],"summary":"Lists the API keys, newest first.","operationId":"listKeys","parameters":[{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]},"post":{"tags":["keys"],"summary":"Makes an API key.","operationId":"createKey","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewKey"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedKey"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/keys/{id}":{"delete":{"tags":["keys"],"summary":"Deletes an API key. Programs that use it stop working at once.","operationId":"deleteKey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Opens a card checkout for a subscription. Send the user to `url`.","operationId":"createCardCheckout","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/billing/crypto":{"post":{"tags":["billing"],"summary":"Opens a crypto checkout that pays for one month or one year. It does not renew.","operationId":"createCryptoCheckout","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CryptoRequest"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Opens the billing portal: change or stop the plan, cards and invoices.","operationId":"openBillingPortal","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/rpc":{"post":{"tags":["app"],"summary":"Sends one JSON-RPC call to the Cuiar app and returns its JSON-RPC answer. The MCP tools are\n`tools/call`.","operationId":"callApp","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RpcRequest"}}},"required":true},"responses":{"200":{"description":"The app's JSON-RPC answer.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"5XX":{"description":"`busy`, `timeout` or `closed`.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks":{"get":{"tags":["tasks"],"summary":"Lists tasks, newest first.","operationId":"listTasks","parameters":[{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]},"post":{"tags":["tasks"],"summary":"Starts a task. It runs in the Cuiar app; follow it with the events.","operationId":"createTask","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTask"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks/{id}":{"get":{"tags":["tasks"],"summary":"One task.","operationId":"getTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]},"delete":{"tags":["tasks"],"summary":"Deletes a task and its transcript. A running task is cancelled first.","operationId":"deleteTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks/{id}/events":{"get":{"tags":["tasks"],"summary":"The task's events after an id. With `wait`, the answer comes when there is a new event, when\nthe task ends, or when the time is up.","operationId":"listTaskEvents","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"after","in":"query","description":"The id of the last event the client has. Default 0: from the start.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"wait","in":"query","description":"Seconds to wait for a new event when there is none yet, 0 to 60. Default 0.","required":false,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]},"post":{"tags":["app"],"summary":"The Cuiar app reports what happens in a task. A `status` event (`{\"status\": ...}`) moves the\ntask; a `result` event (`{\"text\": ...}`) ends it as done; an `error` event (`{\"message\": ...}`)\nends it as failed. Only the app's device session may call it.","operationId":"reportTaskEvents","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventReport"}}},"required":true},"responses":{"204":{"description":"Stored.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/tasks/{id}/messages":{"post":{"tags":["tasks"],"summary":"Sends a follow-up to a task. A task that ended starts again with it.","operationId":"sendTaskMessage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewMessage"}}},"required":true},"responses":{"202":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskEvent"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks/{id}/pause":{"post":{"tags":["tasks"],"summary":"Pauses a running task. The app reports the new status as an event.","operationId":"pauseTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks/{id}/resume":{"post":{"tags":["tasks"],"summary":"Resumes a paused task.","operationId":"resumeTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks/{id}/cancel":{"post":{"tags":["tasks"],"summary":"Cancels a task.","operationId":"cancelTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks/{id}/files":{"get":{"tags":["tasks"],"summary":"The files of a task, oldest first.","operationId":"listTaskFiles","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]},"post":{"tags":["app"],"summary":"The Cuiar app asks to upload a file of a task. Only the app's device session may call it.","operationId":"createTaskFile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewFile"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/tasks/{id}/files/{file}":{"get":{"tags":["tasks"],"summary":"A file of a task with a short-lived download URL.","operationId":"getTaskFile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"file","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"inline","in":"query","description":"True to show the file in the browser; false (the default) to save it.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/tasks/{id}/files/{file}/done":{"post":{"tags":["app"],"summary":"The app says an upload ended. The API checks the size, marks the file ready and adds a `file`\nevent to the transcript.","operationId":"finishTaskFile","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"file","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskFile"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/approvals":{"get":{"tags":["tasks"],"summary":"The newest approval requests.","operationId":"listApprovals","parameters":[{"name":"status","in":"query","description":"Only these: `pending` for the open requests.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]},"post":{"tags":["app"],"summary":"The Cuiar app asks the user to approve an action. Only the app's device session may call it.\nWait for the answer with `GET /v1/approvals/{id}?wait=60`.","operationId":"requestApproval","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewApproval"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/approvals/{id}":{"get":{"tags":["tasks"],"summary":"One approval request. With `wait`, the answer comes when the user decides or the time is up.","operationId":"getApproval","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"wait","in":"query","description":"Seconds to wait for the user's answer, 0 to 60. Default 0.","required":false,"schema":{"type":"integer","format":"int64","minimum":0}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["app"]},{"cookie":[]}]}},"/v1/approvals/{id}/decide":{"post":{"tags":["tasks"],"summary":"Approves or refuses a request. API keys cannot: a person decides.","operationId":"decideApproval","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/routines":{"get":{"tags":["routines"],"summary":"Lists the routines, oldest first, each with its newest run.","operationId":"listRoutines","parameters":[{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutineList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:read"]},{"cookie":[]}]},"post":{"tags":["routines"],"summary":"Makes a routine.","operationId":"createRoutine","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRoutine"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routine"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:write"]},{"cookie":[]}]}},"/v1/routines/{id}":{"get":{"tags":["routines"],"summary":"One routine.","operationId":"getRoutine","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routine"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:read"]},{"cookie":[]}]},"delete":{"tags":["routines"],"summary":"Deletes a routine and its runs.","operationId":"deleteRoutine","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:write"]},{"cookie":[]}]},"patch":{"tags":["routines"],"summary":"Changes a routine. Absent fields stay as they are.","operationId":"updateRoutine","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Patch"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routine"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:write"]},{"cookie":[]}]}},"/v1/routines/{id}/runs":{"get":{"tags":["routines"],"summary":"The runs of a routine, newest first.","operationId":"listRoutineRuns","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:read"]},{"cookie":[]}]}},"/v1/routines/{id}/run":{"post":{"tags":["routines"],"summary":"Runs a routine now. The result comes like a scheduled run's.","operationId":"runRoutine","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Started"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:write"]},{"cookie":[]}]}},"/v1/routines/runs/{run}":{"post":{"tags":["app"],"summary":"The Cuiar app reports the end of a run it was sent. Only the app's device session may call it.","operationId":"reportRoutineRun","parameters":[{"name":"run","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}},"required":true},"responses":{"204":{"description":"Stored.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/routines/suggestions":{"get":{"tags":["routines"],"summary":"The open suggestions.","operationId":"listRoutineSuggestions","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:read"]},{"cookie":[]}]},"post":{"tags":["routines"],"summary":"Looks for work the user repeats and returns the open suggestions.","operationId":"findRoutineSuggestions","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindRequest"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:write"]},{"cookie":[]}]}},"/v1/routines/suggestions/{id}/activate":{"post":{"tags":["routines"],"summary":"Makes the suggested routine.","operationId":"activateRoutineSuggestion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routine"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:write"]},{"cookie":[]}]}},"/v1/routines/suggestions/{id}/dismiss":{"post":{"tags":["routines"],"summary":"Dismisses a suggestion. The same work is not suggested again.","operationId":"dismissRoutineSuggestion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Dismissed.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["routines:write"]},{"cookie":[]}]}},"/v1/llm/models":{"get":{"tags":["models"],"summary":"The models of the gateway.","operationId":"listModels","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}}},"security":[{}]}},"/v1/llm/chat/completions":{"post":{"tags":["models"],"summary":"An OpenAI-format chat completion. `\"stream\": true` answers as server-sent events. The tokens\nare metered in credits; `max_tokens` is lowered to what the credits pay for. This operation\ndoes not take `Idempotency-Key`.","operationId":"createChatCompletion","requestBody":{"description":"An OpenAI chat completion request. `model` is optional.","content":{"application/json":{"schema":{}}},"required":true},"responses":{"200":{"description":"An OpenAI chat completion, or an event stream.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"5XX":{"description":"`model` when the provider did not answer.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"bearer":["models"]},{"cookie":[]}]}},"/v1/vault":{"get":{"tags":["vault"],"summary":"The vault's key material. `no_vault` when the user has none.","operationId":"getVault","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultInfo"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"post":{"tags":["vault"],"summary":"Makes the vault.","operationId":"createVault","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewVault"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Revision"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"delete":{"tags":["vault"],"summary":"Deletes the vault and every item. This is the only way out of a forgotten master password.","operationId":"deleteVault","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Confirm"}}},"required":true},"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/keys":{"put":{"tags":["vault"],"summary":"A new master password: the same user key under a new wrap. Items do not change.","operationId":"changeVaultPassword","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyChange"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Revision"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/rotate":{"post":{"tags":["vault"],"summary":"A new user key: every live item comes back sealed with it, in one change.","operationId":"rotateVaultKey","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rotation"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Revision"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/sync":{"get":{"tags":["vault"],"summary":"Items changed after a revision, in (revision, id) order. While `more` is true, call again with `next`; at the end, keep `revision` for the next sync.","operationId":"syncVault","parameters":[{"name":"since","in":"query","description":"The `revision` of the last sync. 0 for everything.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"after","in":"query","description":"With `since`, continues a page after this item id.","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPage"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/items/{id}":{"put":{"tags":["vault"],"summary":"Makes or changes an item. A stale `baseRevision` gets `conflict` with the current item in `detail`.","operationId":"putVaultItem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upsert"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemRevision"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"delete":{"tags":["vault"],"summary":"Deletes an item.","operationId":"deleteVaultItem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"baseRevision","in":"query","description":"The revision the client last saw.","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemRevision"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/items/batch":{"post":{"tags":["vault"],"summary":"Adds many new items in one change, for an import.","operationId":"addVaultItems","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Added"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/sync":{"get":{"tags":["sync"],"summary":"The records changed after a revision, deleted ones included.","operationId":"pullSync","parameters":[{"name":"since","in":"query","description":"The store revision the device has seen; 0 for everything.","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"after","in":"query","description":"From `next.after` of the page before: \"<collection>/<id>\".","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Records in one page, 1 to 500. Default 500.","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullPage"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"post":{"tags":["sync"],"summary":"Writes a batch of records. A change whose `baseVersion` is not the current version is not\nwritten; the current record comes back in `conflicts`.","operationId":"pushSync","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Push"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushResult"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"delete":{"tags":["sync"],"summary":"Deletes the account's synced data, for example after the vault key changed and the old\nrecords can no longer be opened. Devices then write their data again.","operationId":"wipeSync","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/teams":{"post":{"tags":["teams"],"summary":"Makes a team. The caller is its owner.","operationId":"createTeam","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTeam"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRef"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team":{"get":{"tags":["teams"],"summary":"The caller's team. The owner and admins also get the seats, the domains and the connection.","operationId":"getTeam","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamView"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"delete":{"tags":["teams"],"summary":"Deletes the team: its members, domains, sign-in provider and rules. Only an owner can.\nThe members keep their accounts.","operationId":"deleteTeam","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Deleted.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/members":{"post":{"tags":["teams"],"summary":"Adds a person who already has an account, as a member.","operationId":"addTeamMember","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewMember"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/members/{user}":{"put":{"tags":["teams"],"summary":"Changes a member's role. Only an owner makes or unmakes owners; a team keeps one owner.","operationId":"setTeamRole","parameters":[{"name":"user","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleChange"}}},"required":true},"responses":{"204":{"description":"Changed.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"delete":{"tags":["teams"],"summary":"Removes a member. A member can remove themselves; the last owner cannot leave.","operationId":"removeTeamMember","parameters":[{"name":"user","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/domains":{"post":{"tags":["teams"],"summary":"Adds an email domain. It counts once a TXT record proves the team controls it.","operationId":"addTeamDomain","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewDomain"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/domains/{domain}/verify":{"post":{"tags":["teams"],"summary":"Checks the TXT record `_cuiar.<domain>` and marks the domain verified.","operationId":"verifyTeamDomain","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/domains/{domain}":{"delete":{"tags":["teams"],"summary":"Removes a domain.","operationId":"removeTeamDomain","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/policy":{"get":{"tags":["teams"],"summary":"The policy of the caller's team; null when the caller is in no team. The browser asks for it\nand applies it.","operationId":"getTeamPolicy","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Policy"},{"type":"null"}]}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"put":{"tags":["teams"],"summary":"Changes the team policy.","operationId":"setTeamPolicy","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/transfer":{"post":{"tags":["teams"],"summary":"Gives the team to another member. The caller, an owner, becomes an admin and can then leave.","operationId":"transferTeam","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}},"required":true},"responses":{"204":{"description":"Transferred.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/team/sso":{"put":{"tags":["teams"],"summary":"Sets the team's sign-in provider. The issuer's discovery document must load.","operationId":"setTeamSso","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoConfig"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SsoView"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"delete":{"tags":["teams"],"summary":"Removes the team's sign-in provider.","operationId":"removeTeamSso","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/auth/sso/start":{"get":{"tags":["auth"],"summary":"Sends the person to the team's provider. The address picks the team through its domain.","operationId":"startSso","parameters":[{"name":"email","in":"query","description":"The person's work address.","required":true,"schema":{"type":"string"}}],"responses":{"303":{"description":"To the provider.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/v1/auth/sso/callback":{"get":{"tags":["auth"],"summary":"The provider sends the person back here. The ID token is checked, the person gets a web\nsession and joins the team, and the site's account page opens.","operationId":"finishSso","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"error","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"303":{"description":"To the site.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}}}}},"/v1/vault/settings":{"get":{"tags":["vault"],"summary":"The vault's policy and approval settings.","operationId":"getVaultSettings","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"put":{"tags":["vault"],"summary":"Changes the vault's policy and approval settings.","operationId":"changeVaultSettings","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/audit":{"get":{"tags":["vault"],"summary":"Every use of a credential, newest first.","operationId":"listVaultUses","parameters":[{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"post":{"tags":["vault"],"summary":"Records uses of credentials. The app sends one for every fill, and the site for every view or\ncopy.","operationId":"recordVaultUse","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditReport"}}},"required":true},"responses":{"204":{"description":"Recorded.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/unlock-keys":{"get":{"tags":["vault"],"summary":"The passkeys that can unlock the vault.","operationId":"listVaultUnlockKeys","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlockKeyList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"post":{"tags":["vault"],"summary":"Adds a passkey that unlocks the vault.","operationId":"addVaultUnlockKey","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlockKey"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlockKey"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/vault/unlock-keys/{id}":{"delete":{"tags":["vault"],"summary":"Removes a passkey from the vault's unlock keys.","operationId":"removeVaultUnlockKey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/release-notices":{"get":{"tags":["releases"],"summary":"The build e-mails the user asked for.","operationId":"listReleaseNotices","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoticeList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/release-notices/{platform}":{"put":{"tags":["releases"],"summary":"Asks for one e-mail when the build for the platform is out. Asking again changes nothing.","operationId":"createReleaseNotice","parameters":[{"name":"platform","in":"path","description":"`macos`, `windows` or `linux`.","required":true,"schema":{"type":"string"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoticeBody"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]},"delete":{"tags":["releases"],"summary":"Cancels the e-mail for a platform.","operationId":"deleteReleaseNotice","parameters":[{"name":"platform","in":"path","description":"`macos`, `windows` or `linux`.","required":true,"schema":{"type":"string"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Cancelled.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels":{"get":{"tags":["channels"],"summary":"The channels that drive the account's tasks.","operationId":"listChannels","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelList"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/email":{"post":{"tags":["channels"],"summary":"Makes the account's e-mail address for tasks, or a new one in place of the old.","operationId":"makeEmailChannel","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/links":{"post":{"tags":["channels"],"summary":"A code that links a Telegram chat, or a member of a Slack workspace that has the app, to the\naccount.","operationId":"makeChannelLink","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewLink"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/{id}":{"delete":{"tags":["channels"],"summary":"Removes a channel. Its chat or address stops driving tasks at once.","operationId":"removeChannel","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"204":{"description":"Removed.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/imessage":{"post":{"tags":["channels"],"summary":"Makes an iMessage channel for one Mac. The bridge on that Mac (`cuiar imessage`) uses its id.","operationId":"makeImessageChannel","parameters":[{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewImessage"}}},"required":true},"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channel"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/{id}/messages":{"post":{"tags":["channels"],"summary":"A message that the bridge read in Messages: a new task, a follow-up, an answer to an approval,\nor `stop`. A reply to a message of a task goes on with that task; any other message goes to\nthe chat's task while it runs, and starts a new task when none runs. `stop` cancels the\nchat's task. The bridge sends only messages from handles that the user allows. The answer\nwaits in the outbox.","operationId":"postBridgeMessage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeMessage"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgeOutcome"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/{id}/outbox":{"get":{"tags":["channels"],"summary":"The answers that wait for the bridge to send them, oldest first.","operationId":"listOutbox","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Outbox"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/{id}/outbox/{message}/sent":{"post":{"tags":["channels"],"summary":"The bridge sent an answer: it leaves the outbox. Sending this again changes nothing.","operationId":"outboxSent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"message","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutboxSent"}}},"required":true},"responses":{"204":{"description":"Done.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]}]}},"/v1/channels/slack/install":{"get":{"tags":["channels"],"summary":"Opens Slack to add the Cuiar app to a workspace. The member who adds it is linked at once.","operationId":"installSlack","responses":{"303":{"description":"To Slack.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"cookie":[]}]}},"/v1/channels/email/inbound":{"post":{"tags":["channels"],"summary":"The Email Worker posts each message for `@in.cuiar.com` here. The answer is 202 for every\nmessage, so it does not tell which addresses exist.","operationId":"receiveEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboundEmail"}}},"required":true},"responses":{"202":{"description":"Taken.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{}]}},"/v1/channels/telegram/webhook":{"post":{"tags":["channels"],"summary":"Telegram sends the bot's updates here.","operationId":"receiveTelegram","responses":{"200":{"description":"Taken.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{}]}},"/v1/channels/slack/oauth":{"get":{"tags":["channels"],"summary":"Slack sends the member back here after the app was added.","operationId":"slackInstalled","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"state","in":"path","required":true,"schema":{"type":["string","null"]}},{"name":"error","in":"path","required":true,"schema":{"type":["string","null"]}}],"responses":{"303":{"description":"To the account page.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}}},"security":[{}]}},"/v1/channels/slack/events":{"post":{"tags":["channels"],"summary":"Slack sends the app's events here: direct messages to the app start and continue tasks.","operationId":"receiveSlack","responses":{"200":{"description":"Taken.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{}]}},"/v1/tasks/{id}/handoff":{"post":{"tags":["tasks"],"summary":"Moves a task and its workspace to a Cuiar cloud browser, so it goes on while the computer\nsleeps. Pro and Team. The cloud browser takes `CREDITS_PER_MINUTE` credits a minute.","operationId":"handOffTask","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"201":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewHandoff"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]},{"bearer":["app"]}]}},"/v1/handoffs":{"get":{"tags":["tasks"],"summary":"The account's hand-offs, newest first.","operationId":"listHandoffs","parameters":[{"name":"limit","in":"query","description":"Items per page, 1 to 200. Default 50.","required":false,"schema":{"type":"integer","format":"int32","maximum":200,"minimum":1}},{"name":"cursor","in":"query","description":"The `nextCursor` of the page before.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffPage"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]},{"bearer":["app"]}]}},"/v1/handoffs/{id}":{"get":{"tags":["tasks"],"summary":"One hand-off.","operationId":"getHandoff","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handoff"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]},{"bearer":["app"]}]}},"/v1/handoffs/{id}/ready":{"post":{"tags":["app"],"summary":"The app uploaded the workspace bundle. The task waits for a cloud browser.","operationId":"handoffReady","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handoff"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/handoffs/{id}/return":{"post":{"tags":["tasks"],"summary":"Brings the task back from the cloud browser to the app.","operationId":"returnHandoff","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handoff"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]},{"cookie":[]},{"bearer":["app"]}]}},"/v1/handoffs/{id}/done":{"post":{"tags":["app"],"summary":"The app unpacked the returned workspace. The task goes on in the app.","operationId":"handoffDone","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"idempotency-key","in":"header","description":"Any unique string. A retry with the same key gets the first answer, with `Idempotent-Replayed: true`, and does not run again. Kept 24 hours.","required":false,"schema":{"type":"string","maxLength":255,"minLength":1}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handoff"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/v1/runners/claim":{"post":{"tags":["runners"],"summary":"A runner takes the oldest hand-off that waits. 204 when none waits.","operationId":"claimHandoff","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Claim"}}}},"204":{"description":"Nothing waits.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"runner":[]}]}},"/v1/runners/handoffs/{id}/beat":{"post":{"tags":["runners"],"summary":"The runner's heartbeat, every `beatSeconds`.","operationId":"beatHandoff","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Beat"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"runner":[]}]}},"/v1/runners/handoffs/{id}/state":{"post":{"tags":["runners"],"summary":"Where the runner uploads the workspace it brings back.","operationId":"handoffReturnUrl","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnUrl"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"runner":[]}]}},"/v1/runners/handoffs/{id}/returned":{"post":{"tags":["runners"],"summary":"The runner uploaded the workspace and closed the cloud browser. The app gets it back.","operationId":"handoffReturned","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handoff"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"runner":[]}]}},"/v1/runners/handoffs/{id}/failed":{"post":{"tags":["runners"],"summary":"The runner could not run the workspace. The task goes on in the app with the app's copy.","operationId":"handoffFailed","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerFailure"}}},"required":true},"responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handoff"}}}},"4XX":{"description":"See the error codes.","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"runner":[]}]}},"/v1/ip":{"get":{"tags":["account"],"summary":"The caller's public address. No credential is needed.","operationId":"getIp","responses":{"200":{"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed in the window."},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the window."},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until the window starts again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}}}},"security":[{}]}}},"components":{"schemas":{"AccountDeleted":{"type":"object","required":["deleted","kept"],"properties":{"deleted":{"type":"boolean"},"kept":{"type":"array","items":{"type":"string"},"description":"What is kept after the deletion, and why."}}},"Added":{"type":"object","required":["revision","added"],"properties":{"revision":{"type":"integer","format":"int64"},"added":{"type":"integer","minimum":0}}},"Address":{"type":"object","required":["ip"],"properties":{"ip":{"type":"string","description":"The address this request came from, as Cloudflare saw it."}}},"Applied":{"type":"object","description":"A change the store took.","required":["collection","id","version","revision"],"properties":{"collection":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer","format":"int64"},"revision":{"type":"integer","format":"int64"}}},"Approval":{"type":"object","required":["id","kind","summary","details","status","createdAt","expiresAt"],"properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":["string","null"],"format":"uuid"},"kind":{"type":"string","description":"`payment`, `post`, `message`, `credential` or `other`."},"summary":{"type":"string","description":"What the agent wants to do, in one sentence."},"details":{"type":"object","description":"For example the amount, the site and the recipient."},"status":{"type":"string","description":"`pending`, `approved`, `refused` or `expired`."},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"decidedAt":{"type":["string","null"],"format":"date-time"}}},"ApprovalList":{"type":"object","required":["approvals"],"properties":{"approvals":{"type":"array","items":{"$ref":"#/components/schemas/Approval"}},"nextCursor":{"type":["string","null"],"description":"Always null: the list has the 50 newest."}}},"AuditEntry":{"type":"object","required":["action","actor","outcome"],"properties":{"itemId":{"type":["string","null"],"format":"uuid"},"action":{"type":"string","description":"`fill`, `view`, `copy`, `totp`, `passkey`, `export` or `import`."},"actor":{"type":"string","description":"`agent` or `user`."},"outcome":{"type":"string","description":"`allowed`, `denied`, `approved` or `refused`."},"urlHost":{"type":["string","null"],"description":"The site's host name, for example `mail.example.com`. Never a full URL."},"taskId":{"type":["string","null"],"format":"uuid"}}},"AuditList":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/AuditView"}},"nextCursor":{"type":["string","null"]}}},"AuditReport":{"type":"object","required":["entries"],"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"},"description":"1 to 100 entries."}}},"AuditView":{"type":"object","required":["id","action","actor","outcome","createdAt"],"properties":{"id":{"type":"integer","format":"int64"},"itemId":{"type":["string","null"],"format":"uuid"},"action":{"type":"string"},"actor":{"type":"string"},"outcome":{"type":"string"},"urlHost":{"type":["string","null"]},"taskId":{"type":["string","null"],"format":"uuid"},"device":{"type":["string","null"],"description":"`web` or `device`: where the use was recorded."},"createdAt":{"type":"string","format":"date-time"}}},"Balance":{"type":"object","required":["monthlyAllowance","monthlyLeft","extra","total","periodStart","periodEnd"],"properties":{"monthlyAllowance":{"type":"integer","format":"int64"},"monthlyLeft":{"type":"integer","format":"int64"},"extra":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"}}},"Batch":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SealedItem"},"description":"1 to 1,000 new items with new ids."}}},"Beat":{"type":"object","required":["action"],"properties":{"action":{"type":"string","description":"`continue`, `return` (pack the workspace, upload it and call `returned`) or `stop` (close the\nbrowser and delete the workspace)."}}},"BridgeMessage":{"type":"object","required":["id","chat","text"],"properties":{"id":{"type":"string","description":"The message's own id. The same id sent again does nothing."},"chat":{"type":"string","description":"The bridge's opaque key for the chat. The answers go back to this chat."},"text":{"type":"string"},"replyTo":{"type":["string","null"],"description":"The id of the message this one replies to, when the sender used Reply."}}},"BridgeOutcome":{"type":"object","required":["outcome"],"properties":{"outcome":{"type":"string","description":"`started`, `continued`, `answered`, `stopped`, `refused` (the reason is in the answer) or\n`duplicate` (the id came before; nothing was done)."},"taskId":{"type":["string","null"],"format":"uuid"}}},"Change":{"type":"object","description":"One write: new data, or a deletion.","required":["collection","id","baseVersion"],"properties":{"collection":{"type":"string"},"id":{"type":"string"},"baseVersion":{"type":"integer","format":"int64","description":"The version the device last saw; 0 for a record it has not seen."},"data":{"type":["string","null"],"description":"A v1 envelope. Absent with `deleted`."},"deleted":{"type":"boolean"}}},"Channel":{"type":"object","required":["id","kind","address","name","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","description":"`email`, `telegram`, `slack` or `imessage`."},"address":{"type":"string","description":"For e-mail: the address to write to. For iMessage: a random id. Otherwise the linked chat."},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"ChannelList":{"type":"object","required":["channels","email","slack"],"properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"nextCursor":{"type":["string","null"],"description":"Always null: an account has few channels."},"email":{"type":"boolean","description":"Whether this server receives e-mail for tasks."},"telegramBot":{"type":["string","null"],"description":"The Telegram bot's user name, when the Telegram channel is on."},"slack":{"type":"boolean","description":"Whether the Slack app can be added to a workspace."}}},"CheckoutRequest":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","description":"`pro` or `team`."},"interval":{"type":["string","null"],"description":"`month` (the default) or `year`."}}},"Claim":{"type":"object","required":["handoff","task","stateUrl","session","beatSeconds"],"properties":{"handoff":{"$ref":"#/components/schemas/Handoff"},"task":{"$ref":"#/components/schemas/Task"},"stateUrl":{"type":"string","description":"The workspace bundle (presigned GET, 1 hour)."},"session":{"$ref":"#/components/schemas/CloudSession"},"beatSeconds":{"type":"integer","format":"int64"}}},"CloudSession":{"type":"object","required":["token","device"],"properties":{"token":{"type":"string","description":"The session for the cloud browser's extension. It ends with the hand-off."},"device":{"type":"string","description":"The device id the cloud browser connects to the bridge with."}}},"Confirm":{"type":"object","required":["confirm"],"properties":{"confirm":{"type":"string","description":"Exactly `delete my vault`."}}},"CreatedKey":{"type":"object","description":"A new key, with its secret. The secret is shown in this answer only.","required":["id","name","prefix","scopes","key"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"key":{"type":"string"}}},"CreditEvent":{"type":"object","description":"One change to the credit balance. Use is negative.","required":["id","kind","amount","createdAt"],"properties":{"id":{"type":"integer","format":"int64"},"kind":{"type":"string","description":"For example `model`, `topup` or `grant`."},"amount":{"type":"integer","format":"int64","description":"Whole credits. Negative for use."},"micro":{"type":["integer","null"],"format":"int64","description":"For metered use: the use in millionths of a credit."},"createdAt":{"type":"string","format":"date-time"}}},"CreditEventList":{"type":"object","required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/CreditEvent"}},"nextCursor":{"type":["string","null"]}}},"CreditInfo":{"type":"object","description":"What a credit is.","required":["costUsd","model","pricePerMillionTokens","tokensPerCredit","ownSubscriptionOverMcp"],"properties":{"costUsd":{"type":"number","format":"double","description":"US dollars of cost in one credit."},"model":{"type":"string"},"pricePerMillionTokens":{"$ref":"#/components/schemas/TokenPrice"},"tokensPerCredit":{"$ref":"#/components/schemas/TokensPerCredit"},"ownSubscriptionOverMcp":{"type":"integer","format":"int64","description":"Credits that work driven by the user's own MCP client uses: none."}}},"CryptoRequest":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","description":"`pro` or `team`."},"interval":{"type":["string","null"],"description":"`month` (the default) pays for one month, `year` for twelve at the yearly price."}}},"Decided":{"type":"object","required":["status"],"properties":{"status":{"type":"string","description":"`approved` or `denied`."}}},"Decision":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"}}},"DeleteAccount":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"The 6-digit code from `POST /v1/me/delete/code`."}}},"DeviceAuthorization":{"type":"object","description":"A device authorization (RFC 8628). Field names follow the RFC.","required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"],"properties":{"device_code":{"type":"string"},"user_code":{"type":"string"},"verification_uri":{"type":"string"},"verification_uri_complete":{"type":"string"},"expires_in":{"type":"integer","format":"int64"},"interval":{"type":"integer","format":"int64"}}},"DeviceDecision":{"type":"object","required":["approve"],"properties":{"approve":{"type":"boolean"}}},"DeviceList":{"type":"object","required":["devices"],"properties":{"devices":{"type":"array","items":{"$ref":"#/components/schemas/DeviceView"}},"nextCursor":{"type":["string","null"],"description":"Always null: the list is short and complete."}}},"DeviceRequest":{"type":"object","description":"A device that waits for the user's approval.","required":["userCode","clientName","status","createdAt"],"properties":{"userCode":{"type":"string"},"clientName":{"type":"string"},"status":{"type":"string","description":"`pending`, `approved`, `denied` or `consumed`."},"createdAt":{"type":"string","format":"date-time"}}},"DeviceSession":{"type":"object","description":"The session a device gets when the user approves its code.","required":["token","token_type","user"],"properties":{"token":{"type":"string"},"token_type":{"type":"string","description":"Always `Bearer`."},"user":{"$ref":"#/components/schemas/UserView"}}},"DeviceStart":{"type":"object","properties":{"clientName":{"type":["string","null"],"description":"The name the session list shows."},"email":{"type":["string","null"],"description":"With an e-mail address, the owner of that account gets an e-mail with a link to approve\nthe device, and the request shows on the account page."}}},"DeviceToken":{"type":"object","required":["device_code"],"properties":{"device_code":{"type":"string"}}},"DeviceView":{"type":"object","required":["id","name","connectedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"connectedAt":{"type":"string","format":"date-time"}}},"Domain":{"type":"object","required":["domain","record","verified"],"properties":{"domain":{"type":"string"},"record":{"type":"string","description":"The TXT record to add: name `_cuiar.<domain>`, this value."},"verified":{"type":"boolean"}}},"Download":{"type":"object","required":["file","downloadUrl"],"properties":{"file":{"$ref":"#/components/schemas/TaskFile"},"downloadUrl":{"type":"string","description":"GET it within 10 minutes."}}},"EmailStart":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"EmailVerify":{"type":"object","required":["email","code"],"properties":{"email":{"type":"string"},"code":{"type":"string"},"clientName":{"type":["string","null"],"description":"The name the session list shows, for example \"Cuiar on MacBook\"."}}},"Entitlement":{"type":"object","description":"What a user can use now, from the best live subscription row.","required":["plan","source","cancelAtPeriodEnd"],"properties":{"plan":{"$ref":"#/components/schemas/Plan"},"source":{"type":"string","description":"`free`, `stripe`, `crypto` or `grant`."},"periodStart":{"type":["string","null"],"format":"date-time"},"periodEnd":{"type":["string","null"],"format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"status":{"type":["string","null"]}}},"ErrorBody":{"type":"object","description":"The body of every error response.","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"},"detail":{"description":"Extra data the client needs to recover."}}},"ErrorCode":{"oneOf":[{"type":"string","description":"400. The request is not valid. The message says why.","enum":["bad_request"]},{"type":"string","description":"400. Device sign-in (RFC 8628): the user has not approved the code yet. Poll again.","enum":["authorization_pending"]},{"type":"string","description":"400. Device sign-in: poll less often.","enum":["slow_down"]},{"type":"string","description":"400. Device sign-in: the user refused the code.","enum":["access_denied"]},{"type":"string","description":"400. Device sign-in: the code expired or was used.","enum":["expired_token"]},{"type":"string","description":"400. Device sign-in: the device code is not known.","enum":["invalid_grant"]},{"type":"string","description":"401. No credential, or the credential is not valid.","enum":["unauthorized"]},{"type":"string","description":"401. The sign-in code is wrong or expired.","enum":["invalid_code"]},{"type":"string","description":"403. This credential cannot do this.","enum":["forbidden"]},{"type":"string","description":"403. The API key does not have the scope. `detail.required` names it.","enum":["insufficient_scope"]},{"type":"string","description":"404. The resource does not exist.","enum":["not_found"]},{"type":"string","description":"404. The user has no vault yet.","enum":["no_vault"]},{"type":"string","description":"402. The plan does not include this.","enum":["plan"]},{"type":"string","description":"402. The credits do not pay for this.","enum":["no_credits"]},{"type":"string","description":"402. The task used the credits it may use (`maxCredits`).","enum":["task_budget"]},{"type":"string","description":"409. The request conflicts with the current state.","enum":["conflict"]},{"type":"string","description":"409. The user already has a card subscription.","enum":["already_subscribed"]},{"type":"string","description":"409. The user has no payments yet.","enum":["no_billing"]},{"type":"string","description":"409. The account has the most API keys it can have.","enum":["too_many_keys"]},{"type":"string","description":"409. The account has the most routines it can have.","enum":["too_many_routines"]},{"type":"string","description":"409. The routine run already has a result.","enum":["finished"]},{"type":"string","description":"409. The vault has the most items it can have.","enum":["full"]},{"type":"string","description":"409. The Cuiar app is not open on any device of the account.","enum":["offline"]},{"type":"string","description":"409. A request with this `Idempotency-Key` is still running.","enum":["idempotency_key_in_use"]},{"type":"string","description":"422. This `Idempotency-Key` was used for a different request.","enum":["idempotency_key_reused"]},{"type":"string","description":"413. The body is too large.","enum":["too_large"]},{"type":"string","description":"429. Too many requests. `Retry-After` says when to try again.","enum":["rate_limited"]},{"type":"string","description":"500. A fault on our side.","enum":["internal"]},{"type":"string","description":"502. The model provider did not answer.","enum":["model"]},{"type":"string","description":"502. The app closed the connection before it answered.","enum":["closed"]},{"type":"string","description":"503. A service this needs is not available now.","enum":["unavailable"]},{"type":"string","description":"503. The app has too many requests open.","enum":["busy"]},{"type":"string","description":"504. The app did not answer in time.","enum":["timeout"]},{"type":"string","description":"409. The account owns a team. Give the team to another member or delete it first.","enum":["team_owner"]}],"description":"Every error code the API returns. A code never changes its meaning or its status."},"EventPage":{"type":"object","required":["task","events"],"properties":{"task":{"$ref":"#/components/schemas/Task","description":"The task as it is now."},"events":{"type":"array","items":{"$ref":"#/components/schemas/TaskEvent"},"description":"Events after `after`, oldest first. Send the last id as `after` for the next call."}}},"EventReport":{"type":"object","required":["events"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/NewEvent"},"description":"1 to 100 events, oldest first."}}},"FileList":{"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/TaskFile"}},"nextCursor":{"type":["string","null"],"description":"Always null: a task's files come in one list."}}},"FindRequest":{"type":"object","properties":{"timeZone":{"type":["string","null"],"description":"The user's IANA time zone, for the schedule. Default `UTC`."}}},"Handoff":{"type":"object","required":["id","taskId","status","secondsBilled","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"taskId":{"type":"string","format":"uuid"},"status":{"type":"string","description":"`packing` (the app packs the workspace), `waiting` (for a cloud browser), `running`,\n`returning` (the cloud browser packs the workspace), `returned` (the app unpacks it), `closed`\nor `failed`."},"reason":{"type":["string","null"],"description":"Why it returned or failed: `asked`, `ended`, `credits`, `no_runner`, `runner_lost`, `packing`\nor the runner's words."},"secondsBilled":{"type":"integer","format":"int32","description":"The time the cloud browser ran, which the credits paid."},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"returnedAt":{"type":["string","null"],"format":"date-time"},"closedAt":{"type":["string","null"],"format":"date-time"}}},"HandoffPage":{"type":"object","required":["handoffs"],"properties":{"handoffs":{"type":"array","items":{"$ref":"#/components/schemas/Handoff"}},"nextCursor":{"type":["string","null"]}}},"InboundEmail":{"type":"object","required":["to","from"],"properties":{"to":{"type":"string","description":"The address the message was sent to."},"from":{"type":"string","description":"The address in the From header."},"subject":{"type":["string","null"]},"text":{"type":["string","null"],"description":"The plain text of the message."},"authResults":{"type":["string","null"],"description":"The topmost Authentication-Results header, which our mail server added."}}},"ItemRevision":{"type":"object","description":"An item's revision after a change.","required":["id","revision"],"properties":{"id":{"type":"string","format":"uuid"},"revision":{"type":"integer","format":"int64"}}},"ItemView":{"type":"object","required":["id","revision","deleted"],"properties":{"id":{"type":"string","format":"uuid"},"revision":{"type":"integer","format":"int64"},"data":{"type":["string","null"],"description":"The sealed item. Null when it was deleted."},"deleted":{"type":"boolean"}}},"Key":{"type":"object","description":"An API key. The secret is not in it.","required":["id","name","prefix","scopes","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string","description":"The first characters of the secret, to tell keys apart."},"scopes":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"}}},"KeyChange":{"type":"object","required":["authKey","kdf","wrappedKey","newAuthKey"],"properties":{"authKey":{"type":"string"},"kdf":{"type":"object"},"wrappedKey":{"type":"string"},"newAuthKey":{"type":"string"}}},"KeyList":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}},"nextCursor":{"type":["string","null"]}}},"LastRun":{"type":"object","description":"The status and start of the newest run.","required":["status","startedAt"],"properties":{"status":{"type":"string"},"startedAt":{"type":"string","format":"date-time"}}},"Limits":{"type":"object","required":["creditsPerMonth","automationPerMinute","odyssey","remoteControl","cloudHandoff","customFingerprints"],"properties":{"creditsPerMonth":{"type":"integer","format":"int64"},"workspaces":{"type":["integer","null"],"format":"int32","description":"Workspaces in the browser. `None` is unlimited.","minimum":0},"newWorkspacesPerHour":{"type":["integer","null"],"format":"int32","description":"New workspace devices per hour the browser admits: a new workspace, or a new device for\none. `None` is unlimited. 0 sends no signed ceiling, so the browser applies its own free\nallowance.","minimum":0},"automationPerMinute":{"type":"integer","format":"int32","description":"CDP script automation per minute in the browser.","minimum":0},"odyssey":{"type":"boolean"},"remoteControl":{"type":"boolean"},"cloudHandoff":{"type":"boolean"},"customFingerprints":{"type":"boolean"}}},"Link":{"type":"object","required":["code","expiresAt"],"properties":{"code":{"type":"string","description":"Send `/start <code>` to the Telegram bot, or `link <code>` to the Cuiar app in Slack,\nwithin 10 minutes."},"url":{"type":["string","null"],"description":"For Telegram: a link that opens the bot with the code filled in."},"expiresAt":{"type":"string","format":"date-time"}}},"Me":{"type":"object","required":["user","plan","subscription","limits","credits"],"properties":{"user":{"$ref":"#/components/schemas/User"},"plan":{"$ref":"#/components/schemas/Plan"},"subscription":{"$ref":"#/components/schemas/Entitlement"},"limits":{"$ref":"#/components/schemas/Limits"},"credits":{"$ref":"#/components/schemas/Balance"}}},"Member":{"type":"object","required":["userId","email","role","joinedAt"],"properties":{"userId":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string"},"joinedAt":{"type":"string","format":"date-time"}}},"ModelInfo":{"type":"object","description":"A model, in the OpenAI list format, with its metered price.","required":["id","object","owned_by","pricePerMillionTokens","tokensPerCredit"],"properties":{"id":{"type":"string"},"object":{"type":"string","description":"Always `model`."},"owned_by":{"type":"string"},"pricePerMillionTokens":{"$ref":"#/components/schemas/TokenPrice"},"tokensPerCredit":{"$ref":"#/components/schemas/TokensPerCredit"}}},"ModelList":{"type":"object","description":"The model list in the OpenAI format, so OpenAI clients read it.","required":["object","data"],"properties":{"object":{"type":"string","description":"Always `list`."},"data":{"type":"array","items":{"$ref":"#/components/schemas/ModelInfo"}}}},"NewApproval":{"type":"object","required":["kind","summary","details"],"properties":{"kind":{"type":"string"},"summary":{"type":"string"},"details":{"type":"object"},"taskId":{"type":["string","null"],"format":"uuid"},"expiresInMinutes":{"type":["integer","null"],"format":"int64","description":"Minutes until the request expires, 1 to 1440. Default 15."}}},"NewDomain":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string"}}},"NewEmail":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}},"NewEvent":{"type":"object","required":["kind","body"],"properties":{"kind":{"type":"string"},"role":{"type":["string","null"],"description":"`agent` (the default) or `system`."},"body":{"type":"object"}}},"NewFile":{"type":"object","required":["path","bytes"],"properties":{"path":{"type":"string","description":"The path on the user's computer."},"bytes":{"type":"integer","format":"int64","description":"Up to 25 MiB."},"contentType":{"type":["string","null"],"description":"Default `application/octet-stream`."},"change":{"type":["string","null"],"description":"`created` (the default) or `changed`."}}},"NewHandoff":{"type":"object","required":["handoff"],"properties":{"handoff":{"$ref":"#/components/schemas/Handoff"},"uploadUrl":{"type":["string","null"],"description":"For the app itself: where to upload the workspace bundle (presigned PUT, 1 hour). Other\ncallers get null; the cloud sends the app `tasks/handoff` with the URL."}}},"NewImessage":{"type":"object","properties":{"name":{"type":["string","null"],"description":"The name of the Mac, for the channel list."}}},"NewKey":{"type":"object","required":["name","scopes"],"properties":{"name":{"type":"string","description":"Up to 60 characters."},"scopes":{"type":"array","items":{"type":"string"},"description":"One or more of the scopes in the docs. `api` is every scope but `mcp`."}}},"NewLink":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","description":"`telegram` or `slack`."}}},"NewMember":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"The address of a person who has a Cuiar account and no team."}}},"NewMessage":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"delivery":{"type":["string","null"],"description":"`queue` (the default): the agent reads it after the current step. `steer`: the agent\nreads it now and changes course."}}},"NewRoutine":{"type":"object","required":["name","task","schedule"],"properties":{"name":{"type":"string"},"task":{"type":"string"},"schedule":{"type":"string","description":"5-field cron. Two runs are 15 minutes apart or more."},"timeZone":{"type":["string","null"],"description":"An IANA time zone. Default `UTC`."},"workspaceId":{"type":["string","null"],"description":"The workspace to work in. Default: the app's choice."},"mode":{"type":["string","null"],"description":"`normal` (the default) or `odyssey` (Pro and Team)."},"deliverEmail":{"type":["boolean","null"],"description":"Send the result by e-mail. Default true."},"webhookUrl":{"type":["string","null"],"description":"An https URL that gets each result, signed in `x-cuiar-signature`."},"targetTaskId":{"type":["string","null"],"format":"uuid","description":"Makes a heartbeat routine: each run wakes this task with `task` as a message."}}},"NewTask":{"type":"object","required":["task"],"properties":{"task":{"type":"string","description":"What to do, in 1 to 20,000 characters."},"title":{"type":["string","null"],"description":"A short name. Default: the start of the task."},"workspaceId":{"type":["string","null"],"description":"The workspace to work in. Default: the app's choice."},"mode":{"type":["string","null"],"description":"`normal` (the default) or `odyssey` for long research (Pro and Team)."},"incognito":{"type":["boolean","null"],"description":"Default false."},"permission":{"type":["string","null"],"description":"`read_only`, `guard` (the default) or `full`."},"folders":{"type":["array","null"],"items":{"type":"string"},"description":"Absolute paths the agent may use without asking. Up to 20."},"model":{"type":["string","null"],"description":"The model for the agent, for example `cuiar/default`."},"speed":{"type":["string","null"],"description":"`normal` (the default) or `fast`."},"device":{"type":["string","null"],"description":"The device id or name, when the app is open on more than one computer."},"maxCredits":{"type":["integer","null"],"format":"int32","description":"The most credits the task may use, 1 to 1,000,000. Default: no limit but the balance."}}},"NewTeam":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"NewVault":{"type":"object","required":["kdf","wrappedKey","authKey"],"properties":{"kdf":{"type":"object"},"wrappedKey":{"type":"string"},"authKey":{"type":"string","description":"The key that proves the master password. The server stores its hash."}}},"Notice":{"type":"object","description":"A request for one e-mail when the build for a platform is out.","required":["platform","createdAt"],"properties":{"platform":{"type":"string","description":"`macos`, `windows` or `linux`."},"createdAt":{"type":"string","format":"date-time"},"sentAt":{"type":["string","null"],"format":"date-time","description":"When the e-mail went. Null while the user waits."}}},"NoticeBody":{"type":"object","required":["notice"],"properties":{"notice":{"$ref":"#/components/schemas/Notice"}}},"NoticeList":{"type":"object","required":["notices"],"properties":{"notices":{"type":"array","items":{"$ref":"#/components/schemas/Notice"}},"nextCursor":{"type":["string","null"],"description":"Always null: there are three platforms."}}},"Outbox":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/OutboxMessage"},"description":"The oldest first, up to 50."}}},"OutboxMessage":{"type":"object","required":["id","chat","text","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"chat":{"type":"string","description":"The bridge's key for the chat."},"text":{"type":"string","description":"At most 1,500 characters. A longer answer ends with the link to the task."},"createdAt":{"type":"string","format":"date-time"}}},"OutboxSent":{"type":"object","properties":{"messageIds":{"type":"array","items":{"type":"string"},"description":"The ids of the messages in Messages that carried the answer, when the bridge found them.\nA reply to one of them goes on with the task. Up to 10."}}},"Patch":{"type":"object","properties":{"name":{"type":["string","null"]},"task":{"type":["string","null"]},"schedule":{"type":["string","null"]},"timeZone":{"type":["string","null"]},"workspaceId":{"type":["string","null"]},"mode":{"type":["string","null"]},"deliverEmail":{"type":["boolean","null"]},"webhookUrl":{"type":["string","null"],"description":"An empty string removes the webhook."},"enabled":{"type":["boolean","null"],"description":"False pauses the routine; true starts it again."}}},"PendingDevice":{"type":"object","description":"A device that waits for approval and named the caller's e-mail address.","required":["userCode","clientName","createdAt","expiresAt"],"properties":{"userCode":{"type":"string"},"clientName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}},"PendingDeviceList":{"type":"object","required":["devices"],"properties":{"devices":{"type":"array","items":{"$ref":"#/components/schemas/PendingDevice"}},"nextCursor":{"type":["string","null"],"description":"Always null: codes live 10 minutes, so the list is short."}}},"Plan":{"type":"string","description":"The three plans. The order is the rank: a higher plan wins when two are live.","enum":["free","pro","team"]},"PlanInfo":{"type":"object","required":["id","monthlyPriceCents","yearlyPriceCents","limits"],"properties":{"id":{"$ref":"#/components/schemas/Plan"},"monthlyPriceCents":{"type":"integer","format":"int64"},"yearlyPriceCents":{"type":"integer","format":"int64","description":"The price of 12 months on yearly billing."},"limits":{"$ref":"#/components/schemas/Limits"}}},"Plans":{"type":"object","required":["plans","credit"],"properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/PlanInfo"}},"credit":{"$ref":"#/components/schemas/CreditInfo"}}},"Policy":{"type":"object","description":"What the browser applies for every member.","required":["odyssey","cloudHandoff","blockerDefault"],"properties":{"models":{"type":["array","null"],"items":{"type":"string"},"description":"The models members may use; null for every model."},"odyssey":{"type":"boolean"},"cloudHandoff":{"type":"boolean"},"blockerDefault":{"type":"string","description":"The blocker setting of a new workspace: off, trackers or ads."}}},"PullCursor":{"type":"object","description":"Where the next page starts.","required":["since","after"],"properties":{"since":{"type":"integer","format":"int64"},"after":{"type":"string"}}},"PullPage":{"type":"object","description":"The records changed after `since`, in revision order.","required":["revision","records","more"],"properties":{"revision":{"type":"integer","format":"int64","description":"The store revision now."},"records":{"type":"array","items":{"$ref":"#/components/schemas/Record"}},"more":{"type":"boolean"},"next":{"oneOf":[{"$ref":"#/components/schemas/PullCursor"},{"type":"null"}]}}},"Push":{"type":"object","required":["changes"],"properties":{"changes":{"type":"array","items":{"$ref":"#/components/schemas/Change"},"description":"Up to 500 changes. Each is applied or refused on its own."}}},"PushResult":{"type":"object","required":["revision","applied","conflicts"],"properties":{"revision":{"type":"integer","format":"int64","description":"The store revision after the batch."},"applied":{"type":"array","items":{"$ref":"#/components/schemas/Applied"}},"conflicts":{"type":"array","items":{"$ref":"#/components/schemas/Record"},"description":"The current record for each change made from a stale version. Merge it and write again\nwith its version."}}},"Record":{"type":"object","description":"One record as a device sees it.","required":["collection","id","version","revision","deleted"],"properties":{"collection":{"type":"string"},"id":{"type":"string"},"version":{"type":"integer","format":"int64","description":"The record's version: 1 at its first write, one more at each later write."},"revision":{"type":"integer","format":"int64","description":"The store revision of the record's last write."},"data":{"type":["string","null"],"description":"A v1 envelope; null for a deleted record."},"deleted":{"type":"boolean"}}},"Redirect":{"type":"object","description":"A page to send the user to.","required":["url"],"properties":{"url":{"type":"string"}}},"Report":{"type":"object","required":["status"],"properties":{"status":{"type":"string","description":"`done` or `failed`."},"result":{"type":["string","null"]},"error":{"type":["string","null"]}}},"ReturnUrl":{"type":"object","required":["uploadUrl","maxBytes"],"properties":{"uploadUrl":{"type":"string","description":"Where the runner uploads the workspace bundle (presigned PUT, 1 hour)."},"maxBytes":{"type":"integer","format":"int64","minimum":0}}},"Revision":{"type":"object","description":"The vault revision after a change.","required":["revision"],"properties":{"revision":{"type":"integer","format":"int64"}}},"RoleChange":{"type":"object","required":["role"],"properties":{"role":{"type":"string","description":"owner, admin or member."}}},"Rotation":{"type":"object","required":["authKey","kdf","wrappedKey","newAuthKey","items"],"properties":{"authKey":{"type":"string"},"kdf":{"type":"object"},"wrappedKey":{"type":"string"},"newAuthKey":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SealedItem"},"description":"Every live item, sealed with the new user key."}}},"Routine":{"type":"object","description":"A task on a schedule. The app runs it; the result goes by e-mail and to the webhook.","required":["id","name","task","mode","schedule","timeZone","deliverEmail","webhookSecret","enabled","createdAt","kind"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"task":{"type":"string"},"workspaceId":{"type":["string","null"],"description":"The workspace the task works in. Null: the app's choice."},"mode":{"type":"string"},"schedule":{"type":"string"},"timeZone":{"type":"string"},"deliverEmail":{"type":"boolean"},"webhookUrl":{"type":["string","null"]},"webhookSecret":{"type":"string"},"enabled":{"type":"boolean"},"nextRunAt":{"type":["string","null"],"format":"date-time"},"lastRunAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","description":"`task`: each run is a new task. `heartbeat`: each run sends `task` as a message to the task\n`targetTaskId`, so one chat goes on."},"targetTaskId":{"type":["string","null"],"format":"uuid"},"pausedReason":{"type":["string","null"],"description":"Why the routine paused itself, for example because its chat was deleted."},"lastRun":{"oneOf":[{"$ref":"#/components/schemas/LastRun","description":"In lists only."},{"type":"null"}]}}},"RoutineList":{"type":"object","required":["routines"],"properties":{"routines":{"type":"array","items":{"$ref":"#/components/schemas/Routine"}},"nextCursor":{"type":["string","null"]}}},"RpcRequest":{"type":"object","required":["method"],"properties":{"method":{"type":"string","description":"For example `tools/call`."},"params":{},"device":{"type":["string","null"],"description":"The device id or name from `GET /v1/devices`, when the app is open on more than one."}}},"Run":{"type":"object","description":"One run of a routine.","required":["id","trigger","status","startedAt"],"properties":{"id":{"type":"string","format":"uuid"},"trigger":{"type":"string","description":"`schedule` or `manual`."},"status":{"type":"string","description":"`sent`, `done`, `failed`, `missed` (the app was not open) or `skipped` (the run before was\nstill in progress)."},"taskId":{"type":["string","null"],"format":"uuid","description":"For a heartbeat routine: the task the run woke."},"result":{"type":["string","null"]},"error":{"type":["string","null"]},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"}}},"RunList":{"type":"object","required":["runs"],"properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/Run"}},"nextCursor":{"type":["string","null"]}}},"RunnerFailure":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string","description":"What went wrong, in a few words."}}},"SealedItem":{"type":"object","required":["id","data"],"properties":{"id":{"type":"string","format":"uuid"},"data":{"type":"string","description":"A v1 envelope: `v1.<nonce>.<ciphertext>`."}}},"Sent":{"type":"object","required":["sent"],"properties":{"sent":{"type":"boolean"}}},"Session":{"type":"object","description":"A signed-in session: the site, the app, the CLI or an MCP client.","required":["id","kind","name","createdAt","lastUsedAt","current"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","description":"`web`, `device` or `oauth`."},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"current":{"type":"boolean","description":"True for the session that sent the request."}}},"SessionList":{"type":"object","required":["sessions"],"properties":{"sessions":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"nextCursor":{"type":["string","null"]}}},"Settings":{"type":"object","description":"The vault's policy. An item's own `agent` setting wins over `agentPolicy`. The agent never\nuses the vault in an incognito task.","required":["agentPolicy","approvePayments","approvePosts","approveMessages"],"properties":{"agentPolicy":{"type":"string","description":"`always`, `unlocked` (while the vault is unlocked on that device) or `never`."},"approvePayments":{"type":"boolean","description":"The agent asks before it pays."},"approvePosts":{"type":"boolean","description":"The agent asks before it posts in public."},"approveMessages":{"type":"boolean","description":"The agent asks before it sends a message or an e-mail."}}},"SignedIn":{"type":"object","description":"A signed-in session. From the site, the session is a cookie and `token` is absent.","required":["user"],"properties":{"token":{"type":["string","null"]},"user":{"$ref":"#/components/schemas/UserView"}}},"SsoConfig":{"type":"object","required":["issuer","clientId","clientSecret"],"properties":{"issuer":{"type":"string","description":"For example https://accounts.google.com, https://login.microsoftonline.com/<tenant>/v2.0\nor https://<org>.okta.com."},"clientId":{"type":"string"},"clientSecret":{"type":"string"}}},"SsoView":{"type":"object","description":"The sign-in connection, without its secret.","required":["issuer","clientId"],"properties":{"issuer":{"type":"string"},"clientId":{"type":"string"}}},"Started":{"type":"object","required":["runId","status"],"properties":{"runId":{"type":"string","format":"uuid"},"status":{"type":"string","description":"`sent` when the app took the run; `missed` or `failed` when it could not."}}},"Suggestion":{"type":"object","required":["id","name","task","schedule","timeZone","seen","status","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"task":{"type":"string"},"schedule":{"type":"string","description":"5-field cron."},"timeZone":{"type":"string"},"seen":{"type":"integer","format":"int32","description":"How many times the user gave this task in the last 30 days."},"status":{"type":"string","description":"`open`, `activated` or `dismissed`."},"routineId":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"}}},"SuggestionList":{"type":"object","required":["suggestions"],"properties":{"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/Suggestion"}},"nextCursor":{"type":["string","null"],"description":"Always null: at most 10 suggestions are open."}}},"SyncCursor":{"type":"object","description":"Where the next sync page starts.","required":["since","after"],"properties":{"since":{"type":"integer","format":"int64"},"after":{"type":"string","format":"uuid"}}},"SyncPage":{"type":"object","required":["revision","more","items","kdf","wrappedKey"],"properties":{"revision":{"type":"integer","format":"int64"},"more":{"type":"boolean"},"next":{"oneOf":[{"$ref":"#/components/schemas/SyncCursor","description":"Send as `since` and `after` for the next page while `more` is true."},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemView"}},"kdf":{"type":"object"},"wrappedKey":{"type":"string"}}},"Task":{"type":"object","description":"A task.","required":["id","title","prompt","status","mode","incognito","permission","folders","speed","creditsUsed","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"prompt":{"type":"string"},"status":{"type":"string","description":"`queued` (waiting for the app), `running`, `waiting` (for the user's answer), `paused`,\n`done`, `failed` or `cancelled`."},"mode":{"type":"string","description":"`normal` or `odyssey`."},"incognito":{"type":"boolean","description":"Not kept: the task and its transcript are deleted soon after it ends, and the agent does\nnot learn from it or use the vault."},"permission":{"type":"string","description":"`read_only`, `guard` (asks before it uses files outside `folders`) or `full`."},"folders":{"type":"array","items":{"type":"string"},"description":"Folders on the user's computer that the agent may use without asking."},"model":{"type":["string","null"],"description":"The model for the agent. Null: the app's default."},"speed":{"type":"string","description":"`normal` or `fast`."},"workspaceId":{"type":["string","null"],"description":"The workspace the task works in. Null: the app's choice."},"device":{"type":["string","null"],"description":"The device the task was sent to, by id or name. Null: the device that connected last."},"result":{"type":["string","null"]},"creditsUsed":{"type":"integer","format":"int64","description":"The credits the task used so far: its model requests sent with `x-cuiar-task`, and its\ncloud minutes."},"maxCredits":{"type":["integer","null"],"format":"int32","description":"The most credits the task may use. Null: no limit but the balance."},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"}}},"TaskEvent":{"type":"object","description":"One entry of a task's transcript.","required":["id","kind","role","body","createdAt"],"properties":{"id":{"type":"integer","format":"int64"},"kind":{"type":"string","description":"`message`, `status`, `step`, `tool`, `file`, `input` (the agent asks the user), `result`,\n`error` or `log`."},"role":{"type":"string","description":"`user`, `agent` or `system`."},"body":{"type":"object"},"createdAt":{"type":"string","format":"date-time"}}},"TaskFile":{"type":"object","description":"A file a task made or changed.","required":["id","path","name","contentType","bytes","change","status","createdAt"],"properties":{"id":{"type":"string","format":"uuid"},"path":{"type":"string","description":"The path on the user's computer."},"name":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","format":"int64"},"change":{"type":"string","description":"`created` or `changed`."},"status":{"type":"string","description":"`pending` until the upload ends, then `ready`."},"createdAt":{"type":"string","format":"date-time"}}},"TaskList":{"type":"object","required":["tasks"],"properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"nextCursor":{"type":["string","null"]}}},"TeamRef":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"TeamView":{"type":"object","required":["team","me","role","policy","members","domains"],"properties":{"team":{"$ref":"#/components/schemas/TeamRef"},"me":{"type":"string","format":"uuid","description":"The caller's user id."},"role":{"type":"string"},"policy":{"$ref":"#/components/schemas/Policy"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"},"description":"The seat list; empty for a member."},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"},"description":"Empty for a member."},"sso":{"oneOf":[{"$ref":"#/components/schemas/SsoView"},{"type":"null"}]}}},"TokenPrice":{"type":"object","description":"A model price in US dollars per million tokens, as OpenRouter states it.","required":["input","cachedInput","output"],"properties":{"input":{"type":"number","format":"double"},"cachedInput":{"type":"number","format":"double"},"output":{"type":"number","format":"double"}}},"TokensPerCredit":{"type":"object","required":["input","cachedInput","output"],"properties":{"input":{"type":"integer","format":"int64","minimum":0},"cachedInput":{"type":"integer","format":"int64","minimum":0},"output":{"type":"integer","format":"int64","minimum":0}}},"Transfer":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","format":"uuid","description":"The member who becomes the owner."}}},"UnlockKey":{"type":"object","description":"A passkey that unlocks the vault: the user key sealed with a key from the passkey's PRF\noutput for `salt`.","required":["credentialId","salt","wrappedKey","name"],"properties":{"id":{"type":"string","format":"uuid"},"credentialId":{"type":"string","description":"The WebAuthn credential id, unpadded base64url."},"salt":{"type":"string","description":"The PRF input, unpadded base64url."},"wrappedKey":{"type":"string","description":"seal(HKDF(prf output, \"cuiar-vault/v1 prf\"), userKey, aad \"cuiar-vault/v1 key\")."},"name":{"type":"string","description":"What the user calls it, for example \"MacBook Touch ID\"."},"createdAt":{"type":"string","format":"date-time"}}},"UnlockKeyList":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/UnlockKey"}},"nextCursor":{"type":["string","null"],"description":"Always null: an account has at most 10."}}},"Upload":{"type":"object","required":["file","uploadUrl"],"properties":{"file":{"$ref":"#/components/schemas/TaskFile"},"uploadUrl":{"type":"string","description":"PUT the bytes here within 15 minutes, with the same `Content-Type`."}}},"Upsert":{"type":"object","required":["data","baseRevision"],"properties":{"data":{"type":"string","description":"A v1 envelope."},"baseRevision":{"type":"integer","format":"int64","description":"0 for a new item; else the revision the client last saw."}}},"User":{"type":"object","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"gpcOptOutAt":{"type":["string","null"],"format":"date-time","description":"When a request of the account first carried Global Privacy Control (`Sec-GPC: 1`). It\nopts the account out of any sale or sharing; Cuiar sells and shares nothing."}}},"UserView":{"type":"object","required":["id","email"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"}}},"VaultInfo":{"type":"object","description":"The key material a client needs to unlock the vault. All of it is useless without the master\npassword.","required":["kdf","wrappedKey","revision","createdAt"],"properties":{"kdf":{"type":"object","description":"The Argon2id parameters and salt."},"wrappedKey":{"type":"string","description":"The user key, sealed with the master key."},"revision":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}}},"VerifyNewEmail":{"type":"object","required":["email","code"],"properties":{"email":{"type":"string"},"code":{"type":"string"}}}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key (`cuiar_…`) with the scopes the operation names, or a session token (`cs_…`) from `cuiar login`."},"cookie":{"type":"apiKey","in":"cookie","name":"cuiar_session"},"runner":{"type":"http","scheme":"bearer","description":"The runner token of Cuiar's cloud runners."},"session":{"type":"http","scheme":"bearer","description":"A signed-in session: a session token (`cs_…`) or the site cookie. API keys are refused."}}},"tags":[{"name":"account","description":"The plan, the credits, the devices, and the privacy rights: a copy of the data, deletion and a new sign-in address."},{"name":"auth","description":"Sign-in and sessions."},{"name":"keys","description":"API keys. A signed-in session only."},{"name":"billing","description":"Checkout and the billing portal. A signed-in session only."},{"name":"tasks","description":"Work the Cuiar agent does in the app, with its transcript."},{"name":"app","description":"Control the Cuiar app on the user's computer, and what the app reports."},{"name":"routines","description":"Tasks on a schedule."},{"name":"models","description":"The model gateway. It takes credits."},{"name":"vault","description":"The end-to-end encrypted vault. The server stores ciphertext only."},{"name":"teams","description":"Teams: members, roles, verified domains, the sign-in provider and the policy the browser applies."},{"name":"sync","description":"End-to-end encrypted sync of browser data. The server stores ciphertext only."},{"name":"releases","description":"E-mail when a browser build is out."},{"name":"channels","description":"E-mail, Telegram and Slack start and continue tasks."},{"name":"runners","description":"Cuiar's cloud browsers take hand-offs. Cuiar's own servers only."}]}