{"openapi":"3.1.0","info":{"title":"Zegazone API","version":"2.0.0-alpha.1","description":"The Zegazone v2 API.\n\nEvery state-changing request (POST, PUT, PATCH, DELETE) carries the `X-Zegazone-Client` header, a short client name; without it the answer is 403 `missing_client_header`.\n\nEvery error is `{error, detail?, field?}` with a code from the error model (`x-error-model`: code to HTTP status).\n\nLists take `limit` (clamped to 1–500, default 100) and `offset`, and answer `pagination.total` exactly."},"components":{"securitySchemes":{"agentToken":{"type":"http","scheme":"bearer","description":"A personal agent token (`zz_…`), minted with `POST /tokens` while signed in. Agent routes take only this; session routes refuse it."}},"schemas":{"ErrorCode":{"type":"string","enum":["invalid_json","invalid_request","unknown_op","invalid_skill","not_a_text_note","collection_not_empty","integrity_mismatch","secret_material_detected","webhook_url_not_https","webhook_url_has_credentials","webhook_url_zegazone_host","webhook_url_blocked_host","unauthorized","wrong_token_type","session_required","session_ended","insufficient_scope","forbidden","insufficient_permission","permission_denied","media_locked","account_suspended","email_verification_required","alias_limit_reached","waitlist_only","service_paused","publish_limit_reached","missing_client_header","not_found","method_not_allowed","duplicate_collection_name","duplicate_library_name","library_follows_collection","library_not_empty","cycle_detected","nesting_too_deep","publish_handle_locked","alias_frozen","alias_has_subscribers","slug_taken","publish_held","handle_taken","name_reserved","name_screen_rejected","skill_changed","note_changed","ambiguous_reference","word_name_taken","idempotency_conflict","idempotency_done_unreplayable","idempotency_in_flight","webhook_secret_unreadable","export_in_progress","not_capturable","restore_window_expired","upload_expired","download_expired","moved","payload_too_large","file_too_large","storage_quota_exceeded","rate_limited","quota_exceeded","mcp_quota_exceeded","decision_budget_exceeded","suggestion_allowance_exceeded","server_error","server_busy","invalid_token","token_expired","token_revoked","live_updates_unavailable","payouts_unavailable","payouts_refused","charging_not_allowed","payouts_not_set_up","push_unavailable","photo_search_unavailable","billing_unavailable","no_billing_account","selling_unavailable","seller_not_ready","adult_mark_held_above","not_for_sale","already_entitled","paid_subscribers","not_refundable","has_buyers","has_subscribers","upload_not_found","url_token_invalid","url_token_expired","variant_not_ready","range_not_satisfiable","render_failed","third_party_url_unavailable","reset_link_expired","reauthentication_required","invalid_client","invalid_grant","unauthorized_client","unsupported_grant_type","invalid_scope","invalid_target","invalid_redirect_uri","invalid_client_metadata","unsupported_response_type","access_denied"],"description":"Every error code the API may answer (B-API-191)."},"RealtimeToken":{"type":"object","properties":{"token":{"type":"string","description":"The identity provider's access token for this person (a JWT, ten minutes). Use it only to join Realtime channels: pass it as the join's `access_token` and with `setAuth` before it expires."},"expires_at":{"type":"string","format":"date-time"},"url":{"type":"string","description":"The Realtime WebSocket endpoint (`wss://…/realtime/v1/websocket`).","example":"wss://eczgsjqpwetkjwrfaryh.supabase.co/realtime/v1/websocket"},"apikey":{"type":"string","description":"The project's publishable key, which the socket URL carries (public by design)."},"user_channel":{"type":"string","description":"This person's own channel, `user:{public_id}`. Collections are `collection:{public_id}`; every channel is private.","example":"user:b4kq7xz2m9np"}},"required":["token","expires_at","url","apikey","user_channel"]},"SignedUp":{"type":"object","properties":{"signed_in":{"type":"boolean","description":"True when the session cookie was set. False when the account was created but the sign-in that follows failed: sign in with the same email and password (B-AUTH-007)."},"account":{"$ref":"#/components/schemas/Me"},"session":{"$ref":"#/components/schemas/Session"},"detail":{"type":"string","description":"What to do, when not signed in."},"first_run_collection":{"type":["string","null"],"description":"The public id of the Getting Started copy the new account was given (B-AUTH-149, R135), or null when the environment names no template or it could not be copied. The app opens it unless the sign-up carried a `next`."}},"required":["signed_in"]},"Me":{"type":"object","properties":{"id":{"type":"string","description":"The account's public id."},"username":{"type":"string"},"plan":{"type":"string"},"avatar":{"$ref":"#/components/schemas/OwnAvatar"}},"required":["id","username","plan"],"description":"The new account, when it could be read."},"OwnAvatar":{"type":["object","null"],"properties":{"focal":{"$ref":"#/components/schemas/Focal"},"urls":{"$ref":"#/components/schemas/ImageUrls"},"upload_id":{"type":["string","null"],"description":"The upload this avatar was made from (null for one made otherwise). After finishing an upload that answered `rendering`: this upload with renditions is done, this upload with none is still rendering, and any other avatar (or none) means the render failed and the avatar you had is back (ZEG-1354: a render still pending after about a minute is failed)."}},"required":["focal","urls","upload_id"],"description":"Your own avatar (B-AUTH-158)."},"Focal":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"],"additionalProperties":false,"description":"A focal point: the point a square crop keeps, each from 0 to 1, 0,0 the top left (B-MEDIA-151, B-UPLOAD-150). Kept to the thousandth.","example":{"x":0.5,"y":0.35}},"ImageUrls":{"type":"object","properties":{"variants":{"type":"object","additionalProperties":{"type":"string"},"description":"Each rendition by name: `tile_96`–`tile_256` for tiles, `cover_320`–`cover_1280` for cards and covers (B-UPLOAD-140); WebP or JPEG by the request's Accept header."},"expires_at":{"type":["string","null"],"format":"date-time","description":"When private URLs stop being served; null for public URLs."}},"required":["variants","expires_at"],"description":"Public, tokenless renditions at `/pub/u/{user}/{epoch}/{variant}` (R6, B-UPLOAD-171); a change moves them to the next epoch and the previous addresses stop answering."},"Session":{"type":"object","properties":{"id":{"type":"string","description":"The session's public id."},"device":{"type":["string","null"],"description":"Browser and system, e.g. Chrome on Windows."},"ip":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"last_seen_at":{"type":"string","format":"date-time","description":"Moved at most once a minute."},"current":{"type":"boolean","description":"True for the session making this request."}},"required":["id","device","ip","created_at","last_seen_at","current"],"description":"Present when `signed_in`."},"SignUp":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"password":{"type":"string","minLength":8,"maxLength":72},"invite_code":{"type":"string","maxLength":64,"description":"An invite code the operator gave out (case, spaces and dashes ignored)."},"waitlist_token":{"type":"string","maxLength":64,"description":"The token of a “you're in” link from the waitlist."},"plan":{"type":"string","enum":["personal","pro"],"description":"A paid plan the person means to buy. While free places are paused the account is made and kept to buying it (`admission_hold`)."},"turnstile_token":{"type":"string","maxLength":2048,"description":"The Cloudflare Turnstile widget's answer (the bot check)."}},"required":["email","password"]},"SignedIn":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Me"},"session":{"$ref":"#/components/schemas/Session"}},"required":["account","session"]},"SignIn":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"password":{"type":"string","minLength":1,"maxLength":72}},"required":["email","password"]},"VerificationStatus":{"type":"object","properties":{"state":{"type":"string","enum":["none","grace","final_stretch","gated","lapsed","verified","grandfathered"],"description":"From the account's own marker, never the identity provider's (B-AUTH-137): none (never in the loop, as Google accounts), grace, final_stretch (under 24 h left), gated (past the deadline: adding paused), lapsed, verified or grandfathered. Until verified, publishing and sharing are paused from the start (B-AUTH-184)."},"deadline":{"type":["string","null"],"format":"date-time","description":"The end of the 48-hour window, set once (B-AUTH-060)."},"address":{"type":["string","null"],"description":"The address the loop mails, while the account is in it."},"resend_available_at":{"type":["string","null"],"format":"date-time","description":"When Resend may send again (one per account per 60 s); null outside the loop."}},"required":["state","deadline","address","resend_available_at"]},"VerificationResendAnswer":{"allOf":[{"$ref":"#/components/schemas/VerificationStatus"},{"type":"object","properties":{"sent":{"type":"boolean","description":"True when a new link is on its way; false when the account is not in the loop, so there is nothing to send."}},"required":["sent"]}]},"VerifyEmailAnswer":{"type":"object","properties":{"outcome":{"type":"string","enum":["confirmed","already_confirmed","expired"],"description":"`confirmed`: done now, and the gate lifts on the next request. `already_confirmed`: nothing changed. `expired`: the link is older than 24 hours; ask for a new one (`POST /auth/verify/resend` with this token)."},"address":{"type":"string","description":"The address the link confirms."}},"required":["outcome","address"]},"VerifyEmail":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":1024,"description":"The `token` of the confirmation link (`/verify-email?token=`)."}},"required":["token"],"additionalProperties":false},"VerifyEmailResendAnswer":{"type":"object","properties":{"detail":{"type":"string","example":"If that address has an account waiting to be confirmed, we sent it a new link. Links work for 24 hours."}},"required":["detail"]},"VerifyEmailResend":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","description":"The address to send a new link to, if it has an account in the loop."},"token":{"type":"string","minLength":1,"maxLength":1024,"description":"Instead of an address: the token of an expired link, which names its account."}},"additionalProperties":false},"ServiceStatus":{"type":"object","properties":{"registration":{"type":"object","properties":{"position":{"type":"string","enum":["open","free_paused","all_paused"]},"line":{"type":["string","null"],"description":"The public line for the position; null when open."}},"required":["position","line"]},"service":{"type":"object","properties":{"position":{"type":"string","enum":["running","read_only","closed"]},"notice":{"type":["string","null"],"description":"The operator's notice; null when running."}},"required":["position","notice"]},"bot_check":{"type":"object","properties":{"site_key":{"type":["string","null"],"description":"Cloudflare Turnstile's public site key."},"signup":{"type":"boolean"},"waitlist":{"type":"boolean"}},"required":["site_key","signup","waitlist"]},"you":{"type":["object","null"],"properties":{"hold":{"type":["string","null"],"enum":["awaiting_payment","collaborator",null]},"plan":{"type":["string","null"],"enum":["personal","pro",null]},"full_access":{"type":"boolean","description":"On the allow list during a pause."}},"required":["hold","plan","full_access"],"description":"With a session cookie: this account's standing; else null."}},"required":["registration","service","bot_check","you"]},"WaitlistReceived":{"type":"object","properties":{"received":{"type":"boolean","enum":[true]},"detail":{"type":"string"}},"required":["received","detail"]},"WaitlistJoin":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"plan":{"type":"string","enum":["free","personal","pro"]},"turnstile_token":{"type":"string","maxLength":2048},"website":{"type":"string","maxLength":200,"description":"Leave empty."}},"required":["email","plan"]},"WaitlistConfirmed":{"type":"object","properties":{"confirmed":{"type":"boolean"},"detail":{"type":"string"}},"required":["confirmed","detail"]},"WaitlistLeft":{"type":"object","properties":{"removed":{"type":"boolean","enum":[true]},"detail":{"type":"string"}},"required":["removed","detail"]},"WaitlistInvitation":{"type":"object","properties":{"plan":{"type":"string","enum":["free","personal","pro"]},"expires_at":{"type":"string"}},"required":["plan","expires_at"]},"WaitlistRequeued":{"type":"object","properties":{"queued":{"type":"boolean"},"detail":{"type":"string"}},"required":["queued","detail"]},"AdmissionQueued":{"type":"object","properties":{"queued":{"type":"boolean","enum":[true]},"detail":{"type":"string"}},"required":["queued","detail"]},"PasswordRecoverAnswer":{"type":"object","properties":{"detail":{"type":"string","example":"If that address has an account, we've sent a link. It works in this browser for 1 hour."}},"required":["detail"]},"PasswordRecover":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"}},"required":["email"],"additionalProperties":false},"PasswordResetState":{"type":"object","properties":{"state":{"type":"string","enum":["valid","expired","used"],"description":"`valid`: this browser asked for the link and opened it, so a password can be set. `expired`: no link was asked for or opened in this browser, or the hour is up (a link opened in another browser is this). `used`: the link was already used (B-AUTH-144, 145)."},"email":{"type":["string","null"],"description":"The address the link was sent to, when the API knows the account; null otherwise."}},"required":["state","email"]},"PasswordResetDone":{"type":"object","properties":{"state":{"type":"string","enum":["done"]},"account":{"$ref":"#/components/schemas/Me"},"session":{"$ref":"#/components/schemas/Session"}},"required":["state","account","session"]},"PasswordReset":{"type":"object","properties":{"password":{"type":"string","minLength":8,"maxLength":72,"description":"The new password: 8 to 72 characters, with an uppercase letter, a lowercase letter, a number and a special character (B-AUTH-141)."}},"required":["password"],"additionalProperties":false},"PasswordChanged":{"type":"object","properties":{"changed":{"type":"boolean","enum":[true]},"other_sessions_ended":{"type":"integer","description":"How many other sessions ended with the change; this one is kept (B-AUTH-185)."}},"required":["changed","other_sessions_ended"]},"PasswordChange":{"type":"object","properties":{"current":{"type":"string","minLength":1,"maxLength":72,"description":"The current password. Not asked for, and ignored, when the account's earlier password was retired by a Google sign-in's address proof and none of the person's own has replaced it, from a session Google signed in within 10 minutes (ZEG-1391)."},"new":{"type":"string","minLength":8,"maxLength":72,"description":"The new password: 8 to 72 characters, with an uppercase letter, a lowercase letter, a number and a special character (B-AUTH-141)."},"code":{"type":"string","pattern":"^[0-9]{6,10}$","description":"The code the identity provider emailed, when it asked for it (`reauthentication_required`)."}},"required":["new"],"additionalProperties":false},"SignInMethods":{"type":"object","properties":{"email":{"type":["string","null"],"description":"The address the account signs in with, or null when the token names none."},"google":{"type":"boolean","description":"Whether Google is connected to the account."},"password":{"type":"boolean","description":"Whether the account has a password (a Google-only account sets its first through a reset link)."}},"required":["email","google","password"]},"PasswordCodeSent":{"type":"object","properties":{"sent":{"type":"boolean","enum":[true]},"address":{"type":"string","description":"Where the code went, masked: `c…@gmail.com`."}},"required":["sent","address"]},"Profile":{"type":"object","properties":{"id":{"type":"string","description":"The account's public id."},"username":{"type":"string"},"plan":{"type":"string"},"display_name":{"type":["string","null"]},"bio":{"type":["string","null"],"description":"At most 160 characters (B-AUTH-158)."},"links":{"type":"array","items":{"type":"string"},"description":"Up to three http(s) addresses, in the order shown."},"avatar":{"$ref":"#/components/schemas/OwnAvatar"},"email":{"type":["string","null"],"description":"The address the account signed up with, or null when none is on record: the menu and the session sheet show it outside the verification loop (R184). Always present."},"storage_used_bytes":{"type":"integer","description":"The bytes counted against the plan's storage limit (originals only, B-UPLOAD-165): the plan line shows it as used of the limit (`settings.plans.list` has the limits). Always present."}},"required":["id","username","plan","display_name","bio","links"]},"ProfileUpdate":{"type":"object","properties":{"display_name":{"type":["string","null"],"description":"At most 50 characters, trimmed; empty or null clears it."},"bio":{"type":["string","null"],"description":"At most 160 characters, trimmed; empty or null clears it."},"links":{"type":"array","items":{"type":"string"},"description":"Up to 3 absolute http(s) addresses, in the order shown; replaces the list. Repeats count once."}},"additionalProperties":false},"SessionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"Pagination":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer","description":"Exact count of the whole list."}},"required":["limit","offset","total"]},"PlanList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"Plan":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"display_name":{"type":"string","example":"Free"},"price_cents":{"type":"integer","description":"US cents a month."},"currency":{"type":"string","example":"usd"},"storage_bytes":{"type":"integer"},"max_file_bytes":{"type":"integer"},"agent_ops_monthly":{"type":["integer","null"],"description":"Null means no monthly cap (R406)."},"ai_suggestions_monthly":{"type":"integer"},"max_published_collections":{"type":["integer","null"],"description":"Null means unlimited."},"channels_included":{"type":"integer"},"max_channels":{"type":"integer"},"extra_channel_price_cents":{"type":["integer","null"]},"selling_allowed":{"type":"boolean"},"platform_fee_bps":{"type":["integer","null"],"description":"Hundredths of a percent (1000 = 10 %); null when selling is off."},"max_collections":{"type":"integer"},"max_items_per_collection":{"type":"integer"}},"required":["plan","display_name","price_cents","currency","storage_bytes","max_file_bytes","agent_ops_monthly","ai_suggestions_monthly","max_published_collections","channels_included","max_channels","extra_channel_price_cents","selling_allowed","platform_fee_bps","max_collections","max_items_per_collection"]},"AccountLimits":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"display_name":{"type":"string"},"trial":{"type":["object","null"],"properties":{"plan":{"type":"string","description":"The plan whose allowance the trial lends."},"ends_at":{"type":"string","format":"date-time"}},"required":["plan","ends_at"],"description":"While the three-day trial runs (B-AUTH-192): agent operations and AI suggestions are the lent plan's; everything else stays the plan's."},"limits":{"type":"object","properties":{"storage_bytes":{"type":"integer"},"max_file_bytes":{"type":"integer"},"agent_ops_monthly":{"type":["integer","null"]},"ai_suggestions_monthly":{"type":"integer"},"max_published_collections":{"type":["integer","null"]},"channels_included":{"type":"integer"},"selling_allowed":{"type":"boolean"},"max_live_tokens":{"type":"integer"}},"required":["storage_bytes","max_file_bytes","agent_ops_monthly","ai_suggestions_monthly","max_published_collections","channels_included","selling_allowed","max_live_tokens"]},"usage":{"type":"array","items":{"type":"object","properties":{"cap":{"type":"string","enum":["storage","agent_ops","published_collections","channels"]},"used":{"type":"integer"},"limit":{"type":["integer","null"],"description":"Null: no cap."}},"required":["cap","used","limit"]}},"ai_suggestions_used":{"type":"integer","description":"This month's AI suggestions used: the very counter `tags.suggest` takes from (P3-40), against `limits.ai_suggestions_monthly`."},"warnings":{"type":"array","items":{"type":"object","properties":{"cap":{"type":"string","enum":["storage","agent_ops","published_collections","channels"]},"used":{"type":"integer"},"limit":{"type":"integer"},"level":{"anyOf":[{"type":"number","enum":[80]},{"type":"number","enum":[100]}]}},"required":["cap","used","limit","level"]},"description":"Storage and the monthly agent allowance at 80 % or 100 %."},"over":{"type":"array","items":{"type":"object","properties":{"cap":{"type":"string","enum":["storage","agent_ops","published_collections","channels"]},"used":{"type":"integer"},"limit":{"type":"integer"},"over_by":{"type":"integer"}},"required":["cap","used","limit","over_by"]},"description":"Caps the account is past (after a downgrade): everything stays, nothing new past the cap."},"resets_at":{"type":"string","format":"date-time"}},"required":["plan","display_name","trial","limits","usage","ai_suggestions_used","warnings","over","resets_at"]},"AccountBilling":{"type":"object","properties":{"enabled":{"type":"boolean","description":"False where billing is switched off here: Profile shows no Plan section, Upgrade or Manage (B-CLIENT-194)."},"off_reason":{"type":["string","null"],"enum":["no_adapter","live_key_outside_production","products_unconfigured",null]},"plan":{"type":"string","example":"free"},"display_name":{"type":"string"},"trial":{"type":["object","null"],"properties":{"plan":{"type":"string"},"ends_at":{"type":"string","format":"date-time"}},"required":["plan","ends_at"],"description":"While the three-day trial runs (B-AUTH-192)."},"subscription":{"type":["object","null"],"properties":{"plan":{"type":"string","example":"personal"},"display_name":{"type":"string"},"status":{"type":"string","enum":["active","past_due","grace"],"description":"`grace` while a failed payment waits; the plan stays until `grace_until`."},"price_cents":{"type":"integer","description":"What the person pays a month: the price they subscribed at, kept for as long as the subscription lasts (B-OPSADMIN-214)."},"currency":{"type":"string","example":"usd"},"extra_channels":{"type":"integer"},"extra_channel_price_cents":{"type":["integer","null"]},"renews_at":{"type":["string","null"],"format":"date-time"},"grace_until":{"type":["string","null"],"format":"date-time"}},"required":["plan","display_name","status","price_cents","currency","extra_channels","extra_channel_price_cents","renews_at","grace_until"]},"payment_warning":{"type":["object","null"],"properties":{"grace_until":{"type":"string","format":"date-time"},"plan":{"type":"string"},"display_name":{"type":"string"}},"required":["grace_until","plan","display_name"],"description":"A payment failed: the account moves to Free at `grace_until` unless it is paid; nothing is deleted (B-OPSADMIN-159)."},"can_upgrade":{"type":"boolean"},"can_manage":{"type":"boolean"},"offers":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string"},"display_name":{"type":"string"},"price_cents":{"type":"integer"},"currency":{"type":"string"}},"required":["plan","display_name","price_cents","currency"]}},"extra_channels":{"anyOf":[{"$ref":"#/components/schemas/ExtraChannels"},{"type":"null"}]},"card":{"anyOf":[{"type":"object","properties":{"brand":{"type":"string","description":"Stripe's brand: visa, mastercard, amex…"},"last4":{"type":"string","pattern":"^[0-9]{4}$"}},"required":["brand","last4"]},{"type":"null"}]}},"required":["enabled","off_reason","plan","display_name","trial","subscription","payment_warning","can_upgrade","can_manage","offers","extra_channels","card"]},"ExtraChannels":{"type":"object","properties":{"quantity":{"type":"integer","description":"Extra channels bought, beyond the included ones."},"price_cents":{"type":"integer","description":"One extra channel a month: the price kept on the subscription, else the plan table's now (B-OPSADMIN-214)."},"currency":{"type":"string","example":"usd"},"included":{"type":"integer","description":"The plan's included channels (5 on Pro)."},"max_channels":{"type":"integer","description":"The most an account can have (20)."},"channels":{"type":"integer","description":"Aliases held, the username's channel aside."},"in_use":{"type":"integer","description":"Aliases over the included ones: the quantity never goes below it (B-AUTH-191)."},"can_add":{"type":"boolean"},"can_remove":{"type":"boolean"},"retire_to_remove":{"type":"boolean","description":"Minus must retire an alias: every extra channel is in use."}},"required":["quantity","price_cents","currency","included","max_channels","channels","in_use","can_add","can_remove","retire_to_remove"]},"BillingRedirect":{"type":"object","properties":{"url":{"type":"string","description":"Stripe's hosted page: the browser goes there next."}},"required":["url"]},"BillingCheckout":{"type":"object","properties":{"plan":{"type":"string","maxLength":40,"example":"personal"}},"required":["plan"]},"ExtraChannelsChange":{"type":"object","properties":{"noop":{"type":"boolean"},"retired":{"anyOf":[{"$ref":"#/components/schemas/AliasDeletion"},{"type":"null"}]},"billing":{"$ref":"#/components/schemas/AccountBilling"}},"required":["noop","retired","billing"]},"AliasDeletion":{"type":"object","properties":{"dry_run":{"type":"boolean"},"deleted":{"type":"boolean"},"alias":{"$ref":"#/components/schemas/Alias"},"unpublished":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}},"required":["id","name","address"]},"description":"Every collection published under the alias, by the address that stops working. They stay in the library, owned by the username, unpublished."},"cleared":{"type":"integer","description":"Other collections that carried the handle (unpublished, or in Trash) and no longer do."},"default_moved":{"type":"boolean","description":"It was the default for publishing; the default is the username again."},"held_until":{"type":["string","null"],"description":"The end of the 90-day hold, before which nobody can claim the handle (B-AUTH-169). Null for a dry run."},"subscribers":{"type":"integer","description":"People who subscribe to its channel now (B-AUTH-170): while any do, it cannot be deleted yet. 0 where nothing is sold."}},"required":["dry_run","deleted","alias","unpublished","cleared","default_moved","held_until","subscribers"]},"Alias":{"type":"object","properties":{"id":{"type":"string","description":"The alias's public id.","example":"b4kq7xz2m9np"},"handle":{"type":"string","example":"mia.tom"},"is_primary":{"type":"boolean","description":"The username's own row: the person's first channel, never deleted (B-AUTH-078)."},"is_default":{"type":"boolean","description":"The handle a publish uses when it states none and the collection has none (B-AUTH-167). Exactly one is."},"address":{"type":"string","description":"The channel's page, `/{handle}` on the apex.","example":"/mia.tom"},"url":{"type":["string","null"],"description":"The channel's page as a URL."},"follower_count":{"type":"integer"},"published_count":{"type":"integer","description":"Collections published under it."},"workspace_id":{"type":["string","null"],"description":"A workspace's handle (B-COLL-172): that collection's public id."},"frozen":{"type":"boolean","description":"Kept but frozen over the plan's channels after Pro ended (B-AUTH-191, R84): what is published under it stays up; nothing new publishes under it (`alias_frozen`) and its channel price is paused. It thaws when you are under the cap again or back on Pro."},"frozen_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"display_name":{"type":["string","null"],"description":"What its public profile shows as its name (ZEG-1476). The username's row is the profile's display name; an alias's is its own, null where it has none (its page then shows the handle). Never another handle's."},"bio":{"type":["string","null"],"description":"Its public profile's bio, at most 160 characters: the profile's on the username's row, the alias's own otherwise (ZEG-1476)."},"avatar":{"type":["object","null"],"properties":{"focal":{"$ref":"#/components/schemas/Focal"},"urls":{"allOf":[{"$ref":"#/components/schemas/ImageUrls"},{"description":"Public, tokenless renditions at `/pub/u/{user}/{epoch}/{variant}` for a person's avatar, or `/pub/a/{alias}/{epoch}/{variant}` for an alias's own picture (R6, B-UPLOAD-171; ZEG-1476); a change moves them to the next epoch and the previous addresses stop answering."}]}},"required":["focal","urls"],"description":"Its public profile's picture: the profile's avatar on the username's row, the alias's own otherwise, at an address that names only the alias (`/pub/a/{alias}/…`). Set with `profile.set_avatar` and `alias_id`."},"profile_hidden":{"type":"boolean","description":"Its public profile `/{handle}` is hidden (ZEG-1476): the page answers exactly as a handle that does not exist, and the handle is left out of the sitemap and Discovery's Channels. What is published under it keeps its own address. Default false (shown)."}},"required":["id","handle","is_primary","is_default","address","url","follower_count","published_count","workspace_id","frozen","frozen_at","created_at"]},"ExtraChannelsAdd":{"type":"object","properties":{"quantity":{"type":"integer","minimum":0,"maximum":100,"description":"The extra channels you will have afterwards: the current number plus one. The current number again is a no-op."}},"required":["quantity"]},"ExtraChannelsRemove":{"type":"object","properties":{"quantity":{"type":"integer","minimum":0,"maximum":100,"description":"The extra channels you will have afterwards: the current number less one."},"alias_id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The alias to retire, when every extra channel is in use (`retire_to_remove`): deleted as `profile.aliases.delete` deletes it."},"confirm":{"type":"boolean","description":"Required with `alias_id`."}},"required":["quantity"]},"Collection":{"type":"object","properties":{"number":{"type":"integer","description":"The number people see for it (R103), e.g. #48213."},"id":{"type":"string","description":"The public id: what every URL and API call names it by (B-API-225).","example":"b4kq7xz2m9np"},"owner_id":{"type":"string","description":"The owner's public id."},"parent_id":{"type":["string","null"],"description":"The parent's public id, if any."},"former_parent_id":{"type":["string","null"],"description":"Set while this collection is top level because its parent is in Trash; restoring that parent puts it back (B-COLL-156)."},"name":{"type":"string"},"description":{"type":["string","null"]},"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Who may view it once published (B-COLL-021, B-COLL-031)."},"published":{"type":"boolean"},"first_published_at":{"type":["string","null"],"format":"date-time"},"epoch":{"type":"integer","description":"The access epoch: bumped by unpublish, delete and every revocation, which retires every URL minted before (B-ACCESS-179)."},"position":{"type":"integer","description":"Manual order, agent-only (B-COLL-133)."},"tags":{"type":"array","items":{"type":"string"}},"item_count":{"type":"integer","description":"Live items, sub-collection tiles included."},"sub_collection_count":{"type":"integer"},"playback_settings":{"$ref":"#/components/schemas/CollectionPlaybackSettings"},"answer_to_enter":{"$ref":"#/components/schemas/AnswerToEnter"},"adult":{"type":"boolean","description":"The adult flag (R-ZEG-1565): an adult collection is never public. Only its owner and members read it, so this is for them: Publish offers it Private and Restricted only, and Share offers no link or answer-to-enter door. Optional in the schema for older clients."},"gates":{"type":["object","null"],"properties":{"default_gate":{"type":"string","enum":["clear","blurred","members","paid"],"description":"The gate of every item with none of its own (B-PUBLISH-134): clear, blurred, members or paid."},"adult":{"type":"boolean","description":"The adult flag (R67)."},"adult_source":{"type":["string","null"],"enum":["owner","operator",null],"description":"Who turned the adult flag on; an operator's Mark adult is lifted by an operator only. Null when it is off."},"adult_hint":{"type":"boolean","description":"P3-41 (R81; B-PUBLISH-202): true when a live item carries the adult-image hint and the hint's admin switch is on, so Publish offers \"This looks like adult content · mark it?\". A suggestion only: it never sets the adult flag (B-PUBLISH-203)."}},"required":["default_gate","adult","adult_source"],"description":"The collection-wide gate and the adult flag (`items.gate` sets them), for the owner; null for anyone else. Present in every answer."},"archived_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"restorable_until":{"type":["string","null"],"format":"date-time","description":"While in Trash: the end of the 14-day restore window."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"viewer_permissions":{"$ref":"#/components/schemas/ViewerPermissions"},"cover":{"type":["object","null"],"properties":{"source":{"type":"string","enum":["none","item","upload"],"description":"`none`: no cover chosen, the collection shows its first item's thumbnail (R260): that item's own picture in `urls`, else its default thumbnail (`placeholder_kind`), and it follows position 1 on every read; `item`: chosen from one of its items, rendered from that item's source (B-UPLOAD-140); `upload`: an uploaded image (B-COLL-144)."},"item_id":{"type":["string","null"],"description":"The item it was chosen from (`item`), while that item exists."},"focal":{"$ref":"#/components/schemas/Focal"},"placeholder_kind":{"$ref":"#/components/schemas/PlaceholderKind"},"placeholder_platform":{"type":["string","null"],"enum":["instagram","facebook","x","tiktok","snapchat","reddit","threads","linkedin","pinterest","bluesky","mastodon","tumblr","twitch","telegram",null],"description":"ZEG-1555 (R632), ZEG-1559: with `source: none`, when the first item has no picture and its owner chose a platform's tile as its artwork (any item), or it is a post on a recognised social platform with no kind chosen for its tile, the platform's id; the cover is then drawn as that platform's tile (its logo on its colour). Null otherwise. Optional: an API from before it leaves it out."},"urls":{"allOf":[{"$ref":"#/components/schemas/ImageUrls"},{"type":["object","null"],"description":"The cover's renditions for the caller, public or private as the collection's bytes are; with `source: none` the first item's picture (R260), null when it has none."}]}},"required":["source","item_id","focal","placeholder_kind","urls"],"description":"Its cover (P2-05). Present in every answer."},"publication":{"$ref":"#/components/schemas/Publication"},"social":{"$ref":"#/components/schemas/CollectionSocial"},"workspace":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The workspace collection's public id."},"name":{"type":"string"},"handle":{"type":"string","description":"The workspace's handle, without the @: its page is `/{handle}`, what is published under it `/{handle}/{slug}`."},"is_workspace":{"type":"boolean","description":"This collection is the workspace itself."},"members_may_publish":{"type":"boolean","description":"The owner's switch: members may publish under the workspace's handle."},"members_may_publish_publicly":{"type":"boolean","description":"The owner's second switch: members' publications may be public; off, they are for members only (restricted)."},"may_publish":{"type":"boolean","description":"The caller may publish this collection under the workspace's handle: the owner always; a member holding can_edit on a collection inside it while members_may_publish is on."}},"required":["id","name","handle","is_workspace","members_may_publish","members_may_publish_publicly","may_publish"],"description":"The workspace this collection is or is inside, for its owner and accepted members; null for anyone else and for a collection in no workspace. Present in every answer."},"description_format":{"type":"string","enum":["plain","markdown"],"description":"How the description is written: plain or markdown (B-COLL-143). Always present."},"show_in_library":{"type":"boolean","description":"A sub-collection is listed in the library tabs only when this is on (B-COLL-148). Always present."},"owner_handle":{"type":"string","description":"The owner's username, which a Workspaces card names (B-SHARE-105). Always present."},"last_activity_at":{"type":"string","format":"date-time","description":"Latest activity, kept by the database: what Most recent sorts by (B-COLL-133). Always present."},"channel_seq":{"type":"integer","description":"The live-update channel `collection:{id}`'s current `channel_seq` (P2-10, R146): the number of the last message sent on it, 0 before the first, read with the rest of this answer. A player drops a message numbered at most this, and re-reads the collection when one skips past the next. Always present."},"channel_epoch":{"type":"integer","minimum":1,"description":"ZEG-1413: The collection's live channel epoch: the channel is `collection:{id}` at 1 and `collection:{id}:{channel_epoch}` from 2. It moves on (to the time of the move, in ms) when someone loses the right to join, and a player that joins the name it names hears every later message. Left out for a reader who is neither a person nor their agent (who joins no channel)."},"cover_urls":{"type":["object","null"],"properties":{"variants":{"type":"object","additionalProperties":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"}},"required":["variants","expires_at"],"description":"The cover's renditions: the same URLs as `cover.urls` (P2-05). Null with no cover, or when the caller may not read its bytes. Always present."},"capabilities":{"$ref":"#/components/schemas/Capabilities"},"shared":{"type":"boolean","description":"The owner's alone (ZEG-1448): true when anyone besides the owner is in it: an accepted member, an open invitation or a live invite link. With published, what Studio's Private, Shared and Public say; a Private one is one a clone may go into (apart from its parents). Absent for anyone but the owner."}},"required":["number","id","owner_id","parent_id","former_parent_id","name","description","share_level","published","first_published_at","epoch","position","tags","item_count","sub_collection_count","playback_settings","answer_to_enter","archived_at","deleted_at","restorable_until","created_at","updated_at","viewer_permissions"]},"CollectionPlaybackSettings":{"type":"object","properties":{"image":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"}},"required":["on","seconds"]},"video":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"},"to_end":{"type":"boolean"}},"required":["on","seconds","to_end"]},"audio":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"},"to_end":{"type":"boolean"}},"required":["on","seconds","to_end"]},"embed":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"}},"required":["on","seconds"]},"other":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"}},"required":["on","seconds"]},"loop":{"type":"boolean"},"shuffle":{"type":"boolean"},"start_fullscreen":{"type":"boolean"},"fullscreen_exit":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["close"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["button"]},"label":{"type":"string"}},"required":["kind","label"]},{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"]}]},"after_start":{"type":"string","enum":["nothing","first_media_item","collection"]},"pin_first_item":{"type":"boolean"}},"description":"How the collection plays (B-COLL-151, 170; D-059, B-API-238), every field present in every answer: image, video, audio, embed and other each {on, seconds} (video and audio also to_end), loop, shuffle, start_fullscreen, fullscreen_exit, after_start and pin_first_item. Missing or malformed stored values read as their defaults."},"AnswerToEnter":{"type":["object","null"],"properties":{"enabled":{"type":"boolean"},"question":{"type":"string"},"grant":{"type":"string","enum":["view","view_and_add"],"description":"What a correct answer grants: `view` (the default), or `view_and_add` (view and add items; what they add is theirs and charged to the owner)."},"asks_identity":{"type":"boolean"},"answer_count":{"type":"integer","description":"How many accepted answers are set. The answers themselves never leave the server."}},"required":["enabled","question","grant","asks_identity","answer_count"],"description":"P3-31: answer to enter as the owner set it (the question, what a correct answer grants, how many answers are set; never an answer); null for anyone but the owner. The gate carries the question for everyone else."},"ViewerPermissions":{"type":"object","properties":{"is_owner":{"type":"boolean"},"can_upload":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"}},"required":["is_owner","can_upload","can_edit","can_delete"],"description":"What the caller may do in this collection, from effective membership; the owner gets all true (B-API-157)."},"PlaceholderKind":{"type":["string","null"],"enum":["image","video","audio","song","youtube","spotify-song","spotify-playlist","web","page","link","pdf","word","excel","powerpoint","document","ebook","code","markdown","data","3d","zip","archive","download","unknown","log","lyrics","memory","notes","poem","prompt","specification","summary","tutorial","skill",null],"description":"With `source: none`, the first item's default-thumbnail kind (B-MEDIA-155), drawn when that item has no picture; null for an empty collection (the collection glyph), for a first item that is a sub-collection with no picture, and for the other sources."},"Publication":{"type":"object","properties":{"published":{"type":"boolean"},"handle":{"type":["string","null"],"description":"The handle it is published under: the owner's username or one of their aliases (B-PUBLISH-016). Kept while unpublished, for the next publish; null before the first."},"slug":{"type":["string","null"],"description":"The address's second segment (B-PUBLISH-020, 021)."},"address":{"type":["string","null"],"description":"`/{handle}/{slug}` while published, else null (B-PUBLISH-014).","example":"/mia.tom/field-notes"},"url":{"type":["string","null"],"description":"The address on the apex, while published.","example":"https://zegazone.app/mia.tom/field-notes"},"searchable":{"type":"boolean","description":"Listed in Discovery: only while published and Public, and never by a publish (B-PUBLISH-005, 028, 132)."},"published_at":{"type":["string","null"],"format":"date-time","description":"When the current publication began; null while unpublished."},"site_mark":{"type":"boolean","description":"True while published and the owner is on the Free plan: a site-mode page (fullscreen exit control `none`) then carries the small Zegazone mark, removed on the paid plans (P3-21, D-060). The plan decides; there is no setting. False while unpublished."},"profile":{"type":"boolean","description":"True while published and the handle's public profile `/{handle}` is shown. False when its owner hid it (ZEG-1476): that page then answers as a handle that does not exist, so a client shows the @handle without a link. The collection's own address is unaffected."}},"required":["published","handle","slug","address","url","searchable","published_at","site_mark"],"description":"How a collection is published (P3-17). Its level is the collection's `share_level`."},"CollectionSocial":{"type":"object","properties":{"like_count":{"type":"integer","description":"Its likes, all-time (B-PUBLISH-070)."},"view_count":{"type":"integer","description":"Its views, all-time: one per viewer per 24 hours, from a signed-in account or an anonymous session (B-PUBLISH-192)."},"liked":{"type":"boolean","description":"The caller has liked it. False when signed out, and always false for its owner, whose heart is an outline that never toggles (B-PUBLISH-182)."},"follower_count":{"type":"integer","description":"Followers of its channel: the one it is published under, else its owner's own (B-PUBLISH-084)."},"following":{"type":"boolean","description":"The caller follows that channel."},"channel":{"type":["string","null"],"description":"That channel's handle: whom Follow follows on this collection's page and card (B-COLL-137)."}},"required":["like_count","view_count","liked","follower_count","following","channel"],"description":"The social counts (P3-24): counts are public, `liked` and `following` are the caller's own (B-PUBLISH-086)."},"Capabilities":{"type":"array","items":{"type":"string","enum":["collection.edit","collection.archive","collection.delete","collection.play_settings","collection.move","items.add","items.edit","items.delete","items.reorder","items.move","note.edit","items.gate","collection.publish","collection.share","collection.open_in_library"]},"description":"What the caller may do with it, derived from `authorize` (R128): the Player shows a control only when its verb is here (B-CLIENT-194). `collection.publish` (P3-17, B-PUBLISH-125) is the owner's alone; `collection.share` (P3-28, B-SHARE-109) is the owner's alone; `collection.open_in_library` (P3-20, B-PUBLISH-138) is the owner's and every accepted member's. `viewer_permissions` stays for agents (B-API-157)."},"CollectionCreate":{"type":"object","properties":{"name":{"type":"string","description":"Required; trimmed.","example":"Field notes"},"description":{"type":["string","null"],"description":"At most 4000 characters; empty is null (B-COLL-014)."},"description_format":{"type":"string","enum":["plain","markdown"],"description":"Defaults to plain (B-COLL-143)."},"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Defaults to private (B-COLL-002)."},"tags":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"At most 10, stored lower-case and trimmed (B-COLL-052)."},"parent_id":{"type":["string","null"],"pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"Create it as a sub-collection of this collection of yours.","example":"b4kq7xz2m9np"},"show_in_library":{"type":"boolean","description":"Off when absent: a sub-collection is listed in the library tabs only with this on (B-COLL-141, 148). Kept as stated, but it matters only while the collection has a parent."}},"required":["name"],"additionalProperties":false},"CollectionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CollectionListItem"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"counts":{"$ref":"#/components/schemas/LibraryCounts"}},"required":["items","pagination"]},"CollectionListItem":{"allOf":[{"$ref":"#/components/schemas/Collection"},{"type":"object","properties":{"price_chip":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["price","mixed","subscribers","included","bought","retired"]},"label":{"type":"string","description":"What the chip says, for this viewer: \"$9\", \"Includes paid items · $9\", \"Subscribers\", \"Included\", \"Bought · $9\" or \"No longer sold · still yours\"."}},"required":["kind","label"],"description":"The library view (`tab`, `q`, `tags`, `sort` or `include`) and `/boot`'s library: on the person's own collection, the price chip Discovery's card shows for it (\"$9\", \"Includes paid items · $9\", \"Subscribers\"); null on someone else's and on what is not sold. Absent from the agent listing."}}}]},"LibraryCounts":{"type":"object","properties":{"hidden_subcollections":{"type":"integer","description":"Rows include=hidden_subcollections would add under this search and filter."},"archived":{"type":"integer","description":"Rows include=archived would add under this search and filter."},"trash":{"type":"integer","description":"Rows in your Trash (collections.trash.list's total)."}},"required":["hidden_subcollections","archived","trash"],"description":"The foot rows' numbers (B-COLL-127), on the first page of the library view."},"PublicGate":{"type":"object","properties":{"kind":{"type":"string","enum":["registered","restricted"],"description":"Registered: sign in to view. Restricted: its members only."},"name":{"type":"string"},"handle":{"type":"string","description":"The handle it is published under."},"slug":{"type":"string","description":"Its slug: with the handle, its address."},"request_state":{"type":"string","enum":["none","pending","off"],"description":"Restricted only: `pending` while the caller has asked for access, `off` when its owner is not taking requests (B-PUBLISH-147); always `none` on a Registered gate."},"cover":{"type":["object","null"],"properties":{"url":{"type":"string","description":"The cover's blurred rendition (`blur`), served by the bytes Worker to anyone holding this URL and to no one as anything clearer."},"expires_at":{"type":"string","description":"When the URL stops working (at most 15 minutes)."}},"required":["url","expires_at"],"description":"ZEG-1284 (R5, R68, B-ACCESS-170): the collection's cover as its blurred rendition. Absent or null when it has no chosen cover or no blurred rendition: draw the collection glyph."}},"required":["kind","name","handle","slug","request_state"]},"CollectionUpdate":{"type":"object","properties":{"name":{"type":"string","description":"Locked while published."},"description":{"type":["string","null"]},"description_format":{"type":"string","enum":["plain","markdown"],"description":"Changes how the description is written, with or without a new one (B-COLL-143)."},"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Who may view it once published (B-COLL-021, B-COLL-031)."},"tags":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"Replaces every tag."},"show_in_library":{"type":"boolean","description":"Show in my library (B-COLL-141, 148): a sub-collection is listed in the library tabs only with this on. Owner only."},"answer_to_enter":{"type":"object","properties":{"enabled":{"type":"boolean","description":"The door on or off. On needs a Members (restricted) collection and at least one accepted answer. Off stops new entries and ends device passes; members stay."},"question":{"type":"string","maxLength":200,"description":"The question on the gate card, 1 to 200 characters; \"Password\" until set. It is public."},"answers":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":20,"description":"Replaces every accepted answer (1 to 20, compared ignoring case and spaces, stored hashed and never read back). A changed set puts everyone who entered by answering back outside and bumps the epoch."},"grant":{"type":"string","enum":["view","view_and_add"],"description":"What a correct answer grants: `view` (the default), or `view_and_add` (view and add items; what they add is theirs and charged to the owner)."},"asks_identity":{"type":"boolean","description":"The card asks for a name and an email, which makes a lightweight account and the membership in one step. Off for `view`, on for `view_and_add` unless stated."}},"additionalProperties":false,"description":"Answer to enter (R152: owner only): the question, the accepted answers (write-only), what a correct answer grants and whether the card asks for a name and email. This shares your collection with people who know the answer. It does not secure it."},"members_may_publish":{"type":"boolean","description":"A workspace's switch (B-COLL-172), off by default: members holding can_edit may publish what is inside it under its handle. Only on a collection that carries a handle (profile.aliases.create with collection_id); turning it off also turns members_may_publish_publicly off, and unpublishes nothing. Owner only."},"members_may_publish_publicly":{"type":"boolean","description":"A workspace's second switch, off by default: members' publications may be public. Off, a member publishes for the workspace's members only (restricted). Needs members_may_publish. Owner only."},"playback_settings":{"type":"object","properties":{"image":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."}},"additionalProperties":false},"video":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."},"to_end":{"type":"boolean","description":"Play to the media's end; seconds stays the fallback."}},"additionalProperties":false},"audio":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."},"to_end":{"type":"boolean","description":"Play to the media's end; seconds stays the fallback."}},"additionalProperties":false},"embed":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."}},"additionalProperties":false,"description":"YouTube and Vimeo embeds."},"other":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."}},"additionalProperties":false,"description":"Everything else: notes, PDFs, pages, links."},"loop":{"type":"boolean","description":"Start again after the last item (off by default, R75)."},"shuffle":{"type":"boolean","description":"Visit the items in a shuffled order."},"start_fullscreen":{"type":"boolean","description":"Play enters fullscreen."},"fullscreen_exit":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["close"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["button"]},"label":{"type":"string","maxLength":30,"description":"The button's text, 1 to 30 characters, trimmed; \"Start Here\" when omitted."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false}],"description":"The fullscreen exit control (D-059): the × that leaves fullscreen (close, the default); a button that does the same, labelled with at most 30 characters (\"Start Here\" by default); or none (no exit control; Escape and Back still leave)."},"after_start":{"type":"string","enum":["nothing","first_media_item","collection"],"description":"What the labelled button does after it leaves fullscreen (D-059): nothing (the default); first_media_item plays the next item if it is video or audio; collection starts Play at the next item."},"pin_first_item":{"type":"boolean","description":"Keep the item at position 1 at the start of the carousel (D-059)."}},"additionalProperties":false,"description":"How it plays (B-COLL-151, 170; D-059, B-API-238); name only what changes. image, video, audio, embed and other are each {on, seconds 1–20}, video and audio also to_end; loop, shuffle, start_fullscreen and pin_first_item are switches; fullscreen_exit is {kind: \"close\"}, {kind: \"button\", label} (at most 30 characters, \"Start Here\" when omitted) or {kind: \"none\"}; after_start is nothing, first_media_item or collection. Owner only."}},"additionalProperties":false},"CollectionMove":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when nothing needed changing."},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["noop","collection"]},"CollectionMoveRequest":{"type":"object","properties":{"parent_id":{"type":["string","null"],"pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The new parent (one of yours, not archived), or null for top level.","example":"b4kq7xz2m9np"},"show_in_library":{"type":"boolean","description":"Written with the move, or on its own when the parent stays (B-COLL-141, 148); absent keeps it as it is."}},"required":["parent_id"],"additionalProperties":false},"CollectionArchive":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when nothing needed changing."},"cascaded":{"type":"array","items":{"type":"string"},"description":"The sub-collections archived (or unarchived) with it."},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["noop","cascaded","collection"]},"CollectionDeletion":{"type":"object","properties":{"dry_run":{"type":"boolean"},"deleted":{"type":"boolean"},"media_count":{"type":"integer","description":"Live items in it."},"sub_collection_count":{"type":"integer"},"cascade_media":{"type":"boolean"},"would_refuse":{"type":["string","null"],"enum":["collection_not_empty",null],"description":"Dry run: the refusal a real delete would meet."},"media_deleted":{"type":"integer"},"detached_children":{"type":"array","items":{"type":"string"},"description":"Sub-collections now top level, re-attached if this collection is restored."},"renamed_children":{"type":"array","items":{"$ref":"#/components/schemas/RenamedChild"},"description":"Those of them renamed on the way, because one of your top-level collections already had the name: each comes to the top level as \"Name (2)\" (the next free number). Empty on a dry run."},"restorable_until":{"type":["string","null"],"format":"date-time"},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["dry_run","deleted","media_count","sub_collection_count","cascade_media","would_refuse","media_deleted","detached_children","renamed_children","restorable_until","collection"]},"RenamedChild":{"type":"object","properties":{"id":{"type":"string","description":"The sub-collection's id."},"from":{"type":"string","description":"Its name before."},"to":{"type":"string","description":"Its name now.","example":"Brief (2)"}},"required":["id","from","to"]},"CollectionDeleteRequest":{"type":"object","properties":{"confirm":{"type":"boolean","description":"Required unless dry_run."},"dry_run":{"type":"boolean","description":"Report what would happen; change nothing."},"cascade_media":{"type":"boolean","description":"Send the collection's items to Trash with it."}},"additionalProperties":false},"CollectionRestore":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when nothing needed changing."},"media_restored":{"type":"integer"},"reattached_children":{"type":"array","items":{"type":"string"}},"renamed_children":{"type":"array","items":{"$ref":"#/components/schemas/RenamedChild"},"description":"Re-attached sub-collections renamed on the way back, because a sub-collection added here since has the name: each comes back as \"Name (2)\" (the next free number)."},"unpublished":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["alias_frozen","publish_held"]},"detail":{"type":"string"}},"required":["reason","detail"],"description":"Set when a collection published at its delete came back unpublished because a publish check failed: its handle is frozen (`alias_frozen`) or a possible secret holds it (`publish_held`). `detail` says what to do; publish it again once that is settled."},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["noop","media_restored","reattached_children","renamed_children","unpublished","collection"]},"CollectionPublication":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when nothing needed changing."},"dry_run":{"type":"boolean","description":"True when nothing was written (`dry_run`)."},"share_level_defaulted":{"type":"boolean","description":"True when the collection's level had never been stated and this publish set it to public (B-PUBLISH-003)."},"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Who can see it after the call; on a dry run, the level a publish would set (public when never stated, a workspace's members gate under its handle) (ZEG-1442)."},"address":{"type":"string","description":"`/{handle}/{slug}` after the call (a dry run: as it would be).","example":"/mia.tom/field-notes"},"url":{"type":["string","null"],"description":"The address on the apex."},"address_changes":{"type":"boolean","description":"It was published before and the new address differs from the old one: every earlier link stops working (B-PUBLISH-019)."},"previous_address":{"type":["string","null"],"description":"The address it was last published at; null if it never was."},"would_refuse":{"type":["string","null"],"enum":["publish_limit_reached","publish_held",null],"description":"Dry run: the refusal a real publish would meet: the plan's cap, or an open secret-check finding on a priced collection (`publish_held`, P3-38). A dry run never scans."},"cap":{"type":["object","null"],"properties":{"current":{"type":"integer"},"max":{"type":["integer","null"],"description":"Null is unlimited."},"plan":{"type":"string"}},"required":["current","max","plan"],"description":"The owner's published count against the plan's cap (B-PUBLISH-129); null when the publish was not a new publication."},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["noop","dry_run","share_level_defaulted","share_level","address","url","address_changes","previous_address","would_refuse","cap","collection"]},"CollectionPublishRequest":{"type":"object","properties":{"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Written when stated; otherwise the stored level stays (B-PUBLISH-002)."}},"additionalProperties":false},"CollectionUnpublication":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when nothing needed changing."},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["noop","collection"]},"CollectionEntered":{"type":"object","properties":{"entered":{"type":"boolean","enum":[true]},"collection":{"type":"string","description":"The collection's id."},"via":{"type":"string","enum":["member","device_pass"],"description":"`member`: you are an accepted member now. `device_pass`: this device holds a 30-day pass and no account."},"grant":{"type":"string","enum":["view","view_and_add"]},"joined":{"type":"boolean","description":"False when you were already a member: nothing changed."},"signed_in":{"type":"boolean"},"expires_at":{"type":["string","null"],"description":"When the device pass ends; null for a member."},"account":{"allOf":[{"$ref":"#/components/schemas/Me"},{"description":"Present when this answer made your account and signed you in."}]}},"required":["entered","collection","via","grant","joined","signed_in","expires_at"]},"CollectionEnterRequest":{"type":"object","properties":{"answer":{"type":"string","maxLength":200,"description":"The answer, compared ignoring case and spaces. Never stored or logged."},"name":{"type":"string","maxLength":80,"description":"Your name, when the card asks for it (with an email, it makes an account)."},"email":{"type":"string","maxLength":254,"description":"Your email, when the card asks for it: a lightweight account and the membership in one step, signed in."},"turnstile_token":{"type":"string","maxLength":2048,"description":"The Cloudflare Turnstile widget's answer, when the card makes an account."}},"required":["answer"],"additionalProperties":false},"Item":{"type":"object","properties":{"number":{"type":"integer","description":"The number people see for it (R103), e.g. #48213."},"id":{"type":"string","description":"The public id: what every URL and API call names it by (B-API-225).","example":"q7rt2bx9kz4m"},"word_name":{"type":"string","description":"The name to show and say (R633): its chosen name when it has one, otherwise its generated name. Accepted wherever an item id is.","example":"amber falcon"},"word_name_generated":{"type":"string","description":"Its generated word name: one adjective and one or more nouns, computed from its number, the same for ever; it keeps naming the item after a name is chosen.","example":"amber falcon"},"word_name_chosen":{"type":["string","null"],"description":"The name its owner (or an editor) chose, unique in the owning account; null for none. Set or clear it with items.update word_name."},"reference":{"type":"string","description":"What an HTML item writes to address this item: `zz://item/{id}`, or `zz://item/{id}/{variant}` for a rendition by name (for example `zz://item/{id}/1280`). Written verbatim in `src`, `href`, `srcset`, `poster` or CSS `url()`; it is resolved into a private URL only when the page is served (B-API-239, B-MEDIA-193), so the same HTML previews before publication and serves after it.","example":"zz://item/q7rt2bx9kz4m"},"collection_id":{"type":"string","description":"Its collection's public id."},"kind":{"type":"string","enum":["file","note","link","subcollection","skill"],"description":"note (an inline text note), file (stored bytes), link (an external URL), subcollection (a sub-collection's tile) or skill (an agent skill, `skill` says its name, description and storage form)."},"status":{"type":"string","enum":["pending","ready"],"description":"pending only for an upload not yet finalised."},"name":{"type":"string"},"description":{"type":["string","null"]},"description_format":{"type":"string","enum":["plain","markdown"],"description":"How the description is written: plain or markdown (B-COLL-143). Always present."},"tags":{"type":"array","items":{"type":"string"}},"position":{"type":"integer","description":"Its place in the collection's one stored order, from 0 (B-COLL-130); in Trash, the place it will be restored to."},"viewer":{"$ref":"#/components/schemas/Viewer"},"viewer_choices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Viewer"},{"description":"How an item renders; the stored value alone decides it (B-MEDIA-001, B-MEDIA-002)."}]},"description":"The viewers its type allows, its own among them (B-MEDIA-004)."},"mime_type":{"type":["string","null"]},"url":{"type":["string","null"],"description":"A link's URL."},"subcollection_id":{"type":["string","null"],"description":"A tile's sub-collection (its public id)."},"added_by":{"type":["string","null"],"description":"Who added it (a public id)."},"text":{"type":"string","description":"A note's body: in single-item answers, never in lists."},"version":{"type":"string","description":"A note's text version (ZEG-1531): opaque, to be compared for equality only and sent back as `base_version` by a write that must not overwrite a newer text. It moves on with every change of the text. Present on every note, in lists too; absent on anything else.","example":"3"},"variants_ready":{"type":"boolean","description":"True once its renditions exist (B-UPLOAD-139): rendered after finalise, in the background. Until then its tile shows the kind's default thumbnail (B-UPLOAD-133)."},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ItemVariant"},"description":"A file's renditions, in single-item answers, never in lists: empty until they exist."},"thumbnail_unavailable":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["too_heavy","over_time","svg_refused","integrity_mismatch","processing_failed","unreadable"],"description":"too_heavy: the file is too large or complex to preview; over_time: it took too long to process; svg_refused: the SVG uses features that are not rendered; integrity_mismatch: the stored file is not the one uploaded (upload it again); unreadable: the file looks damaged or incomplete (upload it again); processing_failed: anything else. Someone outside the collection is always told processing_failed."}},"required":["reason"],"description":"Why the item has no thumbnail of its own: processing gave up on its file (B-UPLOAD-133), which still opens and downloads as before. Null when it has renditions, while they are being made, and for a type that never gets one. Cleared when a later render succeeds; a re-uploaded or replaced file starts without it. Present in every answer from items.get, items.list, items.batch_get and /boot's page."},"playback":{"$ref":"#/components/schemas/ItemPlayback"},"archived_at":{"type":["string","null"],"format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"restorable_until":{"type":["string","null"],"format":"date-time","description":"While in Trash: the end of the 14-day restore window."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"viewer_permissions":{"$ref":"#/components/schemas/ViewerPermissions"},"capabilities":{"type":"array","items":{"type":"string","enum":["items.edit","items.delete","items.reorder","items.move","note.edit","items.gate"]},"description":"What the caller may do with this item, derived from `authorize` (R128): items.edit, items.delete, items.reorder, items.move, items.gate (the owner's, P3-33) and note.edit on a note. Empty for an item in Trash. Always present."},"urls":{"$ref":"#/components/schemas/ItemUrls"},"gate":{"type":["object","null"],"properties":{"gate":{"type":"string","enum":["clear","blurred","members","paid"],"description":"The gate in force: `clear`, `blurred`, `members` (Members only) or `paid`. Its own, else the collection's default. `paid` is clear to the owner, members and buyers or subscribers (P3-36)."},"own":{"type":["string","null"],"enum":["clear","blurred","members","paid",null],"description":"The item's own gate; null when it follows the collection's default."},"label":{"type":["string","null"],"description":"Blurred's label (at most 20 characters), shown with the blurred rendition."},"adult":{"type":"boolean","description":"The collection is adult: every item, a clear one too, is served blurred to anyone not entitled (R67)."},"entitled":{"type":"boolean","description":"True when the caller receives the clear variants (`urls`): the owner and accepted members through every gate (R2), anyone for a clear item. False: only `blurred` is delivered."},"reveal":{"type":"string","enum":["available","sign_in","none"],"description":"`available`: `POST /items/{id}/reveal` opens the clear item for this caller; `sign_in`: an adult item, which needs an account (R72); `none`: Members only and Paid items, entitled callers, and every agent (B-ACCESS-186)."},"blurred":{"type":["object","null"],"properties":{"url":{"type":"string","description":"The `blur` rendition on the bytes host."},"expires_at":{"type":["string","null"],"format":"date-time","description":"When a private URL stops being served; null for a public one."}},"required":["url","expires_at"],"description":"What an item gated against the caller shows: its blurred rendition. Null when entitled, and when the item has none (a note or audio without artwork: draw the kind's default, B-MEDIA-155)."}},"required":["gate","own","label","adult","entitled","reveal","blurred"],"description":"The item's gate and what it means for the caller (P3-33, D-025): null for an item that follows a clear default in a collection that is not adult. Where `gate.entitled` is false, `urls` is null and no clear variant, note text or remote link picture is in the answer; `gate.blurred` is the only picture (B-ACCESS-164, B-API-216). Every answer carries it; optional only for clients built before it."},"link":{"type":["object","null"],"properties":{"fetch_status":{"type":["string","null"],"enum":["ok","unavailable",null],"description":"ok: the page's metadata below was read at add time (for a link on a social platform, ok whenever its platform facts are stored; whether its snapshot was read is social.snapshot); unavailable: the page could not be read, and the card says \"Website preview unavailable\" (B-MEDIA-034); null for a link added before metadata was kept."},"fetched_at":{"type":["string","null"],"format":"date-time"},"title":{"type":["string","null"],"description":"og:title, twitter:title or <title>."},"description":{"type":["string","null"],"description":"og:description, twitter:description or the page's description."},"site_name":{"type":["string","null"],"description":"og:site_name or application-name."},"favicon_url":{"type":["string","null"],"description":"The site's best icon as the page names it, else /favicon.ico."},"canonical_url":{"type":["string","null"]},"image_url":{"type":["string","null"],"description":"The page's metadata image (og:image, twitter:image) as named."},"ladder_status":{"type":["string","null"],"enum":["pending","done","failed",null],"description":"The image ladder (B-UPLOAD-172): pending until the processing container settles it, then done (whichever pictures it found) or failed."},"tile":{"type":"string","enum":["thumbnail","image","screenshot","placeholder"],"description":"Which picture the tile is cut from: a custom thumbnail always wins, then the metadata image whatever its size, then the screenshot; placeholder is the link placeholder carrying the favicon (B-UPLOAD-172, 173)."},"hero":{"type":["string","null"],"enum":["image","screenshot",null],"description":"The link card's hero: the metadata image when it is at least 600 px on its long edge and not blurred, else the screenshot; null shows the favicon placeholder. Never upscaled (B-UPLOAD-173)."},"favicon":{"type":"boolean","description":"True when the site's favicon is stored: urls.variants.favicon_tile_*."},"social":{"$ref":"#/components/schemas/ItemLinkSocial"}},"required":["fetch_status","fetched_at","title","description","site_name","favicon_url","canonical_url","image_url","ladder_status","tile","hero","favicon","social"],"description":"A link's page metadata, preview state and image ladder (P2-08; B-MEDIA-034, B-UPLOAD-172); null on anything else. Every answer carries it; optional only for clients built before it."},"placeholder_kind":{"allOf":[{"$ref":"#/components/schemas/PlaceholderKind"},{"description":"Its designed default thumbnail's kind: the one chosen for it, else derived from its type (B-MEDIA-155). A tile with no image shows it. Present in every answer."}]},"thumbnail":{"$ref":"#/components/schemas/ItemThumbnail"},"thumbnail_label":{"type":["string","null"],"description":"A word or two the app draws over the item's tile as a translucent black band with white text (at most 40 characters as people see them), for a picture that does not say what the item is: \"Transcripts\" on a sub-collection's tile. Drawn by the app, never part of the image. Null for none. Present in every answer.","example":"Transcripts"},"skill":{"type":["object","null"],"properties":{"name":{"type":"string","description":"The skill's name from its frontmatter: lower-case letters, digits and hyphens, at most 64 characters; for a bundle it is also the zip's folder.","example":"pdf-processing"},"description":{"type":"string","description":"What the skill does and when to use it, from its frontmatter: at most 1,024 characters. Search reads it."},"form":{"type":"string","enum":["single","bundle"],"description":"single: the SKILL.md alone, read as markdown and edited in place; bundle: a zip of the skill's folder with its scripts, references and assets. Either is a full skill."},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"}},"required":["path","size"]},"description":"Every file, its path relative to the skill's folder and its size in bytes, SKILL.md first; at most 200. A script is listed and stored, never run."}},"required":["name","description","form","files"],"description":"A skill item's name, description, storage form and file manifest (ZEG-1271); null on any other item. A single skill's SKILL.md is in `text` in single-item answers, like a note's body. Present in every answer."},"subcollection":{"type":["object","null"],"properties":{"name":{"type":"string","description":"The sub-collection's name."},"item_count":{"type":"integer","description":"Its items as the library card counts them (B-COLL-090)."},"cover":{"allOf":[{"$ref":"#/components/schemas/ImageUrls"},{"type":["object","null"],"description":"Its cover's renditions (`cover_*`, `tile_*`), issued exactly as the library list issues a collection's `cover_urls`, with the same expiry: its chosen cover, else its first item's picture (R260); null when it has neither. `variants` is empty while a new cover is being made."}]},"first_image":{"allOf":[{"$ref":"#/components/schemas/ImageUrls"},{"type":["object","null"],"description":"Its first live image file's tile renditions (`tile_*` only, same expiry as `cover`), for a tile with no cover; null when it has no image with ready renditions."}]}},"required":["name","item_count","cover","first_image"],"description":"On a `subcollection` tile: the child's name, item count, cover and first image, so a client draws the library card squared (B-MEDIA-184). Null on any other item and when the caller may not read the child; absent from answers of an API older than R254. Present in `items.list`, `items.get` and `/boot`'s page."}},"required":["number","id","word_name","word_name_generated","word_name_chosen","reference","collection_id","kind","status","name","description","tags","position","viewer","viewer_choices","mime_type","url","subcollection_id","added_by","variants_ready","archived_at","deleted_at","restorable_until","created_at","updated_at","viewer_permissions","urls"]},"Viewer":{"type":["string","null"],"enum":["video","audio","image","pdf","microsoft","web","website","markdown","text","code","html","file",null],"description":"The stored viewer (B-MEDIA-001); null only on a sub-collection tile."},"ItemVariant":{"type":"object","properties":{"name":{"type":"string","description":"tile_96, tile_128, tile_176, tile_192, tile_256 (tiles), cover_320, cover_640, cover_1280 (cards and covers), og (1200 × 630 link preview), blur (the gates), stage_1280, stage_1920 (the stage, in the original's aspect). Each consumer draws only its own (B-UPLOAD-140).","example":"cover_640"},"width":{"type":"integer"},"height":{"type":"integer"},"formats":{"type":"array","items":{"type":"string","enum":["webp","jpg"]},"description":"WebP with a JPEG fallback; the byte path serves one by `Accept`."}},"required":["name","width","height","formats"],"description":"One rendition of an image, made once at finalise from the original and never larger than it (B-UPLOAD-139, 166)."},"ItemPlayback":{"type":"object","properties":{"state":{"type":"string","enum":["pending","ready","refused","failed"],"description":"pending: a copy every browser plays is being made; ready: urls.variants.playable is that copy (an H.264 + AAC MP4), and the original stays the download; refused: no copy is made (reason says why), so the original is what plays where a browser can; failed: making it failed."},"reason":{"type":["string","null"],"enum":["too_long","too_large","unsupported","plan",null],"description":"Why no copy is made, when state is refused; else null. plan: the video needs converting (its picture re-encoded), which is a feature of paid plans (and of the 3-day trial, for a video uploaded while it ran), and the account that owns it is on Free; a video that only needs repackaging is made playable on every plan. The original still downloads."}},"required":["state","reason"],"description":"Present on a video whose original no browser plays as uploaded (an AVI, MPEG-4 Part 2, WMV, HEVC): the state of its playable copy. Absent for every other item."},"ItemUrls":{"type":["object","null"],"properties":{"original":{"type":"string","description":"The untouched original on the bytes host.","example":"https://staging.zegazone.net/pub/b4kq7xz2m9np/3/q7rt2bx9kz4m/original"},"download":{"type":"string","description":"The original as a download: the same object, served with `Content-Disposition: attachment` and the item's name (`?download=1`; Download, B-MEDIA-037). Present whenever `original` is.","example":"https://staging.zegazone.net/pub/b4kq7xz2m9np/3/q7rt2bx9kz4m/original?download=1"},"variants":{"type":"object","additionalProperties":{"type":"string"},"description":"Each rendition that exists, by name (P1-23); WebP or JPEG is chosen by the request's Accept header."},"expires_at":{"type":["string","null"],"format":"date-time","description":"When private URLs stop being served (600 to 900 s ahead); null for public URLs, which stop only when the collection's access changes (B-ACCESS-179)."}},"required":["original","variants","expires_at"],"description":"A ready file's byte URLs, for the caller: public (no token, immutable, at the collection's current epoch) when anyone may read it, otherwise private (bound to the caller's person, at most 15 minutes; a whole page in one batch). A link's are its pictures (P2-08): `original` and the tile family from its tile's image, `stage_*` from its hero, `favicon_tile_*` from its favicon. Null for notes, tiles, pending uploads, a link with no picture yet and anything the caller may not read. A Trash item has only private URLs, for its owner (B-ACCESS-188)."},"ItemLinkSocial":{"type":["object","null"],"properties":{"platform":{"type":"string","enum":["instagram","facebook","x","tiktok","snapchat","reddit","threads","linkedin","pinterest","bluesky","mastodon","tumblr","twitch","telegram"]},"platform_name":{"type":"string","description":"The platform's name, as in Open on X."},"post_id":{"type":["string","null"],"description":"The post's id on its platform; null for a page of the platform that is not a post (a profile, a short link that led nowhere)."},"url":{"type":"string","description":"What Open on <platform> opens: the post's permanent address once a snapshot is stored, else the link as given (the item's url)."},"permanent_url":{"type":["string","null"],"description":"The post's permanent address, rebuilt from the platform and the id (no tracking parameters); null for anything but a post."},"author_name":{"type":["string","null"]},"author_handle":{"type":["string","null"],"description":"As the platform writes it (\"@someone\", \"u/name\", \"@user@host\"), as its lookup read it; never one the URL alone names."},"caption":{"type":["string","null"],"description":"The caption as read at the snapshot, at most 2,200 graphemes (a cut one ends with …); the item's description is the owner's copy. Withheld (null) by a gate."},"posted_at":{"type":["string","null"],"description":"When it was posted: an ISO 8601 date or date-time."},"snapshot_at":{"type":["string","null"],"format":"date-time","description":"When the snapshot was read; null when none ever was."},"snapshot":{"type":"string","enum":["ok","unavailable","page_metadata"],"description":"ok: the snapshot above was read and stored. unavailable: nothing of it could be read (the platform allows no lookup, the lookup failed, or the link is a page of the platform that is not a post); the card says the preview could not be read. page_metadata: a link saved before posts were recognised: it keeps its page's own metadata (link.title, link.description) and has no snapshot until refreshed."},"embed":{"type":["object","null"],"properties":{"url":{"type":"string","description":"The frame's address on the platform's one embed host (today https://www.tiktok.com/player/v1/{post_id}), built by the server from the platform and the post id."},"title":{"type":"string","description":"The frame's accessible name, as in TikTok post."},"aspect_ratio":{"type":"number","description":"The frame's width over its height (0.5625 for 9:16), fixed so the page does not move when it loads."}},"required":["url","title","aspect_ratio"],"description":"The post's live embed (ZEG-1523): an iframe only, never a platform's script, loaded by a client only after the viewer presses a control (until then nothing is asked of the platform). Null when the platform has no script-free embed (every platform but TikTok today), for a page of the platform that is not a post, and for someone a gate stops."}},"required":["platform","platform_name","post_id","url","permanent_url","author_name","author_handle","caption","posted_at","snapshot_at","snapshot","embed"],"description":"A social media post (ZEG-1523): set when the URL is a post on a recognised platform, else null."},"ItemThumbnail":{"type":"object","properties":{"source":{"type":"string","enum":["auto","upload","placeholder"],"description":"`auto`: its own renditions (`urls.variants.tile_*`) once they exist, else its `placeholder_kind`; `upload`: a custom thumbnail, which wins over every automatic image (B-UPLOAD-173); `placeholder`: the chosen artwork (B-MEDIA-088): the chosen `placeholder_kind`, or the chosen platform's tile (`placeholder_platform`)."},"focal":{"allOf":[{"$ref":"#/components/schemas/Focal"},{"description":"The focal point its square renditions are cut around; null: attention-aware."}]},"urls":{"allOf":[{"$ref":"#/components/schemas/ImageUrls"},{"type":["object","null"],"description":"A custom thumbnail's renditions for the caller (`source: upload`); null otherwise."}]},"placeholder_platform":{"type":["string","null"],"enum":["instagram","facebook","x","tiktok","snapchat","reddit","threads","linkedin","pinterest","bluesky","mastodon","tumblr","twitch","telegram",null],"description":"ZEG-1559: with `source: placeholder`, the social platform whose tile (its logo on its colour) was chosen as the item's artwork (`placeholder:<platform>` on `items.set_thumbnail`), on an item of any kind; the tile draws it instead of `placeholder_kind`'s artwork. Null for a chosen kind and every other source. Present in every answer; optional only for clients built before it."}},"required":["source","focal","urls"],"description":"What its tile shows (P2-05). Present in every answer."},"ItemAdd":{"type":"object","properties":{"kind":{"type":"string","enum":["note","link","skill"],"description":"note (a text note), link (a URL) or skill (an agent skill in its single form: give its SKILL.md as `markdown`; a skill with scripts and references is a zip, added through an upload with kind skill). Files are added through an upload (P1-21); a link whose URL answers with a file becomes a file item (B-UPLOAD-030)."},"markdown":{"type":"string","description":"A skill's SKILL.md: required for a skill, refused otherwise. YAML frontmatter with a name (lower-case letters, digits and hyphens, at most 64) and a description (at most 1,024 characters), then the instructions. The item is named after the skill and described by its description unless you say otherwise. Refused with `invalid_skill` and a `reason` (frontmatter_missing, name_missing, name_invalid, description_missing, description_too_long, markdown_too_long)."},"text":{"type":"string","description":"A note's body: required for a note, not blank, at most 524,288 characters (B-MEDIA-024, 028)."},"url":{"type":"string","description":"A link's URL: required for a link, http or https, at most 2,048 characters. YouTube (youtu.be, /shorts/, /live/, nocookie) and Vimeo are stored with viewer video and never downloaded; a URL that answers with an image, video, audio, PDF or document is added as that file; any other page as a website link with its title, description and site (B-MEDIA-034).","example":"https://example.com/article"},"display_mode":{"type":"string","enum":["plain","markdown","code"],"description":"Defaults to markdown (ZEG-1418): give plain to keep every line break as typed, or code."},"viewer":{"type":"string","description":"An override among the type's choices (B-MEDIA-004): a note offers markdown, text and code whatever its mode (a viewer given with no display_mode is the mode it names, text being plain); a website link website or web; a YouTube or Vimeo link video."},"name":{"type":"string","description":"A note's defaults to its text's first usable line, Markdown markers stripped and cut to about 60 characters at a word, else \"Text note\" (B-MEDIA-029, ZEG-1418); a link's to its page's title, else the URL's last segment (B-UPLOAD-027); at most 180 characters."},"description":{"type":["string","null"],"description":"At most 4000 characters (B-MEDIA-118). Absent: a note's is \"{collection name}: Text note\" (B-MEDIA-029), a link's its page's description; null or empty: none."},"description_format":{"type":"string","enum":["plain","markdown"],"description":"Defaults to plain (B-COLL-143)."},"tags":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"At most 10 once exact repeats collapse; stored trimmed, lower-case, without a leading # (B-COLL-118, R105)."}},"required":["kind"],"additionalProperties":false},"ItemList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"next_offset":{"type":["integer","null"],"description":"Where the next page starts, or null at the end. A page holds fewer than `limit` items when the next would take the answer past 150,000 characters (B-API-186)."},"channel_seq":{"type":"integer","description":"The live-update channel `collection:{id}`'s current `channel_seq` (P2-10, R146), read before the items, so the page reflects every message up to it: a player that read the whole loaded range drops a message numbered at most this, and re-reads when one skips past the next. Always present."},"channel_epoch":{"type":"integer","minimum":1,"description":"ZEG-1413: The collection's live channel epoch: the channel is `collection:{id}` at 1 and `collection:{id}:{channel_epoch}` from 2. It moves on (to the time of the move, in ms) when someone loses the right to join, and a player that joins the name it names hears every later message. Left out for a reader who is neither a person nor their agent (who joins no channel)."}},"required":["items","pagination","next_offset"]},"ItemUpdate":{"type":"object","properties":{"name":{"type":"string","description":"Not empty; at most 180 characters."},"description":{"type":["string","null"]},"description_format":{"type":"string","enum":["plain","markdown"],"description":"Changes how the description is written, with or without a new one (B-COLL-143)."},"tags":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"Replaces every tag."},"viewer":{"type":"string","description":"An override among the item's `viewer_choices` (B-MEDIA-004); for a note, the viewer chosen alone sets its format: markdown, text (plain) or code, the text untouched (ZEG-1418)."},"text":{"type":"string","description":"A note's new body, whole (B-MEDIA-028); for a single skill, its new SKILL.md, as `markdown`. To change part of a note, prefer `edits`, `prepend` or `append`, which do not resend it."},"edits":{"type":"array","items":{"type":"object","properties":{"old_string":{"type":"string","minLength":1,"description":"The exact text to replace, spaces and line breaks included: it must be in the text once (or at least once, with replace_all)."},"new_string":{"type":"string","description":"What replaces it; empty removes it. To insert at a place, keep the anchor: old_string `## Steps`, new_string `## Steps\\n- the new step`."},"replace_all":{"type":"boolean","description":"Replace every occurrence of old_string instead of exactly one."}},"required":["old_string","new_string"],"additionalProperties":false},"minItems":1,"maxItems":100,"description":"Changes part of a note's text without resending it (ZEG-1531): each edit, in order, replaces its `old_string` with `new_string` in the text the one before it left. Each `old_string` must be in the text exactly once, unless `replace_all` changes every one. All or nothing: an edit that matches nowhere or more than once refuses the call (400 `invalid_request`, `field` `edits.<n>.old_string`, `reason` not_found or found_more_than_once, `matches`) and nothing changes. The result is held to a note's limits (not blank, at most 524,288 characters). Not with `text`."},"prepend":{"type":"string","minLength":1,"description":"Text put before the note's text (after any edits), without resending it (ZEG-1531). Not with `text`."},"append":{"type":"string","minLength":1,"description":"Text put after the note's text (after any edits), without resending it (ZEG-1531). Not with `text`."},"base_version":{"type":"string","description":"The note's `version` as you last read it (ZEG-1531). When the text has changed since, a change of it (`text`, `edits`, `prepend`, `append`) is refused with 409 `note_changed` and `current_version`, and nothing is written: read the note again and redo the change. Omitted, nothing is checked. It guards the text only: sent with a change of the name, description, tags, viewer or label alone, it is not checked.","example":"3"},"force":{"type":"boolean","description":"With `base_version`: write the text even though the note changed since that version, over the newer text (ZEG-1531)."},"markdown":{"type":"string","description":"A single skill's new SKILL.md, validated as on create: an edit that would leave it without a valid name and description is refused (`invalid_skill`) and nothing is saved. A skill that is a bundle is replaced, not edited (`bundle_not_editable`)."},"display_mode":{"type":"string","enum":["plain","markdown","code"],"description":"A note's display mode: resets its type and viewer; omitted, both stay (B-MEDIA-028). A note whose name came from its text (or is the default) is renamed from the new text when text changes and no name is given."},"thumbnail_label":{"type":["string","null"],"description":"The word or two drawn over the item's tile, on any item kind, a sub-collection's tile included: trimmed, at most 40 characters as people see them (a flag or an emoji is one) and 64 code points, no control, zero-width or direction-override characters (refused with field thumbnail_label otherwise). Null or empty clears it. The cap is 40 characters; the label sits on one line at the bottom of the tile, and about 16 characters show on the default 88 px tile (about 25 on a large one) before it ends in \"…\". Always give an item a short label of your own that fits, since a tile without one shows only its icon."},"word_name":{"type":["string","null"],"maxLength":200,"description":"A name of your own for the item, shown and accepted in place of its generated word name (which keeps naming it too). At most 60 characters: letters, digits, spaces, hyphens and apostrophes, with at least one letter; not a number, not a 12-character id and not any generated name. Unique in the account that owns the collection (compared ignoring case, accents, spaces and punctuation): a name another item there holds is word_name_taken, naming it. Null or empty clears it, back to the generated name.","example":"Charlie's voiceover"}},"additionalProperties":false},"ItemReorder":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when it was already there."},"from":{"type":"integer"},"to":{"type":"integer"},"item":{"$ref":"#/components/schemas/Item"},"moved":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"from":{"type":"integer"},"to":{"type":"integer"}},"required":["id","from","to"]},"description":"The group form only: each member's place before and after, in the collection's order."}},"required":["noop","from","to","item"]},"ItemReorderRequest":{"type":"object","properties":{"move":{"type":"string","enum":["to_start","left","right","to_end"],"description":"To the start, one left, one right or to the end (B-COLL-130)."},"position":{"type":"integer","minimum":0,"description":"An explicit place from 0; past the end is the end. Give this or move. For a group, where its first item goes."},"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"minItems":1,"maxItems":200,"description":"The group form: more items (of the same collection) that move with this one as one group, keeping their relative order in the collection whatever order they are named in (B-MEDIA-145); at most 200 in all. left and right step every member one place past its nearest neighbour outside the group. The order is written once."},"named":{"type":"boolean","description":"With ids: the group takes the order it is named in (this item first, then ids), not its order in the collection. Without move or position it starts where its first member stands now."}},"additionalProperties":false},"ItemDeletion":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]},"restorable_until":{"type":"string","format":"date-time"},"item":{"$ref":"#/components/schemas/Item"}},"required":["deleted","restorable_until","item"]},"ItemActionRequest":{"type":"object","properties":{},"additionalProperties":false},"ItemRestore":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when it was not in Trash."},"item":{"$ref":"#/components/schemas/Item"}},"required":["noop","item"]},"SnapshotRefresh":{"type":"object","properties":{"refreshed":{"type":"boolean","description":"true: the snapshot was read again and replaced; false: nothing could be read, and the old snapshot stands unchanged."},"item":{"$ref":"#/components/schemas/Item"}},"required":["refreshed","item"]},"ItemsMove":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when every item was already there: nothing changed."},"to":{"type":"string"},"moved":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"from":{"type":"string","description":"The collection it left."},"position":{"type":"integer","description":"Its place in the new collection's order."}},"required":["id","number","from","position"]},"description":"In the order they now have: at the end of the target, each source's in the order it had."},"unchanged":{"type":"array","items":{"type":"string"},"description":"Items already in the target."},"word_names_cleared":{"type":"array","items":{"type":"string"},"description":"Moved items whose chosen word name the target's owner already uses for another item: their chosen name was cleared, and each keeps its generated name. Present only when there is one; tell the person."}},"required":["noop","to","moved","unchanged"]},"ItemsMoveRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"minItems":1,"maxItems":200,"description":"The items, by id: at least one, at most 200; a repeated id counts once."},"to":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection the items go to (its id). Moving to where an item is already leaves it.","example":"b4kq7xz2m9np"}},"required":["ids","to"],"additionalProperties":false},"ItemsMoveToNewSubcollection":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"},"moved":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"from":{"type":"string","description":"The collection it left."},"position":{"type":"integer","description":"Its place in the new collection's order."}},"required":["id","number","from","position"]}}},"required":["collection","moved"]},"ItemsMoveToNewSubcollectionRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"minItems":1,"maxItems":200,"description":"The items, all in one collection, which becomes the new sub-collection's parent: at least one, at most 200."},"name":{"type":"string","description":"Defaults to \"Sub-collection of {parent}\", numbered when that name is taken; a name you already use is `duplicate_collection_name`."}},"required":["ids"],"additionalProperties":false},"ItemsBatchUpdate":{"type":"object","properties":{"updated":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"collection_id":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"description":{"type":["string","null"]},"thumbnail_label":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}},"required":["id","number","collection_id","tags","description","thumbnail_label","updated_at"]}}},"required":["updated","items"]},"ItemsBatchUpdateRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"minItems":1,"maxItems":200,"description":"The items, by id: at least one, at most 200; a repeated id counts once."},"tags_add":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"Added to every item; a tag already on only some of them stays as it is (B-MEDIA-146). At most 10; stored trimmed, lower-case, without a leading # (B-COLL-118)."},"tags_remove":{"type":"array","items":{"type":"string"},"maxItems":10,"description":"Taken off every item that has them. At most 10; stored trimmed, lower-case, without a leading # (B-COLL-118)."},"description":{"type":["string","null"],"description":"Replaces every item's description; null or empty clears it. At most 4,000 characters."},"thumbnail_label":{"type":["string","null"],"description":"Replaces every item's thumbnail label, the word or two drawn over its tile; null or empty clears it. Trimmed; at most 40 characters as people see them and 64 code points, no control, zero-width or direction-override characters. The cap is 40 characters; the label sits on one line at the bottom of the tile, and about 16 characters show on the default 88 px tile (about 25 on a large one) before it ends in \"…\". Always give an item a short label of your own that fits, since a tile without one shows only its icon."}},"required":["ids"],"additionalProperties":false},"ItemThirdPartyUrl":{"type":"object","properties":{"purpose":{"type":"string","enum":["office"]},"url":{"type":"string","description":"Opens this item's one variant and nothing else, bound to you, until expires_at: hand it to the viewer, never keep it. Its path ends with the file's name, which a viewer reads the document's type from; the name selects nothing."},"variant":{"type":"string","example":"original"},"expires_at":{"type":"string","format":"date-time","description":"At most 300 s after it was issued."}},"required":["purpose","url","variant","expires_at"]},"ItemThirdPartyUrlRequest":{"type":"object","properties":{"purpose":{"type":"string","enum":["office"],"description":"office: Microsoft's Office viewer, which reads the original."}},"required":["purpose"],"additionalProperties":false},"ItemsGate":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when every value was already as asked: nothing changed."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"collection_id":{"type":"string"},"gate":{"type":"string","enum":["clear","blurred","members","paid"],"description":"The gate in force: its own, else the default."},"own":{"type":["string","null"],"enum":["clear","blurred","members","paid",null],"description":"Its own gate; null follows the default."},"label":{"type":["string","null"]}},"required":["id","number","collection_id","gate","own","label"]},"description":"The items named, in the order named."},"collection":{"type":"object","properties":{"id":{"type":"string"},"default_gate":{"type":"string","enum":["clear","blurred","members","paid"]},"adult":{"type":"boolean"},"adult_source":{"type":["string","null"],"enum":["owner","operator",null],"description":"Who turned the adult flag on; null when it is off, or an old flag (read as an operator's)."}},"required":["id","default_gate","adult","adult_source"]},"epoch":{"type":"integer","description":"The collection's access epoch now."},"epoch_bumped":{"type":"boolean","description":"True when the change made anything more restrictive: the epoch rose, so every byte URL issued before, public and private, stops from the next request at every edge location, and the API issues the blurred rendition's URL in its place (B-ACCESS-169)."},"moved_to_members":{"type":["object","null"],"properties":{"previous_share_level":{"type":["string","null"],"enum":["public","registered",null],"description":"The level it had; null when only its answer-to-enter door closed."},"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Its level now."},"answer_door_closed":{"type":"boolean"},"answer_members_removed":{"type":"integer","description":"Members who came in by answering the posted question, removed: an adult collection is for the people its owner names. Members invited by name stay."},"link_members_removed":{"type":"integer","description":"Members who joined by an invite link, removed: a link lets in whoever holds it. Members invited by name, by email or by an accepted request stay."},"links_revoked":{"type":"integer","description":"Live invite links turned off: nobody joins an adult collection by a link."},"taken_off_sale":{"type":"boolean","description":"Its price was on sale and is stopped (the price stays). Earlier buyers keep what they bought."},"unlisted":{"type":"boolean","description":"It was listed in Discovery and is not now."},"unpublished":{"type":"boolean","description":"It was published and is not now (R-ZEG-1610): an adult collection is never published, so it has no address. Its level stays; turning adult off does not publish it again."},"message":{"type":"string","description":"One plain sentence to show the owner."}},"required":["previous_share_level","share_level","answer_door_closed","answer_members_removed","link_members_removed","links_revoked","taken_off_sale","unlisted","unpublished","message"],"description":"ZEG-1565 (R-ZEG-1565): turning the adult flag on took the collection out of public view in the same call: an adult collection is never public, so its level dropped to members only and any answer-to-enter door closed. Null when nothing had to move."}},"required":["noop","items","collection","epoch","epoch_bumped","moved_to_members"]},"ItemsGateRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"minItems":1,"maxItems":200,"description":"The items, by id, all in one collection: at most 200; a repeated id counts once."},"gate":{"type":"string","enum":["clear","blurred","members","paid","inherit"],"description":"Set on `ids`: `clear`, `blurred`, `members` (Members only) or `paid`; `inherit` takes the item's own gate away so it follows the collection's default again. Every non-clear gate serves anyone not entitled only the item's blurred rendition and its label, on every path (D-025). `paid` items are clear to the owner, members, and buyers of the collection or subscribers to its channel (P3-36, `collections.price.get`); until it is priced that is the owner and members only."},"label":{"type":["string","null"],"description":"Only with gate `blurred`: what the blurred rendition says, at most 20 characters (Sensitive, Spoiler, or your own); null or empty for none. Setting blurred again without a label clears an earlier one."},"collection_id":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection, for `default_gate` and `adult`; with `ids` it must be the collection they are in.","example":"b4kq7xz2m9np"},"default_gate":{"type":"string","enum":["clear","blurred","members","paid"],"description":"The gate of every item that has none of its own (B-PUBLISH-134). The owner's."},"adult":{"type":"boolean","description":"The collection's adult flag (R67, R-ZEG-1565, R-ZEG-1610). An adult collection is never published, so turning it on unpublishes a published collection in the same call. It is never public: it is held at members only (private or restricted), never listed, and never opens by answer to enter. Turning it on a Public or Registered collection drops it to members only (restricted) in the same call and closes any answer-to-enter door; `moved_to_members` says so. Its items and cover are served blurred to anyone not entitled. Turning it on is the owner's; turning it off is the owner's only when the owner turned it on, since an operator's Mark adult is lifted by an operator."}},"additionalProperties":false},"ItemReveal":{"type":"object","properties":{"id":{"type":"string"},"gate":{"$ref":"#/components/schemas/ItemGate"},"urls":{"allOf":[{"$ref":"#/components/schemas/ItemUrls"},{"description":"The item's clear byte URLs, private: bound to you when signed in (a `cleared` token, at most 15 minutes), bound to this item, its collection and its epoch and to no person when signed out (R4). A device pass of answer to enter (R399) gets URLs bound to the collection's owner, each naming its one variant, for at most 5 minutes. Null for a note, which has `text`."}]},"thumbnail_urls":{"allOf":[{"$ref":"#/components/schemas/ImageUrls"},{"type":["object","null"],"description":"A custom thumbnail's clear renditions, under the same token."}]},"text":{"type":"string","description":"A note's text."},"anonymous":{"type":"boolean","description":"True for a signed-out reveal: its token lives 15 minutes and opens this one item (a device pass's URLs: at most 5 minutes, R399)."},"expires_at":{"type":"string","format":"date-time"}},"required":["id","gate","urls","thumbnail_urls","anonymous","expires_at"]},"ItemGate":{"type":"object","properties":{"gate":{"type":"string","enum":["clear","blurred","members","paid"],"description":"The gate in force: `clear`, `blurred`, `members` (Members only) or `paid`. Its own, else the collection's default. `paid` is clear to the owner, members and buyers or subscribers (P3-36)."},"own":{"type":["string","null"],"enum":["clear","blurred","members","paid",null],"description":"The item's own gate; null when it follows the collection's default."},"label":{"type":["string","null"],"description":"Blurred's label (at most 20 characters), shown with the blurred rendition."},"adult":{"type":"boolean","description":"The collection is adult: every item, a clear one too, is served blurred to anyone not entitled (R67)."},"entitled":{"type":"boolean","description":"True when the caller receives the clear variants (`urls`): the owner and accepted members through every gate (R2), anyone for a clear item. False: only `blurred` is delivered."},"reveal":{"type":"string","enum":["available","sign_in","none"],"description":"`available`: `POST /items/{id}/reveal` opens the clear item for this caller; `sign_in`: an adult item, which needs an account (R72); `none`: Members only and Paid items, entitled callers, and every agent (B-ACCESS-186)."},"blurred":{"type":["object","null"],"properties":{"url":{"type":"string","description":"The `blur` rendition on the bytes host."},"expires_at":{"type":["string","null"],"format":"date-time","description":"When a private URL stops being served; null for a public one."}},"required":["url","expires_at"],"description":"What an item gated against the caller shows: its blurred rendition. Null when entitled, and when the item has none (a note or audio without artwork: draw the kind's default, B-MEDIA-155)."}},"required":["gate","own","label","adult","entitled","reveal","blurred"],"description":"The gate as the caller now stands: `entitled` is true and `blurred` null."},"Purchases":{"type":"object","properties":{"purchases":{"type":"array","items":{"$ref":"#/components/schemas/Purchase"}},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}},"tabs":{"type":"object","properties":{"purchased":{"type":"boolean"},"subscribed":{"type":"boolean"}},"required":["purchased","subscribed"],"description":"The library tabs that appear: once they hold something (B-PUBLISH-170, 171)."}},"required":["purchases","subscriptions","tabs"]},"Purchase":{"type":"object","properties":{"id":{"type":"string"},"collection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":["string","null"]},"published":{"type":"boolean"}},"required":["id","name","handle","published"]},"amount_cents":{"type":"integer"},"label":{"type":"string"},"bought_at":{"type":"string"},"status":{"type":"string","enum":["paid","refunded"]},"opened":{"type":"boolean","description":"A Paid item was served clear to you (B-PUBLISH-164): no refund any more."},"refundable":{"type":"boolean"},"refundable_until":{"type":["string","null"]},"refunded_at":{"type":["string","null"]},"on_sale":{"type":"boolean","description":"False reads \"No longer sold · still yours\"."}},"required":["id","collection","amount_cents","label","bought_at","status","opened","refundable","refundable_until","refunded_at","on_sale"]},"Subscription":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"amount_cents":{"type":"integer"},"label":{"type":"string"},"status":{"type":"string"},"live":{"type":"boolean","description":"The paid period has not ended: Paid items read clear."},"renews":{"type":"boolean","description":"False once cancelled: it ends at the period's end."},"current_period_end":{"type":["string","null"]},"refundable":{"type":"boolean","description":"The first period, unopened and within 14 days (B-PUBLISH-164)."},"refundable_until":{"type":["string","null"]},"collections":{"type":"integer"},"show_as_tab":{"type":"boolean"}},"required":["id","handle","amount_cents","label","status","live","renews","current_period_end","refundable","refundable_until","collections","show_as_tab"]},"SubscriptionTabRequest":{"type":"object","properties":{"shown":{"type":"boolean"}},"required":["shown"],"additionalProperties":false},"CollectionPrice":{"type":"object","properties":{"collection_id":{"type":"string"},"price":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]},"label":{"type":"string","description":"\"$9\", or \"$4 a month\" for a subscription."},"fee":{"$ref":"#/components/schemas/FeeReadback"}},"required":["amount_cents","currency","label","fee"],"description":"The one-off price while it sells; null when free."},"channel":{"type":["object","null"],"properties":{"handle":{"type":"string"},"subscription":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]},"label":{"type":"string","description":"\"$9\", or \"$4 a month\" for a subscription."}},"required":["amount_cents","currency","label"]}},"required":["handle","subscription"],"description":"The channel it is published under, and its subscription."},"way_to_pay":{"type":"string","enum":["buy","subscribe","none"],"description":"B-PUBLISH-156: one way to pay. `subscribe` only where there is no one-off price and the channel sells a subscription."},"items":{"type":"integer"},"paid_items":{"type":"integer"},"viewer":{"type":"object","properties":{"owner":{"type":"boolean"},"entitled":{"type":"boolean","description":"You receive the Paid items clear: the owner, a member, a buyer or a subscriber (B-ACCESS-171)."},"owned":{"type":"boolean"},"included":{"type":"boolean"}},"required":["owner","entitled","owned","included"]},"seller":{"type":["object","null"],"properties":{"ready":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string","enum":["plan","payouts","terms","selling_off"],"description":"`plan`: a paid plan is needed; `payouts`: Stripe payouts are not set up; `terms`: the creator terms are not accepted; `selling_off`: selling is not switched on here."}},"sold":{"type":"integer"},"earned_cents":{"type":"integer"},"set_price":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]},"label":{"type":"string","description":"\"$9\", or \"$4 a month\" for a subscription."}},"required":["amount_cents","currency","label"],"description":"The price as set, selling or stopped."},"on_sale_since":{"type":["string","null"]},"stopped_at":{"type":["string","null"],"description":"Stop selling stamped it (B-PUBLISH-160): buyers keep access."}},"required":["ready","missing","sold","earned_cents","set_price","on_sale_since","stopped_at"],"description":"The owner's only: what they still need to charge."}},"required":["collection_id","price","channel","way_to_pay","items","paid_items","viewer","seller"]},"FeeReadback":{"type":["object","null"],"properties":{"platform_fee_cents":{"type":"integer"},"processing_cents":{"type":"integer","description":"What is kept back from the publisher besides the platform fee, as estimated: Connect's per-payout percentage at cost (R86). Card processing is the platform's (ZEG-1388)."},"you_receive_cents":{"type":"integer"},"text":{"type":"string","description":"\"You receive about $x.xx after the 10% platform fee and Stripe's payout fee.\" The same split is the transfer the checkout sends: the fee taken is the fee shown."}},"required":["platform_fee_cents","processing_cents","you_receive_cents","text"],"description":"The owner's only: the read-back."},"PriceRequest":{"type":"object","properties":{"amount_cents":{"type":["integer","null"],"description":"US cents, one of the fixed points (B-PUBLISH-153): 200, 300, 500, 700, 900, 1200, 1500, 1900, 2500, 2900, 3900, 4900, 6900, 9900, 14900, 19900, 29900, 49900; null for Free. Any other amount is `invalid_request` on `amount_cents`."},"selling":{"type":"boolean","enum":[false],"description":"P3-37: `false` is Stop selling (B-PUBLISH-160, B-AUTH-170): the price stays, nobody can buy or start a subscription, every buyer keeps access and subscribers run to the end of the month they paid. Send it without `amount_cents`; setting a price again sells again."}},"additionalProperties":false},"ChannelPrice":{"type":"object","properties":{"id":{"type":"string"},"handle":{"type":"string"},"subscription":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string","enum":["usd"]},"label":{"type":"string","description":"\"$9\", or \"$4 a month\" for a subscription."},"fee":{"$ref":"#/components/schemas/FeeReadback"}},"required":["amount_cents","currency","label","fee"]},"subscribers":{"type":"integer"},"seller":{"type":"object","properties":{"ready":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string","enum":["plan","payouts","terms","selling_off"],"description":"`plan`: a paid plan is needed; `payouts`: Stripe payouts are not set up; `terms`: the creator terms are not accepted; `selling_off`: selling is not switched on here."}}},"required":["ready","missing"]},"stopped_at":{"type":["string","null"],"description":"Stop the subscription stamped it (B-AUTH-170): no new subscription or renewal; subscribers run to their period's end."}},"required":["id","handle","subscription","subscribers","seller","stopped_at"]},"Checkout":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["purchase","subscription"]},"status":{"type":"string","enum":["open","complete","expired"]},"url":{"type":["string","null"],"description":"Stripe's hosted checkout, in `checkout.create`'s answer only."},"expires_at":{"type":["string","null"]},"entitled":{"type":"boolean","description":"You now receive what you paid for clear, from this request on."},"collection_id":{"type":["string","null"]},"handle":{"type":["string","null"]}},"required":["id","kind","status","url","expires_at","entitled","collection_id","handle"]},"CheckoutRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["purchase","subscription"]},"collection_id":{"type":"string","description":"The collection to buy, or (for a subscription) whose channel to subscribe to."},"handle":{"type":"string","description":"A subscription to this handle directly (a publisher page's Subscribe)."},"return_to":{"type":"string","description":"Where Stripe brings you back, on Studio or the public site; `?checkout={id}` is added."}},"required":["kind","return_to"],"additionalProperties":false},"TagCountList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TagCount"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"TagCount":{"type":"object","properties":{"tag":{"type":"string"},"collection_count":{"type":"integer","description":"How many of the counted collections carry it."}},"required":["tag","collection_count"]},"TagVocabularyList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TagVocabularyRow"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"TagVocabularyRow":{"type":"object","properties":{"tag":{"type":"string","description":"The slug, as a collection stores it."},"label":{"type":"string","description":"What a picker shows for it."},"category":{"type":["string","null"],"description":"A grouping for agents; no screen shows it (B-COLL-053)."},"sort_order":{"type":"integer","description":"Ascending; ties by tag."},"collection_count":{"type":"integer","description":"How many of your live collections carry it, counted as `tags.list` counts without a tab; 0 when none."}},"required":["tag","label","category","sort_order","collection_count"]},"TrashList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TrashRow"}},"total":{"type":"integer","description":"Every row in Trash."},"truncated":{"type":"boolean","description":"True when more than 200 rows exist: \"Showing the 200 most recently deleted. Older deleted collections are not listed.\" (B-COLL-157)."}},"required":["items","total","truncated"]},"TrashRow":{"type":"object","properties":{"kind":{"type":"string","enum":["collection","item"]},"id":{"type":"string","description":"The public id of the collection or item."},"number":{"type":"integer","description":"The number people see for it (R103)."},"name":{"type":"string"},"deleted_at":{"type":"string","format":"date-time"},"restorable_until":{"type":"string","format":"date-time","description":"The end of the 14-day restore window (B-COLL-165)."},"restorable":{"type":"boolean","description":"Whether a restore is still accepted now; false shows as Unrecoverable (B-COLL-157)."},"item_count":{"type":["integer","null"],"description":"A collection row: its items, those its delete took included. Null on an item."},"item_kind":{"type":["string","null"],"enum":["file","note","link","subcollection","skill",null],"description":"An item row: its kind."},"viewer":{"type":["string","null"],"enum":["video","audio","image","pdf","microsoft","web","website","markdown","text","code","html","file",null]},"mime_type":{"type":["string","null"]},"collection":{"$ref":"#/components/schemas/TrashCollectionRef"},"urls":{"allOf":[{"$ref":"#/components/schemas/ItemUrls"},{"description":"An item row's bytes, on the private path only, issued for Trash (B-ACCESS-188, R7); never a public URL."}]},"cover_urls":{"$ref":"#/components/schemas/CoverUrls"},"placeholder_platform":{"type":["string","null"],"enum":["instagram","facebook","x","tiktok","snapchat","reddit","threads","linkedin","pinterest","bluesky","mastodon","tumblr","twitch","telegram",null],"description":"ZEG-1555 (R632), ZEG-1559: an item row whose owner chose a platform's tile as its artwork, or that is a post on a recognised social platform with no kind chosen for its tile: the platform whose tile the row draws when it has no picture. Null otherwise. Optional: an API from before it leaves it out."}},"required":["kind","id","number","name","deleted_at","restorable_until","restorable","item_count","item_kind","viewer","mime_type","collection","urls","cover_urls"]},"TrashCollectionRef":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The collection's public id."},"number":{"type":"integer"},"name":{"type":"string"}},"required":["id","number","name"],"description":"An item row: the collection it came from and returns to (B-COLL-166)."},"CoverUrls":{"type":["object","null"],"properties":{"variants":{"type":"object","additionalProperties":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"}},"required":["variants","expires_at"],"description":"A collection row's cover renditions, on the private path only (B-ACCESS-188, R7): the cards' renditions, issued for Trash. Null on an item row, with no cover, or when the caller may not read its bytes."},"TagSuggestions":{"type":"object","properties":{"collection_id":{"type":"string"},"suggestions":{"type":"array","items":{"$ref":"#/components/schemas/TagSuggestion"},"maxItems":8,"description":"At most 8, highest first; never a tag the collection has or one in exclude."},"source":{"type":"string","description":"What was read.","example":"From 12 items: names, descriptions and notes"},"reason":{"type":["string","null"],"description":"\"No strong suggestions\" when nothing scored high enough (add tags by hand); null otherwise."},"allowance":{"$ref":"#/components/schemas/SuggestionAllowance"}},"required":["collection_id","suggestions","source","reason","allowance"]},"TagSuggestion":{"type":"object","properties":{"tag":{"type":"string","description":"The tag, as a collection stores it."},"percent":{"type":"integer","minimum":0,"maximum":100,"description":"How well it describes the collection, 0 to 100.","example":94}},"required":["tag","percent"]},"SuggestionAllowance":{"type":"object","properties":{"counted":{"type":"boolean","description":"Whether this call used one of the month's suggestions: false on a published collection (never counted), and when nothing was asked of a model."},"used":{"type":"integer","description":"Suggestions used this month."},"limit":{"type":"integer","description":"The month's allowance on your plan (20 Free, 500 Personal, 2,000 Pro)."},"resets_at":{"type":"string","format":"date-time","description":"00:00 UTC on the 1st of next month."}},"required":["counted","used","limit","resets_at"]},"TagSuggestRequest":{"type":"object","properties":{"exclude":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":50,"description":"Tags not to suggest, besides the collection's own (at most 50): what was already added since the last save, and what the person removed. Suggest again sends them."}},"additionalProperties":false},"LibraryList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Library"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"Library":{"type":"object","properties":{"id":{"type":"string","description":"The library's id; its tab is `library:{id}` in collections.list and tags.list.","example":"h3m8wq2z5rtc"},"name":{"type":"string","example":"Inspiration"},"position":{"type":"integer","description":"Its place after the system tabs, from 0."},"hidden":{"type":"boolean","description":"Off the tab strip until shown again (B-COLL-126)."},"collection_count":{"type":"integer","description":"The collections its tab lists without a search: those you can still read, not archived."},"follows":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The followed collection's id."},"name":{"type":["string","null"],"description":"Its name; null while you cannot read it any more."},"readable":{"type":"boolean","description":"False once you cannot read it (unshared, or gone): the tab then lists only the sub-collections you still can."}},"required":["id","name","readable"],"description":"The collection whose direct sub-collections the tab lists, as they are when read (new ones appear, deleted ones go), or null for a tab you fill by hand (ZEG-1575)."},"default_sort":{"type":"string","enum":["recent","manual"],"description":"The tab's order when collections.list names no sort: manual (its own: the followed collection's tile order, or the order you put it in) once it follows a collection or you have placed one with libraries.add's position; else recent."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","position","hidden","collection_count","follows","default_sort","created_at","updated_at"],"description":"A library you created (B-COLL-126): a private, named tab of references to collections, or of one collection's sub-collections when it follows that collection. A reference never changes the collection."},"LibraryCreate":{"type":"object","properties":{"name":{"type":"string","maxLength":240,"description":"1 to 60 characters, trimmed; unique among your libraries, ignoring case.","example":"Inspiration"},"hidden":{"type":"boolean","description":"Make it hidden from the start."},"follows_collection_id":{"type":["string","null"],"pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"A collection you can read now, not in Trash: the tab then lists its direct sub-collections that you can read, at read time, in its tile order, and takes no collections by hand (libraries.add, remove and move_collection answer library_follows_collection). null stops following, leaving an empty tab. A tab that holds collections cannot start following (library_not_empty).","example":"b4kq7xz2m9np"}},"required":["name"],"additionalProperties":false},"LibraryUpdate":{"type":"object","properties":{"name":{"type":"string","maxLength":240,"description":"1 to 60 characters, trimmed; unique among your libraries, ignoring case.","example":"Inspiration"},"hidden":{"type":"boolean","description":"true takes it off the tab strip; false shows it again (B-COLL-126)."},"position":{"type":"integer","minimum":0,"description":"Its new place among your libraries, from 0; past the end puts it last."},"follows_collection_id":{"type":["string","null"],"pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"A collection you can read now, not in Trash: the tab then lists its direct sub-collections that you can read, at read time, in its tile order, and takes no collections by hand (libraries.add, remove and move_collection answer library_follows_collection). null stops following, leaving an empty tab. A tab that holds collections cannot start following (library_not_empty).","example":"b4kq7xz2m9np"}},"additionalProperties":false},"LibraryDeleteResult":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]},"LibraryAddResult":{"type":"object","properties":{"added":{"type":"integer","description":"References made now."},"already":{"type":"integer","description":"Collections the library already held."},"position":{"type":["integer","null"],"description":"With position: where the collection now is in the library's order; else null."},"library":{"$ref":"#/components/schemas/Library"}},"required":["added","already","position","library"]},"LibraryAdd":{"type":"object","properties":{"collection_ids":{"type":"array","items":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"minItems":1,"maxItems":1000,"description":"Collections you can read now, by id (one at a time is Add to library)."},"from":{"type":"object","properties":{"tab":{"type":"string","enum":["private","workspaces","public"],"description":"The system tab whose results are copied: private, workspaces or public (not another library: between libraries, collections move)."},"q":{"type":"string","maxLength":200,"description":"Its search, as collections.list's q."},"tags":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Its tag filter: collections carrying any of these tags."},"include":{"type":"array","items":{"type":"string","enum":["hidden_subcollections","archived"]},"description":"As collections.list's include: hidden_subcollections, archived."}},"required":["tab"],"additionalProperties":false,"description":"Or every collection a tab lists under a search and filter (at most 1000). Give collection_ids or from, not both."},"position":{"type":"integer","minimum":0,"description":"With exactly one collection in collection_ids: its place in the library's own order, from 0 (past the end puts it last). It is added there, or moved there when the library already holds it; this is how a library is reordered. The library then lists in that order by default (default_sort manual)."}},"additionalProperties":false},"LibraryRemoveResult":{"type":"object","properties":{"removed":{"type":"integer","description":"References removed; a collection the library did not hold counts for nothing."},"library":{"$ref":"#/components/schemas/Library"}},"required":["removed","library"]},"LibraryRemove":{"type":"object","properties":{"collection_ids":{"type":"array","items":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"minItems":1,"maxItems":1000,"description":"The collections whose references leave the library."}},"required":["collection_ids"],"additionalProperties":false},"LibraryMoveResult":{"type":"object","properties":{"moved":{"type":"integer"},"from":{"$ref":"#/components/schemas/Library"},"to":{"$ref":"#/components/schemas/Library"}},"required":["moved","from","to"]},"LibraryMove":{"type":"object","properties":{"from":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The library of yours the collections leave."},"to":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The library of yours they enter."},"collection_ids":{"type":"array","items":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"minItems":1,"maxItems":1000,"description":"Collections in `from`; each leaves it and enters `to`."}},"required":["from","to","collection_ids"],"additionalProperties":false},"BookmarkList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"Bookmark":{"type":"object","properties":{"id":{"type":"string","description":"The bookmark's id.","example":"h3m8wq2z5rtc"},"title":{"type":"string","example":"Suggested collections"},"source":{"type":"string","description":"Who saved it: `agent` for an agent's call, `studio` for the person's own."},"collection_ids":{"type":"array","items":{"type":"string"},"description":"The collections it shows you now, in the order saved: those you can still read, not archived or in Trash. A collection that no longer qualifies is left out without a word (B-COLL-061). The answer to a save echoes the ids you gave instead."},"collection_count":{"type":"integer","description":"How many of them; what a row of the bookmarks list says."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","title","source","collection_ids","collection_count","created_at","updated_at"],"description":"A private, titled list of collections (B-COLL-058): kept so that a set an agent found can be found again. Only its owner sees it."},"BookmarkCreate":{"type":"object","properties":{"title":{"type":"string","maxLength":2000,"description":"1 to 500 characters, trimmed.","example":"Suggested collections"},"collection_ids":{"type":"array","items":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"minItems":1,"maxItems":1000,"description":"1 to 100 distinct collections, by id, kept in this order. Each must name a collection you can read now; any other id, one you cannot read or one never made, is the same 404 `not_found`. A collection you later lose access to stays in the bookmark and is not shown (B-COLL-061, ZEG-1452)."}},"required":["title","collection_ids"],"additionalProperties":false},"BookmarkDeleteResult":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]},"BookmarkAdd":{"type":"object","properties":{"collection_ids":{"type":"array","items":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"minItems":1,"maxItems":1000,"description":"Collections to add after those the bookmark holds, each once; past 100 in all is 429 quota_exceeded."}},"required":["collection_ids"],"additionalProperties":false},"BookmarkRename":{"type":"object","properties":{"title":{"type":"string","maxLength":2000,"description":"1 to 500 characters, trimmed.","example":"Suggested collections"}},"required":["title"],"additionalProperties":false},"Queue":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/QueueEntry"},"description":"The waiting entries, oldest first: the order to do them in."},"waiting":{"type":"integer","description":"How many wait."},"prompt":{"type":["string","null"],"description":"The waiting entries as ONE prompt: a short preface, then each entry between a start line (with its id) and an end line, both carrying a mark drawn at random for this answer; only lines with that mark are framing. Null when nothing waits."},"done":{"type":"array","items":{"$ref":"#/components/schemas/QueueEntry"},"description":"Entries done or failed in the past day, newest first (at most 20)."}},"required":["items","waiting","prompt","done"]},"QueueEntry":{"type":"object","properties":{"id":{"type":"string","description":"The entry's id.","example":"h3m8wq2z5rtc"},"kind":{"type":"string","description":"What it asks for: a kind of the catalogue (`describe_collection`, `tag_items`, …), or `custom`: one of the person's own saved prompts (ZEG-1447), whose text is their own words with ids put in, starting “My own saved prompt”.","example":"describe_collection"},"label":{"type":["string","null"],"description":"The kind's name in Studio, or a saved prompt's title when it was added (kind `custom`)."},"collection_id":{"type":["string","null"],"description":"The collection it is about."},"item_ids":{"type":"array","items":{"type":"string"},"description":"The items it names, in order; empty when it is about the collection or a tag."},"tag":{"type":["string","null"],"description":"The tag whose items it is about, for the person's own display; null to an agent, whose text names those items by id."},"text":{"type":"string","description":"The prompt, as it was written when it was added: what the agent does. It names every target by id alone: never a name, title, description or tag. A `custom` entry is the person's own saved words with ids put in, kept as added whatever happens to the prompt later."},"state":{"type":"string","enum":["waiting","done","failed","removed"]},"note":{"type":["string","null"],"description":"What the agent said when it finished."},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"}},"required":["id","kind","label","collection_id","item_ids","tag","text","state","note","created_at","finished_at"],"description":"One prompt in the person's AI queue (ZEG-1446). Only its owner sees it."},"QueueCompleteResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/QueueEntry"},"description":"Each entry named, as it is now."},"not_found":{"type":"array","items":{"type":"string"},"description":"Ids that name no entry of yours (nothing was done for them)."}},"required":["items","not_found"]},"QueueComplete":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$"},"minItems":1,"maxItems":200,"description":"The entries finished, by id."},"outcome":{"type":"string","enum":["done","failed"]},"note":{"type":"string","maxLength":4000,"description":"A short note for the person (at most 1000 characters): why it failed, or what was done."}},"required":["ids","outcome"],"additionalProperties":false},"QueueAddResult":{"type":"object","properties":{"entry":{"$ref":"#/components/schemas/QueueEntry"},"added":{"type":"boolean","description":"False when the same prompt for the same targets was already waiting: that entry is answered, not a second one."}},"required":["entry","added"]},"QueueAdd":{"type":"object","properties":{"kind":{"type":"string","maxLength":64,"description":"The prompt's kind: `describe_collection`, `summarise_collection`, `organise_collection`, `cover_collection`, `tag_collection`, `tag_items`, `describe_item`, `title_item`, `tag_item`, `thumbnail_item`, `describe_items`, `title_items`, `thumbnail_items`; or `custom` with `prompt_id`: one of the person's own saved prompts.","example":"describe_collection"},"collection_id":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection it is about.","example":"b4kq7xz2m9np"},"item_ids":{"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"maxItems":1000,"description":"The items (one for an item's prompt, 1 to 100 for several). Leave out for the collection's every item."},"tag":{"type":"string","maxLength":200,"description":"Instead of items: the items of the collection carrying this tag."},"prompt_id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"Kind `custom` only: the id of one of the person's own saved prompts (ZEG-1447). Its stored words are rendered; no text is ever sent."}},"required":["kind","collection_id"],"additionalProperties":false},"QueueClearResult":{"type":"object","properties":{"removed":{"type":"integer","description":"How many waiting entries went."}},"required":["removed"]},"CustomPromptList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CustomPrompt"},"description":"The person's prompts, by title."},"max":{"type":"integer","description":"How many a person may keep (100)."}},"required":["items","max"]},"CustomPrompt":{"type":"object","properties":{"id":{"type":"string","description":"The prompt's id.","example":"p3m8wq2z5rtc"},"title":{"type":"string","description":"Its name in the AI menu.","example":"Proofread"},"body":{"type":"string","description":"The prompt, in the person's own words, with at most the placeholders `{{collection_id}}`, `{{item_id}}` (a prompt for one item) and `{{item_ids}}` (for several), replaced by ids when it is copied or queued."},"fits":{"type":"string","enum":["collection","item","items"],"description":"What it is about: `collection`, `item` (one) or `items` (several). It decides where the AI menu offers it and which placeholders it may use."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","title","body","fits","created_at","updated_at"],"description":"One of the person's own saved prompts (ZEG-1447). Only its author sees it."},"CustomPromptCreate":{"type":"object","properties":{"title":{"type":"string","maxLength":320,"description":"1 to 80 characters, one line."},"body":{"type":"string","maxLength":8000,"description":"1 to 4000 characters."},"fits":{"type":"string","enum":["collection","item","items"],"description":"What it is about: `collection`, `item` (one) or `items` (several). It decides where the AI menu offers it and which placeholders it may use."}},"required":["title","body","fits"],"additionalProperties":false},"CustomPromptUpdate":{"type":"object","properties":{"title":{"type":"string","maxLength":320,"description":"1 to 80 characters, one line."},"body":{"type":"string","maxLength":8000,"description":"1 to 4000 characters."},"fits":{"type":"string","enum":["collection","item","items"],"description":"What it is about: `collection`, `item` (one) or `items` (several). It decides where the AI menu offers it and which placeholders it may use."}},"additionalProperties":false},"CustomPromptDeleted":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]},"AccountExport":{"type":"object","properties":{"id":{"type":"string","description":"The export's id."},"state":{"type":"string","enum":["queued","building","ready","expired","failed"],"description":"queued: asked for; building: being made; ready: download it until expires_at; expired: put away after its 7 days; failed: could not be made, ask again."},"requested_at":{"type":"string","format":"date-time"},"ready_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time","description":"7 days after ready_at; after it the archive is put away."},"size_bytes":{"type":["integer","null"]},"failure_reason":{"type":["string","null"],"description":"Why a failed export could not be made, as one plain sentence to show the person (never the error itself); null in every other state, and on an export that failed before the reason was kept."}},"required":["id","state","requested_at","ready_at","expires_at","size_bytes","failure_reason"],"description":"Download everything (B-AUTH-171): one archive of every collection the person owns, each as collections.export writes it, with a manifest. One live export per account."},"AccountExportLatest":{"type":"object","properties":{"export":{"allOf":[{"$ref":"#/components/schemas/AccountExport"},{"type":["object","null"]}]}},"required":["export"]},"AccountExportChunk":{"type":"object","properties":{"export_id":{"type":"string"},"name":{"type":"string","description":"The archive's file name."},"mime_type":{"type":"string","enum":["application/json"]},"size_bytes":{"type":"integer"},"chunk_bytes":{"type":"integer","description":"Every chunk but the last holds this many bytes (98304)."},"chunk_count":{"type":"integer"},"index":{"type":"integer"},"offset":{"type":"integer"},"length":{"type":"integer"},"last":{"type":"boolean"},"next_index":{"type":["integer","null"]},"chunk_sha256":{"type":"string","description":"SHA-256 of this chunk, lower-case hex."},"etag":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"data":{"type":"string","description":"This chunk's bytes, base64 (standard, padded)."}},"required":["export_id","name","mime_type","size_bytes","chunk_bytes","chunk_count","index","offset","length","last","next_index","chunk_sha256","etag","expires_at","data"]},"AccountDeletionSummary":{"type":"object","properties":{"collections":{"type":"integer","description":"Every collection you own, Trash included: all of them go."},"items":{"type":"integer"},"published":{"type":"integer","description":"Of the collections, how many are published."},"handles":{"type":"array","items":{"type":"string"},"description":"Your handles, the username first; their channels go with them."},"channel_prices":{"type":"integer","description":"Live channel prices."},"subscribers":{"type":"integer","description":"People subscribing to your channels: refunded the unused part."},"connections":{"type":"integer","description":"Live AI connections."},"api_keys":{"type":"integer","description":"Live personal API keys."},"window_days":{"type":"integer","description":"Deletion completes this many days after it is confirmed (14)."}},"required":["collections","items","published","handles","channel_prices","subscribers","connections","api_keys","window_days"],"description":"What deleting the account takes (B-AUTH-171). What stays: people who bought from the account keep what they bought; the account's own purchases go with it."},"AccountDeletionPending":{"type":"object","properties":{"state":{"type":"string","enum":["pending"]},"requested_at":{"type":"string","format":"date-time"},"due_at":{"type":"string","format":"date-time","description":"When the account and everything it owns is purged, unless the person signs in before."},"sessions_ended":{"type":"integer"}},"required":["state","requested_at","due_at","sessions_ended"]},"AccountDeletionConfirm":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"description":"The account's email, typed by the person: the confirmation.","example":"mia@example.com"}},"required":["email"]},"Sharing":{"type":"object","properties":{"collection":{"type":"string"},"owner":{"$ref":"#/components/schemas/SharingPersonRef"},"people":{"type":"array","items":{"$ref":"#/components/schemas/SharingMember"},"description":"Members and pending invitations by name, oldest first."},"invitations":{"type":"array","items":{"$ref":"#/components/schemas/SharingInvitation"}},"links":{"type":"array","items":{"$ref":"#/components/schemas/SharingLink"}},"requests":{"type":"array","items":{"$ref":"#/components/schemas/SharingRequest"}},"template":{"$ref":"#/components/schemas/SharingTemplate"},"template_saved":{"type":"boolean","description":"False until the owner saves one: the template then reads as Upload and Include sub-collections on."},"requests_enabled":{"type":"boolean"},"requests_available":{"type":"boolean","description":"Whether anyone can ask at all: published, and Public or Restricted (B-SHARE-115)."},"count":{"type":"integer","description":"People counted toward 50: members, pending invitations by name and open email invitations; the owner is not counted (B-SHARE-122)."},"limit":{"type":"integer"},"pending":{"type":"integer","description":"Invitations waiting for an answer, toward the 20 a collection may have (B-SHARE-084)."},"pending_limit":{"type":"integer"}},"required":["collection","owner","people","invitations","links","requests","template","template_saved","requests_enabled","requests_available","count","limit","pending","pending_limit"],"description":"Everything the owner sees in Share."},"SharingPersonRef":{"type":"object","properties":{"id":{"type":"string","description":"The account's id.","example":"h3m8wq2z5rtc"},"name":{"type":"string","description":"Their display name, else their username."},"username":{"type":"string"}},"required":["id","name","username"]},"SharingMember":{"type":"object","properties":{"id":{"type":"string","description":"The account's id.","example":"h3m8wq2z5rtc"},"name":{"type":"string","description":"Their display name, else their username."},"username":{"type":"string"},"status":{"type":"string","enum":["pending","accepted"],"description":"`pending`: an invitation by name, waiting; `accepted`: a member. There is no other state: every way of leaving deletes the row (B-SHARE-002)."},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."},"joined_via":{"type":["string","null"],"description":"`invite`, `email`, `link`, `request` or `answer`; null before Phase 3."},"link":{"type":["string","null"],"description":"The invite link they joined through (B-SHARE-127)."},"invited_at":{"type":"string","format":"date-time"},"joined_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","username","status","can_upload","can_edit","can_delete","include_sub_collections","joined_via","link","invited_at","joined_at"],"description":"A person on a collection (B-SHARE-001): a pending invitation or an accepted member, with their switches."},"SharingInvitation":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","description":"The one address it is for."},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."},"expires_at":{"type":"string","format":"date-time"},"expired":{"type":"boolean","description":"Past its 7 days: it no longer counts toward the 50, and `sharing.resend` makes it live again (B-SHARE-021, 113)."},"last_sent_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","can_upload","can_edit","can_delete","include_sub_collections","expires_at","expired","last_sent_at","created_at"],"description":"An email invitation for an address with no account (B-SHARE-020)."},"SharingLink":{"type":"object","properties":{"id":{"type":"string"},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."},"message":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time","description":"Null is never."},"join_limit":{"type":["integer","null"],"description":"Null is no limit."},"joins":{"type":"integer"},"state":{"type":"string","enum":["active","expired","revoked","used_up"]},"revoked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"joined":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/SharingPersonRef"},{"type":"object","properties":{"joined_at":{"type":"string","format":"date-time"}},"required":["joined_at"]}]},"description":"Who joined through it, oldest first (B-SHARE-127). Who it was sent to is never recorded."}},"required":["id","can_upload","can_edit","can_delete","include_sub_collections","message","expires_at","join_limit","joins","state","revoked_at","created_at","joined"],"description":"An invite link (B-SHARE-123–127). Its code is shown once, when it is made, and only a hash is kept."},"SharingRequest":{"type":"object","properties":{"id":{"type":"string"},"requester":{"$ref":"#/components/schemas/SharingPersonRef"},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","requester","note","created_at"],"description":"A pending access request (B-SHARE-115)."},"SharingTemplate":{"type":"object","properties":{"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."}},"required":["can_upload","can_edit","can_delete","include_sub_collections"],"description":"The four switches every new invitation by name, by email and by link starts from (B-SHARE-114)."},"SharingReceivedList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/SharingReceived"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"SharingReceived":{"type":"object","properties":{"collection":{"type":"string"},"name":{"type":"string"},"invited_by":{"allOf":[{"$ref":"#/components/schemas/SharingPersonRef"},{"type":["object","null"]}]},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."},"item_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}},"required":["collection","name","invited_by","can_upload","can_edit","can_delete","include_sub_collections","item_count","created_at"],"description":"A pending invitation by name, as its invitee sees it (B-SHARE-128, 129)."},"SharingInvited":{"type":"object","properties":{"kind":{"type":"string","enum":["member","email"]},"member":{"allOf":[{"$ref":"#/components/schemas/SharingMember"},{"type":["object","null"]}]},"invitation":{"allOf":[{"$ref":"#/components/schemas/SharingInvitation"},{"type":["object","null"]}]}},"required":["kind","member","invitation"]},"SharingInvite":{"type":"object","properties":{"user":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The person's id, as the lookup returns it."},"username":{"type":"string","maxLength":80,"description":"Their username, with or without the @."},"email":{"type":"string","maxLength":320,"description":"An address. An account with it is invited in the app; otherwise it gets an email invitation, 7 days, for that address only. Not for agents (B-SHARE-086)."},"can_upload":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"include_sub_collections":{"type":"boolean","description":"Not for agents: an agent's invitations always include sub-collections (B-SHARE-086)."}},"additionalProperties":false,"description":"Name exactly one of user, username and email. Any switch left out is the collection's template's (B-SHARE-114), which starts at Upload and Include sub-collections on (B-SHARE-027)."},"SharingUpdated":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/SharingMember"},"epoch_bumped":{"type":"boolean","description":"True when a permission was lowered: the epoch moved, so URLs minted before stop at once (B-ACCESS-179)."}},"required":["member","epoch_bumped"]},"SharingUpdate":{"type":"object","properties":{"can_upload":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"include_sub_collections":{"type":"boolean"}},"additionalProperties":false,"description":"Only the switches sent change; none at all is refused (B-SHARE-029)."},"SharingRemoved":{"type":"object","properties":{"id":{"type":"string"},"removed":{"type":"boolean","enum":[true]},"kind":{"type":"string","enum":["member","invitation"]},"epoch_bumped":{"type":"boolean"}},"required":["id","removed","kind","epoch_bumped"]},"SharingAccepted":{"type":"object","properties":{"collection":{"type":"string"},"accepted":{"type":"boolean","enum":[true]},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."}},"required":["collection","accepted","can_upload","can_edit","can_delete","include_sub_collections"]},"SharingDeclined":{"type":"object","properties":{"collection":{"type":"string"},"declined":{"type":"boolean","enum":[true]}},"required":["collection","declined"]},"SharingLeft":{"type":"object","properties":{"collection":{"type":"string"},"left":{"type":"boolean","enum":[true]}},"required":["collection","left"]},"SharingLookup":{"type":"object","properties":{"query":{"type":"string"},"people":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/SharingPersonRef"},{"type":"object","properties":{"state":{"type":"string","enum":["available","member"]}},"required":["state"]}]}},"email":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["in_app","email"]},"state":{"type":"string","enum":["available","member","invited"]}},"required":["mode","state"],"description":"For an email address: only whether it becomes an in-app invitation or an email invitation, never a username or a masked address (B-SHARE-103)."}},"required":["query","people","email"]},"SharingResent":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","description":"The one address it is for."},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."},"expires_at":{"type":"string","format":"date-time"},"expired":{"type":"boolean","description":"Past its 7 days: it no longer counts toward the 50, and `sharing.resend` makes it live again (B-SHARE-021, 113)."},"last_sent_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","can_upload","can_edit","can_delete","include_sub_collections","expires_at","expired","last_sent_at","created_at"],"description":"An email invitation for an address with no account (B-SHARE-020)."},"SharingSettingsSaved":{"type":"object","properties":{"collection":{"type":"string"},"template":{"$ref":"#/components/schemas/SharingTemplate"},"template_saved":{"type":"boolean"},"requests_enabled":{"type":"boolean"}},"required":["collection","template","template_saved","requests_enabled"]},"SharingSettings":{"type":"object","properties":{"invite_template":{"type":"object","properties":{"can_upload":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"include_sub_collections":{"type":"boolean"}},"required":["can_upload","can_edit","can_delete","include_sub_collections"],"additionalProperties":false,"description":"All four switches (B-SHARE-114)."},"access_requests_enabled":{"type":"boolean","description":"The Requests switch: off stops new requests only (B-SHARE-115)."}},"additionalProperties":false},"SharingLinkMinted":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/SharingLink"},"code":{"type":"string","description":"The link's secret: 22 characters, 128 bits, shown this once. Only its SHA-256 is kept."}},"required":["link","code"]},"SharingLinkCreate":{"type":"object","properties":{"expires":{"type":"string","enum":["24h","7d","30d","never"],"description":"24h, 7d, 30d or never; default 7d (B-SHARE-123)."},"join_limit":{"type":["integer","null"],"minimum":1,"maximum":50,"description":"From 1 to 50, or null for no limit (the default)."},"message":{"type":["string","null"],"maxLength":1000},"can_upload":{"type":"boolean"},"can_edit":{"type":"boolean"},"can_delete":{"type":"boolean"},"include_sub_collections":{"type":"boolean"}},"additionalProperties":false},"SharingLinkEnded":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["revoked","removed"]}},"required":["id","state"]},"SharingRequested":{"type":"object","properties":{"id":{"type":"string"},"collection":{"type":"string"},"status":{"type":"string","enum":["pending"]},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","collection","status","note","created_at"]},"SharingRequestAccess":{"type":"object","properties":{"note":{"type":["string","null"],"maxLength":1000,"description":"Up to 500 characters, trimmed; the gate sends none."}},"additionalProperties":false},"SharingWithdrawn":{"type":"object","properties":{"collection":{"type":"string"},"withdrawn":{"type":"boolean","enum":[true]}},"required":["collection","withdrawn"]},"SharingResolved":{"type":"object","properties":{"id":{"type":"string"},"collection":{"type":"string"},"status":{"type":"string","enum":["granted","rejected"]},"noop":{"type":"boolean"},"member":{"allOf":[{"$ref":"#/components/schemas/SharingMember"},{"type":["object","null"],"description":"The member a grant made, with every switch off but sub-collections (R18)."}]}},"required":["id","collection","status","noop","member"]},"SharingJoined":{"type":"object","properties":{"collection":{"type":"string"},"name":{"type":"string"},"joined":{"type":"boolean","description":"False when the person was already a member: nothing changed and no join was used."},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."}},"required":["collection","name","joined","can_upload","can_edit","can_delete","include_sub_collections"]},"SharingCode":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":256,"description":"The link's code, as its owner shared it."}},"required":["code"],"additionalProperties":false},"SharingToken":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":256,"description":"The token of the invitation email."}},"required":["token"],"additionalProperties":false},"SharingLinkPreview":{"type":"object","properties":{"inviter":{"type":["object","null"],"properties":{"name":{"type":"string"}},"required":["name"]},"collection":{"type":"object","properties":{"name":{"type":"string"},"item_count":{"type":"integer"},"kinds":{"type":"array","items":{"type":"string"}}},"required":["name","item_count","kinds"]},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."},"message":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"}},"required":["inviter","collection","can_upload","can_edit","can_delete","include_sub_collections","message","expires_at"],"description":"What the landing shows a signed-out visitor (B-SHARE-125): no id, no item, no byte."},"SharingInvitationPreview":{"type":"object","properties":{"inviter":{"type":["object","null"],"properties":{"name":{"type":"string"}},"required":["name"]},"collection":{"type":"object","properties":{"name":{"type":"string"},"item_count":{"type":"integer"},"kinds":{"type":"array","items":{"type":"string"}}},"required":["name","item_count","kinds"]},"can_upload":{"type":"boolean","description":"May add items (B-SHARE-031)."},"can_edit":{"type":"boolean","description":"May change any item: name, description, order, tags, thumbnail, notes."},"can_delete":{"type":"boolean","description":"May delete any item."},"include_sub_collections":{"type":"boolean","description":"Whether the grant also reaches the sub-collections, with the same permissions (B-SHARE-119)."},"state":{"type":"string","enum":["open","expired","accepted"]},"email":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["inviter","collection","can_upload","can_edit","can_delete","include_sub_collections","state","email","expires_at"]},"UploadStarted":{"anyOf":[{"$ref":"#/components/schemas/UploadStart"},{"$ref":"#/components/schemas/UploadInlineStart"}],"description":"The PUT answer, or, for a request with transfer inline, the chunk size and count to send."},"UploadStart":{"type":"object","properties":{"item_id":{"type":"string","description":"The item's public id; finalise names it."},"number":{"type":"integer","description":"The item's number (R103)."},"status":{"type":"string","enum":["pending"],"description":"Shown to no one, not even in your own lists, until finalised (B-UPLOAD-169)."},"upload_id":{"type":"string"},"expires_at":{"type":"string","format":"date-time","description":"Finalise by then: an upload not finalised within 24 hours is removed (B-UPLOAD-167)."},"transfer":{"$ref":"#/components/schemas/UploadTransfer"},"replaces_item_id":{"type":"string","description":"Present when the bytes replace a note's text (replace_item_id, ZEG-1531): item_id is then that note's own id, already in the collection."}},"required":["item_id","number","status","upload_id","expires_at","transfer"]},"UploadTransfer":{"oneOf":[{"$ref":"#/components/schemas/UploadTransferSingle"},{"$ref":"#/components/schemas/UploadTransferMultipart"}],"discriminator":{"propertyName":"mode","mapping":{"single":"#/components/schemas/UploadTransferSingle","multipart":"#/components/schemas/UploadTransferMultipart"}},"description":"One presigned PUT up to 100 MiB; above it, a multipart plan: PUT each part to its URL, keep each answer's ETag, and send them to finalise. The only presigned URL Zegazone issues, for one key, for 15 minutes (B-UPLOAD-134)."},"UploadTransferSingle":{"type":"object","properties":{"mode":{"type":"string","enum":["single"]},"method":{"type":"string","enum":["PUT"]},"url":{"type":"string","description":"PUT the whole file here, with no other credential (B-UPLOAD-145): exactly size_bytes bytes, since the URL signs that length and storage refuses any other (403)."},"expires_at":{"type":"string","format":"date-time","description":"The URL works until then (15 minutes)."}},"required":["mode","method","url","expires_at"]},"UploadTransferMultipart":{"type":"object","properties":{"mode":{"type":"string","enum":["multipart"]},"method":{"type":"string","enum":["PUT"]},"upload_id":{"type":"string"},"part_size":{"type":"integer"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/UploadPart"}},"expires_at":{"type":"string","format":"date-time","description":"The part URLs work until then (15 minutes)."}},"required":["mode","method","upload_id","part_size","parts","expires_at"]},"UploadPart":{"type":"object","properties":{"part_number":{"type":"integer","description":"1-based."},"url":{"type":"string","description":"Presigned PUT for this part."},"offset":{"type":"integer","description":"Where the part starts in the file."},"length":{"type":"integer","description":"How many bytes it holds."}},"required":["part_number","url","offset","length"]},"UploadInlineStart":{"type":"object","properties":{"item_id":{"type":"string","description":"The item's public id; finalise names it."},"number":{"type":"integer","description":"The item's number (R103)."},"status":{"type":"string","enum":["pending"],"description":"Shown to no one, not even in your own lists, until finalised (B-UPLOAD-169)."},"upload_id":{"type":"string","description":"Names the upload in items.upload_chunk (not the item_id)."},"expires_at":{"type":"string","format":"date-time","description":"Finalise by then: an upload not finalised within 24 hours is removed (B-UPLOAD-167)."},"transfer":{"$ref":"#/components/schemas/UploadTransferInline"},"replaces_item_id":{"type":"string","description":"Present when the bytes replace a note's text (replace_item_id, ZEG-1531): item_id is then that note's own id."}},"required":["item_id","number","status","upload_id","expires_at","transfer"]},"UploadTransferInline":{"type":"object","properties":{"mode":{"type":"string","enum":["inline"]},"chunk_bytes":{"type":"integer","description":"Every chunk but the last holds exactly this many bytes (524288)."},"chunk_count":{"type":"integer","description":"How many chunks to send: indexes 0 to chunk_count - 1; the last holds what is left of size_bytes."},"expires_at":{"type":"string","format":"date-time","description":"Finalise by then (24 hours)."}},"required":["mode","chunk_bytes","chunk_count","expires_at"]},"UploadRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":1024,"description":"The file's name, with its extension. The item takes it as its name (cut to 180 characters) unless `name` is given. Its extension decides what a text file is (B-UPLOAD-132): a filename ending .md, .markdown or .mdown is a Markdown file, whatever `name`, `content_type` and the PUT's Content-Type say (R622), and one ending .csv, .tsv or a code extension is a table or code the same way, whatever the item is named or renamed to (ZEG-1517).","example":"holiday.png"},"size_bytes":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"The declared size in BYTES (not characters: text with smart quotes or emoji has more bytes than characters): checked against the collection owner's per-file cap and storage quota now, measured at finalise (B-UPLOAD-149), which accepts up to 1 % more and refuses anything larger, or anything smaller (an upload cut short), as integrity_mismatch with the measured size."},"kind":{"type":"string","enum":["file","skill"],"description":"file (the default) or skill (ZEG-1271): the bytes are an agent skill, a zip of one folder, named for the skill, with SKILL.md at its root and any scripts, references and assets beside it (at most 200 files, 20 MB; a `.skill` file is such a zip). Finalise reads the zip's directory without extracting it and answers the item as kind skill with its `skill` summary; a zip that is not a valid skill is refused with `invalid_skill` and a `reason` (not_a_zip, skill_md_missing, not_single_folder, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, unsafe_path, too_many_files, skill_too_large, zip_unsupported) and the item stays pending until aborted."},"content_type":{"type":["string","null"],"maxLength":255,"description":"The declared type: only a hint. Finalise reads the type from the bytes (B-UPLOAD-132). For text the filename's extension decides; text/markdown makes a file Markdown only when its filename has no extension (R622). Not needed for a .md file."},"name":{"type":"string","description":"The item's name; defaults to the filename. At most 180 characters."},"description":{"type":["string","null"],"description":"At most 4,000 characters (B-MEDIA-118)."},"description_format":{"type":"string","enum":["plain","markdown"],"description":"Defaults to plain (B-COLL-143)."},"tags":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"At most 10, stored lower-case (B-COLL-118)."},"transfer":{"type":"string","enum":["presigned","inline"],"description":"How the bytes get there. presigned (the default): PUT them to the URL the answer holds, for a file you can read from a disk and send over HTTP. inline: send them in 512 KiB chunks through items.upload_chunk (the tool items_upload_chunk), for a file you hold yourself, such as HTML you wrote or a file attached to the chat; at most 25 MB, and it needs nothing but this connection."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Inline only: the whole file's SHA-256 (64 lowercase hex characters). Finalise checks the assembled file against it and stores nothing on a mismatch."},"replace_item_id":{"type":"string","minLength":1,"maxLength":120,"description":"The id of a note in this collection whose text these bytes replace (ZEG-1531): the way to put a newer version of a note you hold in a file, because the note's id is what people and agents link to. The note keeps its id, number, place, thumbnail, tags, name, description, display mode, gate and sharing; no item is added and nothing goes to Trash. The answer's item_id is the note's own; send the bytes as for any upload, then finalise with it, which writes the text into the note and deletes the uploaded file. The file must be UTF-8 text of at most 524,288 characters (a byte-order mark is dropped and line endings become \n). Needs the right to edit the note. name, description, description_format, tags and display_mode given with it are checked now and written with the text at finalise, in the same write and under the same guard; anything not given stays. Refused (`not_a_text_note`) for anything but a note.","example":"q7rt2bx9kz4m"},"display_mode":{"type":"string","enum":["plain","markdown","code"],"description":"With replace_item_id: the note's new display mode, written with the text (plain, markdown or code). Refused without it."},"base_version":{"type":"string","description":"With replace_item_id: the note's `version` as you last read it. If the note's text has changed since, the upload (or its finalise) is refused with 409 `note_changed` and `current_version`, and nothing is written.","example":"3"},"force":{"type":"boolean","description":"With replace_item_id: replace the text even though the note changed since base_version."}},"required":["filename","size_bytes"],"additionalProperties":false},"UploadFinalise":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when it was already finalised."},"item":{"$ref":"#/components/schemas/Item"},"size_bytes":{"type":"integer","description":"The size measured in storage."},"sniffed_type":{"type":"string","description":"The type read from the bytes, which the item now carries."},"converted_to_note":{"type":"boolean","description":"True when the file was Markdown (its filename ends .md, .markdown or .mdown, R622) and, because the collection owner's settings.uploads.markdown_as_notes is on (the default), became a Markdown text note holding its text: item is then kind note, named after the file without its extension, edited with items.update {text}, and no bytes are stored or charged (ZEG-1418)."},"kept_as_file_reason":{"type":"string","description":"Always present when a Markdown file (by its filename) did not become a note: longer than a note's 524,288 characters, not UTF-8 text, empty, or the collection owner's uploads.markdown_as_notes is off (R622). A finalise sent again for a file uploaded before R622 that could be a note says only that it was added as a file (ZEG-1521)."},"warning":{"type":"string","description":"Present with kept_as_file_reason: one plain sentence saying the Markdown file was stored as a file, not a note, and why, followed by the way back (items_convert_to_note) only for a text/plain or text/markdown file, the only kind it converts."},"replaced":{"type":"boolean","description":"True when the upload replaced an existing note's text (replace_item_id, ZEG-1531): `item` is that note, with its own id, and nothing was added. converted_to_note is true too."}},"required":["noop","item","size_bytes","sniffed_type","converted_to_note"]},"UploadFinaliseRequest":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"part_number":{"type":"integer","minimum":1,"maximum":10000},"etag":{"type":"string","minLength":1,"maxLength":256}},"required":["part_number","etag"],"additionalProperties":false},"maxItems":10000,"description":"A multipart upload's parts: each number with the ETag R2 answered."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"An inline upload's whole-file SHA-256 (64 lowercase hex characters), when it was not given at the start: the assembled file must match it, or nothing is stored."},"upload_id":{"type":"string","description":"For an upload that replaces a note's text: its upload_id, as items.upload answered it. Give it, so a finalise sent again after success answers that replace and never finishes another replace of the same note started since. Not for other uploads."},"base_version":{"type":"string","description":"For an upload that replaces a note's text: the note's `version` the replacement is based on, in place of the one given at the start. A stale one is 409 `note_changed` with `current_version`; the uploaded bytes are kept, so finalise again with the new version or force.","example":"3"},"force":{"type":"boolean","description":"For an upload that replaces a note's text: write it even though the note changed since its base_version."},"position":{"type":"integer","minimum":0,"description":"Where the new item goes in its collection's order, from 0 (past the end is the end), as items.reorder takes it; without it, the end. Needs the right items.reorder needs (to edit the collection), checked before anything is written. Not for a replace of a note's text, which is refused."},"thumbnail_label":{"type":["string","null"],"description":"The word or two drawn over the new item's tile, as items.update takes it: trimmed, at most 40 characters as people see them (a flag or an emoji is one) and 64 code points, no control, zero-width or direction-override characters (refused with field thumbnail_label before anything is written). Null or empty sets none. Not for a replace of a note's text, which is refused."}},"additionalProperties":false},"UploadChunk":{"type":"object","properties":{"upload_id":{"type":"string"},"index":{"type":"integer"},"noop":{"type":"boolean","description":"True when this chunk had already arrived with the same bytes: nothing changed."},"chunks_received":{"type":"integer","description":"How many chunks have arrived."},"chunks_expected":{"type":"integer","description":"How many the upload has."}},"required":["upload_id","index","noop","chunks_received","chunks_expected"]},"UploadChunkRequest":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":1000,"description":"The chunk's place in the file, from 0."},"data":{"type":"string","minLength":1,"maxLength":700000,"description":"The chunk's bytes as base64 (524288 bytes make 699,052 characters): exactly chunk_bytes bytes, except the last chunk, which holds what is left. Whitespace and the URL-safe alphabet are tolerated; any other character is refused with its position."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Optional: this chunk's SHA-256 (64 lowercase hex characters). A chunk that does not match is refused and nothing is stored."}},"required":["index","data"],"additionalProperties":false},"UploadRenewal":{"type":"object","properties":{"item_id":{"type":"string"},"expires_at":{"type":"string","format":"date-time","description":"Finalise by then: a renewal does not move the 24-hour window."},"transfer":{"$ref":"#/components/schemas/UploadTransfer"}},"required":["item_id","expires_at","transfer"]},"UploadAbort":{"type":"object","properties":{"item_id":{"type":"string","description":"The item, which no longer exists; for a replace of a note's text (ZEG-1531), the note, which is kept."},"aborted":{"type":"boolean","enum":[true]},"object_deleted":{"type":"boolean","description":"True when bytes had arrived at the upload's key and were deleted."},"note_kept":{"type":"boolean","enum":[true],"description":"Present when a replace of a note's text was cancelled (ZEG-1531): the note stays, its text unchanged."}},"required":["item_id","aborted","object_deleted"]},"ItemConvertToNote":{"type":"object","properties":{"item":{"allOf":[{"$ref":"#/components/schemas/Item"},{"description":"The item, now a Markdown note, with its text."}]}},"required":["item"]},"CoverChange":{"type":"object","properties":{"status":{"type":"string","enum":["upload_started","set","rendering","unchanged"],"description":"upload_started: PUT the image to `upload.transfer`, then call again with `upload_id`. set: the new image is in place. rendering: a new focal point is being cut (the current renditions stay until the new ones exist), or a new thumbnail, cover or avatar is being rendered (it shows no renditions yet); announced as an event. unchanged: nothing to do."},"collection":{"$ref":"#/components/schemas/Collection"},"upload":{"$ref":"#/components/schemas/ImageUploadTicket"}},"required":["status","collection","upload"]},"ImageUploadTicket":{"type":["object","null"],"properties":{"upload_id":{"type":"string","description":"Finish with it: the same operation, upload_id."},"expires_at":{"type":"string","format":"date-time","description":"Finish by then, or the upload is removed (B-UPLOAD-167)."},"transfer":{"$ref":"#/components/schemas/UploadTransfer"}},"required":["upload_id","expires_at","transfer"]},"CoverRequest":{"type":"object","properties":{"source":{"type":"string","enum":["upload","url","free_photo","item","none"],"description":"upload (an image you upload), url (an http(s) image the server fetches, url), free_photo (a photo photos.search found, provider and photo_id), item (one of the collection's images or thumbnails, item_id) or none (the first item's default thumbnail shows). Absent: only focal moves."},"item_id":{"type":"string","minLength":1,"maxLength":120,"description":"With source item: the item whose image becomes the cover.","example":"q7rt2bx9kz4m"},"url":{"type":"string","maxLength":2048,"description":"With source url: the http(s) address of the image. The server fetches it through the one outbound fetcher (B-UPLOAD-146: no private address, redirects checked, 20 seconds, at most 25 MB), renders it, and puts it in place as an upload would; only the owner may ask, and nothing is fetched for anyone else.","example":"https://example.com/picture.jpg"},"provider":{"type":"string","enum":["pexels","pixabay"],"description":"With source free_photo: the provider photos.search answered, pexels or pixabay."},"photo_id":{"type":"string","pattern":"^\\d{1,20}$","description":"With source free_photo: the photo's id as photos.search answered it. The server reads the photo from its provider by this id and fetches it from the provider's own image host; no URL is taken.","example":"3225517"},"focal":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"],"additionalProperties":false,"description":"The focal point every square rendition is cut around (B-UPLOAD-150); null for the attention-aware crop. Alone, without source, it moves the current image's crop.","example":{"x":0.5,"y":0.35}},"filename":{"type":"string","minLength":1,"maxLength":1024,"description":"With source upload: the image's file name; starts the upload.","example":"cover.jpg"},"size_bytes":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"With source upload: the image's size; at most 25 MB (B-UPLOAD-142). Never charged to storage (B-UPLOAD-165)."},"content_type":{"type":["string","null"],"maxLength":255,"description":"The declared type: only a hint; the bytes decide."},"upload_id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"With source upload: the upload to finish, after its PUT. Renders it and puts it in place."}},"additionalProperties":false},"ThumbnailChange":{"type":"object","properties":{"status":{"type":"string","enum":["upload_started","set","rendering","unchanged"],"description":"upload_started: PUT the image to `upload.transfer`, then call again with `upload_id`. set: the new image is in place. rendering: a new focal point is being cut (the current renditions stay until the new ones exist), or a new thumbnail, cover or avatar is being rendered (it shows no renditions yet); announced as an event. unchanged: nothing to do."},"item":{"$ref":"#/components/schemas/Item"},"upload":{"$ref":"#/components/schemas/ImageUploadTicket"}},"required":["status","item","upload"]},"ThumbnailRequest":{"type":"object","properties":{"source":{"type":"string","maxLength":64,"description":"upload (an image you upload), url (an http(s) image the server fetches, url), free_photo (a photo photos.search found, provider and photo_id), auto (the item's own image, else its kind's default thumbnail), placeholder:<kind>, one of: image, video, audio, song, youtube, spotify-song, spotify-playlist, web, page, link, pdf, word, excel, powerpoint, document, ebook, code, markdown, data, 3d, zip, archive, download, unknown, log, lyrics, memory, notes, poem, prompt, specification, summary, tutorial, skill (B-MEDIA-030, 154), or placeholder:<platform>, a social platform's tile (its logo on its colour) on any item, one of: instagram, facebook, x, tiktok, snapchat, reddit, threads, linkedin, pinterest, bluesky, mastodon, tumblr, twitch, telegram (ZEG-1559). Choosing a kind clears a chosen platform and the reverse. Absent: only focal moves.","example":"placeholder:poem"},"url":{"type":"string","maxLength":2048,"description":"With source url: the http(s) address of the image. The server fetches it through the one outbound fetcher (B-UPLOAD-146: no private address, redirects checked, 20 seconds, at most 25 MB), renders it, and puts it in place as an upload would; only the owner may ask, and nothing is fetched for anyone else.","example":"https://example.com/picture.jpg"},"provider":{"type":"string","enum":["pexels","pixabay"],"description":"With source free_photo: the provider photos.search answered, pexels or pixabay."},"photo_id":{"type":"string","pattern":"^\\d{1,20}$","description":"With source free_photo: the photo's id as photos.search answered it. The server reads the photo from its provider by this id and fetches it from the provider's own image host; no URL is taken.","example":"3225517"},"focal":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"],"additionalProperties":false,"description":"The focal point every square rendition is cut around (B-UPLOAD-150); null for the attention-aware crop. Alone, without source, it moves the current image's crop.","example":{"x":0.5,"y":0.35}},"filename":{"type":"string","minLength":1,"maxLength":1024,"description":"With source upload: the image's file name; starts the upload.","example":"cover.jpg"},"size_bytes":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"With source upload: the image's size; at most 25 MB (B-UPLOAD-142). Never charged to storage (B-UPLOAD-165)."},"content_type":{"type":["string","null"],"maxLength":255,"description":"The declared type: only a hint; the bytes decide."},"upload_id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"With source upload: the upload to finish, after its PUT. Renders it and puts it in place."}},"additionalProperties":false},"AvatarChange":{"type":"object","properties":{"status":{"type":"string","enum":["upload_started","set","rendering","unchanged"],"description":"upload_started: PUT the image to `upload.transfer`, then call again with `upload_id`. set: the new image is in place. rendering: a new focal point is being cut (the current renditions stay until the new ones exist), or a new thumbnail, cover or avatar is being rendered (it shows no renditions yet); announced as an event. unchanged: nothing to do."},"avatar":{"$ref":"#/components/schemas/OwnAvatar"},"upload":{"$ref":"#/components/schemas/ImageUploadTicket"}},"required":["status","avatar","upload"]},"AvatarRequest":{"type":"object","properties":{"source":{"type":"string","enum":["upload","none"],"description":"upload (an image you upload) or none (no avatar). Absent: only focal moves."},"focal":{"type":["object","null"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"],"additionalProperties":false,"description":"The focal point every square rendition is cut around (B-UPLOAD-150); null for the attention-aware crop. Alone, without source, it moves the current image's crop.","example":{"x":0.5,"y":0.35}},"filename":{"type":"string","minLength":1,"maxLength":1024,"description":"With source upload: the image's file name; starts the upload.","example":"cover.jpg"},"size_bytes":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"With source upload: the image's size; at most 25 MB (B-UPLOAD-142). Never charged to storage (B-UPLOAD-165)."},"content_type":{"type":["string","null"],"maxLength":255,"description":"The declared type: only a hint; the bytes decide."},"upload_id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"With source upload: the upload to finish, after its PUT. Renders it and puts it in place."},"alias_id":{"type":"string","description":"One of your aliases (its id from `profile.aliases.list`): sets that handle's own picture on its public profile instead of your avatar (ZEG-1476). Its renditions are at `/pub/a/{alias}/{epoch}/{variant}`, an address that names the alias only. Your username's own row is your avatar. Give it on every step of an upload."}},"additionalProperties":false},"PhotoSearch":{"type":"object","properties":{"provider":{"type":"string","enum":["pexels","pixabay"],"description":"Whose photos these are."},"providers":{"type":"array","items":{"type":"string","enum":["pexels","pixabay"]},"description":"The providers this server can search, in the order it tries them; empty: none."},"query":{"type":"string"},"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"next_page":{"type":["integer","null"]},"photos":{"type":"array","items":{"$ref":"#/components/schemas/FreePhoto"}},"attribution":{"type":"object","properties":{"text":{"type":"string"},"url":{"type":"string"}},"required":["text","url"],"description":"The line and link the provider asks every results view to show."}},"required":["provider","providers","query","page","per_page","total","next_page","photos","attribution"]},"FreePhoto":{"type":"object","properties":{"provider":{"type":"string","enum":["pexels","pixabay"]},"id":{"type":"string","description":"Its provider's id: what source free_photo takes as photo_id.","example":"3225517"},"width":{"type":"integer"},"height":{"type":"integer"},"alt":{"type":"string","description":"The provider's description of it; may be empty."},"color":{"type":["string","null"],"description":"Its average colour, #rrggbb, or null."},"thumbnail_url":{"type":"string","description":"A small picture at the provider, to show the result only (Pixabay's expire within 24 hours; never store one)."},"preview_url":{"type":"string","description":"A larger picture at the provider, the same rules."},"credit":{"$ref":"#/components/schemas/PhotoCredit"}},"required":["provider","id","width","height","alt","color","thumbnail_url","preview_url","credit"]},"PhotoCredit":{"type":"object","properties":{"provider":{"type":"string","enum":["pexels","pixabay"]},"provider_name":{"type":"string","example":"Pexels"},"provider_url":{"type":"string","example":"https://www.pexels.com"},"photographer":{"type":"string","example":"Jane Doe"},"photographer_url":{"type":["string","null"]},"photo_url":{"type":"string","description":"The photo's own page at its provider."}},"required":["provider","provider_name","provider_url","photographer","photographer_url","photo_url"],"description":"The provider's data on who made the photo and where it lives. Showing it is not required: Pexels' licence says attribution is not required and Pixabay's lets content be used without attributing the author; Zegazone shows none of it (R630). Show the answer's attribution with the results instead."},"MintedAgentToken":{"allOf":[{"$ref":"#/components/schemas/AgentToken"},{"type":"object","properties":{"token":{"type":"string","description":"The token, `zz_` and 43 characters: shown in this answer only and never stored. Absent from an idempotent replay.","example":"zz_Q2hhbmdlIG1lOiB0aGlzIGlzIG5vdCBhIHJlYWwgdG9rZW4uLi4"}}}]},"AgentToken":{"type":"object","properties":{"id":{"type":"string","description":"The token's public id (never the token)."},"client_name":{"type":["string","null"],"example":"Claude Code"},"scopes":{"type":"array","items":{"type":"string","enum":["collections:read","collections:write","collections:delete","items:read","items:write","items:delete","profile:read","profile:write","sharing:write","settings:read","settings:write","player:control"]},"description":"Exact members of the twelve v2 scopes."},"status":{"type":"string","enum":["active","expired","revoked"]},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"Moved at most once a minute."},"revoked_at":{"type":["string","null"],"format":"date-time"}},"required":["id","client_name","scopes","status","created_at","expires_at","last_used_at","revoked_at"]},"MintAgentToken":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":12,"description":"The scopes to grant, each exactly one of: collections:read, collections:write, collections:delete, items:read, items:write, items:delete, profile:read, profile:write, sharing:write, settings:read, settings:write, player:control (B-API-189). No wildcard (B-API-021).","example":["collections:read","collections:write","items:read","items:write"]},"client_name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^\\u0000-\\u001f\\u007f-\\u009f]+$","description":"What the token is for, as the person will see it.","example":"Claude Code"},"expires_in_seconds":{"type":"integer","minimum":1,"maximum":31536000,"description":"Lifetime in seconds: at most 31536000 (365 days); 7776000 (90 days) when absent.","example":7776000},"current_password":{"type":"string","minLength":1,"maxLength":1024,"description":"The account's current password, when the session signed in more than 10 minutes ago (ZEG-1401). Checked by the identity provider, never stored or logged; rate-limited per IP as a password change is."},"idempotency_key":{"type":"string","maxLength":255,"description":"Replays the first answer for 7 days (B-API-077); the `Idempotency-Key` header does the same and wins. Trimmed, cut to 128 characters."}},"required":["scopes","client_name"]},"AgentTokenList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentToken"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"ConnectionList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"Connection":{"type":"object","properties":{"id":{"type":"string","description":"The connection's public id: what PATCH and DELETE take (never a token).","example":"b4kq7xz2m9np"},"kind":{"type":"string","enum":["oauth","personal"],"description":"`oauth`: a client the person allowed on the consent page. `personal`: a personal token (`POST /tokens`)."},"name":{"type":"string","description":"The client's name.","example":"Claude"},"mark":{"type":"string","enum":["claude","chatgpt","cursor","generic"],"description":"Which client mark to draw (`claude`, `chatgpt`, `cursor`), chosen from where the client's registered redirects send codes, never from its name; `generic` for a first-party client, a loopback client, a personal token or any other."},"scopes":{"type":"array","items":{"type":"string","enum":["collections:read","collections:write","collections:delete","items:read","items:write","items:delete","profile:read","profile:write","sharing:write","settings:read","settings:write","player:control"]},"description":"Exact members of the twelve v2 scopes (B-API-189)."},"scopes_line":{"type":"string","description":"The scopes as one plain-words line (B-API-173).","example":"Read, change and delete your collections and items; read your profile"},"connected_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"Null until the connection's first request; then kept current to the minute."},"can_move_player":{"type":"boolean","description":"\"Can move the Player\" (B-API-208): on by default; Stop on the driving strip turns it off."},"expires_at":{"type":["string","null"],"format":"date-time","description":"A personal connection's token expires; an OAuth connection renews with its refresh token, so null."}},"required":["id","kind","name","mark","scopes","scopes_line","connected_at","last_used_at","can_move_player","expires_at"]},"ConnectionUpdate":{"type":"object","properties":{"can_move_player":{"type":"boolean","description":"Whether this client may move the Player (B-API-208)."}},"required":["can_move_player"],"additionalProperties":false},"DisconnectedAll":{"type":"object","properties":{"disconnected":{"type":"integer","description":"How many connections were ended (a personal token minted before connections existed counts as one)."}},"required":["disconnected"]},"AgentActivityList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentActivity"}},"pagination":{"$ref":"#/components/schemas/ActivityPagination"}},"required":["items","pagination"]},"AgentActivity":{"type":"object","properties":{"id":{"type":"string","description":"The write's outbox number, as a string."},"client":{"type":"string","description":"The connection that wrote, by its name.","example":"Claude"},"verb":{"type":"string","enum":["added","updated","created","tagged","moved","renamed","published","unpublished","deleted"],"description":"One of B-API-177's nine: the sentence uses no other."},"what":{"type":"string","example":"a note"},"collection":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The collection written in, when the person owns it or is an accepted member; null otherwise (the sentence then says \"a shared collection\") and for writes that belong to no collection, such as settings."},"item":{"type":["string","null"],"description":"The item written, when the write was about exactly one; else null."},"sentence":{"type":"string","description":"\"<client> <verb> <what> in <collection>\": the time is `at`.","example":"Claude added a note in Recipes"},"at":{"type":"string","format":"date-time"}},"required":["id","client","verb","what","collection","item","sentence","at"]},"ActivityPagination":{"allOf":[{"$ref":"#/components/schemas/Pagination"},{"type":"object","properties":{"total":{"type":"integer","description":"Exact count of the activity up to max(500, offset + limit) rows; beyond that it is that bound and `total_capped` is true."},"total_capped":{"type":"boolean","description":"True when there is more activity than `total` says (the count stopped at its bound)."}},"required":["total_capped"]}]},"PublishingPublishRequest":{"type":"object","properties":{"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Who may view it: private, restricted, registered or public (B-PUBLISH-004). Written when stated; otherwise the stored level stays, except that a level never stated becomes public (B-PUBLISH-003). On a published collection a lower level bumps the epoch. An adult collection is never published, at any level (R-ZEG-1610): see the operation."},"handle":{"type":"string","description":"Your username or one of your aliases (`profile.aliases.list`), without the @ (B-PUBLISH-016). Omitted: the handle the collection already has, else your default for publishing, else your username (B-PUBLISH-017). Locked while published (`publish_handle_locked`).","example":"mia.tom"},"slug":{"type":"string","description":"The address's second segment: lowercase letters, numbers and hyphens (anything else becomes a hyphen). Omitted: the one the collection has, else made from its name, unique among your collections (B-PUBLISH-020). Taken: `slug_taken`. On a published collection a different slug is ignored and the live one answered (B-PUBLISH-022).","example":"field-notes"},"dry_run":{"type":"boolean","description":"Decide everything and write nothing: the answer says the address, whether it changes (B-PUBLISH-019) and whether the plan's cap or an open secret-check finding would refuse (B-PUBLISH-129, 168). A dry run never scans."},"check_secrets":{"type":"boolean","description":"Run the secret check first and hold on a finding (`publish_held`), as a priced collection always does (B-PUBLISH-168). The check is deterministic: pattern and entropy rules, never a model."}},"additionalProperties":false},"CollectionPublishing":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when nothing needed changing."},"collection":{"$ref":"#/components/schemas/Collection"}},"required":["noop","collection"]},"PublishingUnpublishRequest":{"type":"object","properties":{"share_level":{"type":"string","enum":["private","restricted","registered","public"],"description":"Written when stated; otherwise the level stays (B-PUBLISH-002)."}},"additionalProperties":false},"PublishingDiscoveryRequest":{"type":"object","properties":{"searchable":{"type":"boolean","description":"True lists the collection in Discovery and public search; false takes it out. On only while published and public (B-PUBLISH-028)."}},"required":["searchable"],"additionalProperties":false},"SecretCheck":{"type":"object","properties":{"priced":{"type":"boolean","description":"A publish of this collection is held by a finding."},"scanned":{"type":"boolean","description":"A scan ran in this call."},"items":{"type":"integer","description":"Text items read (notes and text files)."},"unchecked_count":{"type":"integer"},"unchecked":{"type":"array","items":{"type":"object","properties":{"item":{"type":"string"},"item_name":{"type":"string"},"reason":{"type":"string","enum":["over_budget","partly_read","unreadable","binary"]}},"required":["item","item_name","reason"]},"description":"Up to 20 of the text items the check's bound left out or read only in part."},"findings":{"type":"array","items":{"$ref":"#/components/schemas/SecretFinding"},"description":"Open findings on live items, masked."},"open":{"type":"integer"},"held":{"type":"boolean","description":"A publish now would answer `publish_held`."}},"required":["priced","scanned","items","unchecked_count","unchecked","findings","open","held"]},"SecretFinding":{"type":"object","properties":{"id":{"type":"string","description":"The finding, for `publishing.mark_not_secret`."},"item":{"type":"string","description":"The item's id."},"item_name":{"type":"string"},"line":{"type":["integer","null"],"description":"1-based line of the item's text; null when not read by this call."},"in_description":{"type":"boolean","description":"Found in the item's description."},"kind":{"type":"string","description":"What it looks like: `an API key`, `a password`."},"rule":{"type":"string","description":"The deterministic rule that matched."},"masked":{"type":"string","description":"A fixed prefix and the last characters only (`sk-…9Qx`): never the value."},"status":{"type":"string","enum":["open","fixed","not_a_secret"]},"likely_example":{"type":["number","null"],"description":"A second opinion's probability that this is an example, shown beside the finding; it never decides the hold. Null when none is given."}},"required":["id","item","item_name","line","in_description","kind","rule","masked","status","likely_example"]},"SecretCheckRequest":{"type":"object","properties":{"only_if_priced":{"type":"boolean","description":"Scan only when the collection has a price (the Publish overlay's opening read); otherwise answer `scanned: false` with what is already open."}},"additionalProperties":false},"SecretFindingMarked":{"type":"object","properties":{"finding":{"$ref":"#/components/schemas/SecretFinding"},"open":{"type":"integer","description":"Findings still open: each still holds."},"held":{"type":"boolean"}},"required":["finding","open","held"]},"AliasList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Alias"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"AliasCreation":{"type":"object","properties":{"dry_run":{"type":"boolean"},"handle":{"type":"string","description":"The normalised handle that was checked."},"available":{"type":"boolean","description":"Always true: a handle that cannot be claimed is an error (`handle_taken`, `name_reserved`, `alias_limit_reached`, `name_screen_rejected`), never `available: false`."},"address":{"type":"string","description":"Its channel page, `/{handle}`."},"url":{"type":["string","null"]},"alias":{"allOf":[{"$ref":"#/components/schemas/Alias"},{"type":["object","null"],"description":"The claimed alias; null for a dry run."}]}},"required":["dry_run","handle","available","address","url","alias"]},"AliasCreateRequest":{"type":"object","properties":{"handle":{"type":"string","description":"The new handle, with or without the @; lowercased. A handle is 3 to 30 characters: lowercase letters, numbers and dots (also _ and -), with no dot at the start or end and never two dots in a row.","example":"mia.tom"},"collection_id":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"Claim it as this collection's own handle, making the collection a workspace (D-062, B-COLL-172): one of your top-level collections at the Members level (restricted) that has no handle yet. It counts as one of your channels; the workspace's page is /{handle}, and what is published under it sits at /{handle}/{slug}.","example":"b4kq7xz2m9np"},"dry_run":{"type":"boolean","description":"Run every check and claim nothing: the as-you-type answer (B-AUTH-162). It answers `available` or the very refusal a claim would meet."}},"required":["handle"],"additionalProperties":false},"AliasDeleteRequest":{"type":"object","properties":{"confirm":{"type":"boolean","description":"Required unless dry_run."},"dry_run":{"type":"boolean","description":"Report what deleting would do (the sheet of B-AUTH-168); change nothing."}},"additionalProperties":false},"AliasUpdate":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when nothing it named changed."},"alias":{"$ref":"#/components/schemas/Alias"}},"required":["noop","alias"]},"AliasUpdateRequest":{"type":"object","properties":{"display_name":{"type":["string","null"],"description":"Its public profile's name: at most 50 characters, trimmed; empty or null clears it (the page then shows the handle). On the username's row it is the profile's display name."},"bio":{"type":["string","null"],"description":"Its public profile's bio: at most 160 characters, trimmed; empty or null clears it. On the username's row it is the profile's bio."},"profile_hidden":{"type":"boolean","description":"true hides its public profile (`/{handle}` answers as a handle that does not exist); false shows it again. Its published collections keep their own addresses either way."}},"additionalProperties":false},"AliasDefault":{"type":"object","properties":{"noop":{"type":"boolean","description":"True when it was already the default."},"alias":{"$ref":"#/components/schemas/Alias"}},"required":["noop","alias"]},"Publisher":{"type":"object","properties":{"handle":{"type":"string","description":"The channel's handle, without the @."},"display_name":{"type":"string","description":"A username's channel shows the profile's display name; an alias its own display name (ZEG-1476), else its handle, and never the profile's (B-PUBLISH-149, D-043)."},"avatar":{"$ref":"#/components/schemas/Avatar"},"bio":{"type":["string","null"]},"links":{"type":"array","items":{"type":"string"},"maxItems":3},"follower_count":{"type":"integer","minimum":0},"public_collection_count":{"type":"integer","minimum":0,"description":"The published Public top-level collections: never a gated or a private one (B-PUBLISH-149)."},"profile_hidden":{"type":"boolean","description":"The owner hid this profile (ZEG-1476). Only ever true for the owner: to anyone else a hidden profile is the same `not_found` as a handle that never existed."},"viewer":{"type":"object","properties":{"is_owner":{"type":"boolean","description":"The caller owns this handle."},"following":{"type":"boolean","description":"The caller follows this channel."}},"required":["is_owner","following"]},"collections":{"type":"array","items":{"$ref":"#/components/schemas/PublisherCard"},"description":"The handle's published top-level collections, newest first, at most 200: Public ones with Discovery off included (R30), gated ones as gates; never a private collection or a sub-collection. A workspace's page lists what is published under its handle at any depth, and to someone outside the workspace only what they may read, never a gate."},"workspace":{"type":["object","null"],"properties":{"member":{"type":"boolean","description":"The caller is the workspace's owner or one of its accepted members."},"id":{"type":["string","null"],"description":"The workspace collection's public id, for its owner and members; else null."},"name":{"type":["string","null"],"description":"The workspace's name, for its owner and members; else null."}},"required":["member","id","name"],"description":"P3-32 (D-062): set when the handle is a workspace's (B-COLL-172); null for a username or an alias. Present in every answer."}},"required":["handle","display_name","avatar","bio","links","follower_count","public_collection_count","viewer","collections"]},"Avatar":{"type":["object","null"],"properties":{"focal":{"$ref":"#/components/schemas/Focal"},"urls":{"allOf":[{"$ref":"#/components/schemas/ImageUrls"},{"description":"Public, tokenless renditions at `/pub/u/{user}/{epoch}/{variant}` for a person's avatar, or `/pub/a/{alias}/{epoch}/{variant}` for an alias's own picture (R6, B-UPLOAD-171; ZEG-1476); a change moves them to the next epoch and the previous addresses stop answering."}]}},"required":["focal","urls"],"description":"A person's avatar (B-AUTH-158)."},"PublisherCard":{"type":"object","properties":{"collection":{"allOf":[{"$ref":"#/components/schemas/Collection"},{"type":["object","null"],"description":"The collection in the one collection shape, as the caller is shown it (an outsider's: `/pub/` URLs only, no owner account, counts of what they can see); null when it is gated."}]},"gate":{"allOf":[{"$ref":"#/components/schemas/PublicGate"},{"type":["object","null"],"description":"A Registered collection to someone signed out, or a Restricted one to someone outside it: its name, @handle, slug and the one action, and nothing else (B-PUBLISH-147, 150); null when the collection is readable."}]},"price_chip":{"$ref":"#/components/schemas/PriceChip"}},"required":["collection","gate","price_chip"]},"PriceChip":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["price","mixed","subscribers","included","bought","retired"]},"label":{"type":"string","description":"What the chip says, for this viewer: \"$9\", \"Includes paid items · $9\", \"Subscribers\", \"Included\", \"Bought · $9\" or \"No longer sold · still yours\"."}},"required":["kind","label"],"description":"The card's price chip for this caller (B-PUBLISH-161); null when the collection is free or gated."},"Sitemap":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"slug":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["handle","slug","updated_at"]},"description":"Published Public collections the owner listed in Discovery, newest first, adult ones left out (R317); at most 5,000."},"publishers":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["handle","updated_at"]},"description":"Handles with at least one published Public collection listed to a signed-out reader (the ones `publishers.get` resolves for them, R600), newest first; at most 5,000."},"truncated":{"type":"boolean","description":"Either list stopped at 5,000."}},"required":["collections","publishers","truncated"]},"Workspace":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"},"handle":{"type":"string","description":"The workspace's handle, without the @."},"address":{"type":"string","description":"The workspace's page, `/{handle}`."},"url":{"type":["string","null"]},"members_may_publish":{"type":"boolean"},"members_may_publish_publicly":{"type":"boolean"},"members":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMember"},"description":"The owner first, then the accepted members in the order they joined; at most 500."},"member_count":{"type":"integer","description":"Everyone in it, the owner included."},"publications":{"type":"array","items":{"$ref":"#/components/schemas/WorkspacePublication"},"description":"What is published under the handle that the caller may read, newest first; at most 500."}},"required":["collection","handle","address","url","members_may_publish","members_may_publish_publicly","members","member_count","publications"]},"WorkspaceMember":{"type":"object","properties":{"handle":{"type":"string","description":"Their username, without the @."},"display_name":{"type":["string","null"]},"role":{"type":"string","enum":["owner","member"]},"can_upload":{"type":"boolean"},"can_edit":{"type":"boolean","description":"May change items, and publish under the handle while members_may_publish is on."},"can_delete":{"type":"boolean"},"joined_at":{"type":["string","null"],"format":"date-time","description":"Null for the owner."}},"required":["handle","display_name","role","can_upload","can_edit","can_delete","joined_at"]},"WorkspacePublication":{"type":"object","properties":{"id":{"type":"string","description":"The published collection's public id."},"number":{"type":"integer"},"name":{"type":"string"},"share_level":{"type":"string","enum":["private","restricted","registered","public"]},"address":{"type":"string","example":"/acme/field-notes"},"url":{"type":["string","null"]},"published_at":{"type":["string","null"],"format":"date-time"},"parent_id":{"type":["string","null"],"description":"Its parent's public id; null for the workspace itself."}},"required":["id","number","name","share_level","address","url","published_at","parent_id"]},"CollectionLike":{"type":"object","properties":{"liked":{"type":"boolean","description":"Whether the caller likes it now."},"like_count":{"type":"integer","description":"Its likes now; never below 0."},"changed":{"type":"boolean","description":"False when the like was already in the state asked for (idempotent)."}},"required":["liked","like_count","changed"]},"LikedCollections":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"CollectionStats":{"type":"object","properties":{"id":{"type":"string","description":"The collection's public id."},"like_count":{"type":"integer"},"view_count":{"type":"integer","description":"All-time views: one per viewer per 24 hours, from an account or an anonymous session (B-PUBLISH-192)."},"follower_count":{"type":["integer","null"],"description":"Followers of the channel it is published under; null while it is not published."},"handle":{"type":["string","null"],"description":"That channel's handle."},"liked":{"type":"boolean","description":"The caller likes it."}},"required":["id","like_count","view_count","follower_count","handle","liked"]},"CollectionViewRecorded":{"type":"object","properties":{"counted":{"type":"boolean","description":"This open added a view."},"reason":{"type":["string","null"],"enum":["own","again",null],"description":"Why not: `own` (the owner's open is not a view) or `again` (this viewer already counted in the last 24 hours)."},"view_count":{"type":"integer"}},"required":["counted","reason","view_count"]},"CollectionViewRecord":{"type":"object","properties":{"session":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,128}$","description":"A signed-out visitor's session id: a random string the page keeps in the tab's sessionStorage (never a cookie), 16 to 128 characters. It is hashed before it is stored. A signed-in viewer sends none; their account is the viewer."}},"additionalProperties":false},"ChannelFollow":{"type":"object","properties":{"following":{"type":"boolean","description":"Whether the caller follows it now."},"follower_count":{"type":"integer","description":"The channel's followers now."},"changed":{"type":"boolean","description":"False when it was already so (idempotent)."},"handle":{"type":"string"}},"required":["following","follower_count","changed","handle"]},"FollowedChannels":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FollowedChannel"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"FollowedChannel":{"type":"object","properties":{"id":{"type":"string","description":"The alias's public id."},"handle":{"type":"string"},"type":{"type":"string","enum":["channel","alias","primary_username"],"description":"Always `channel` (ZEG-1476): whether a handle is its owner's username or an alias they added is never told to a follower. `alias` and `primary_username` are no longer sent and leave the document after one release."},"follower_count":{"type":"integer"},"followed_at":{"type":"string","format":"date-time"},"address":{"type":["string","null"],"example":"/mia.tom","description":"The channel's page; null while its owner hides its public profile (ZEG-1476)."},"url":{"type":["string","null"]}},"required":["id","handle","type","follower_count","followed_at","address","url"]},"ReportReceived":{"type":"object","properties":{"received":{"type":"boolean","enum":[true],"description":"The report is filed. It changes nothing by itself: only an operator's action does, and the publisher is never told who reported."}},"required":["received"]},"ReportCreate":{"type":"object","properties":{"reason":{"type":"string","enum":["spam","adult_unmarked","harassment","copyright","illegal","other"],"description":"Why: `spam` (spam or a scam), `adult_unmarked` (adult content that isn't marked), `harassment` (harassment or hate), `copyright` (someone else's work), `illegal` (illegal content) or `other`."},"note":{"type":"string","maxLength":2000,"description":"Detail, optional; up to 2000 characters."}},"required":["reason"],"additionalProperties":false},"FeedbackReceived":{"type":"object","properties":{"received":{"type":"boolean","enum":[true],"description":"The feedback is stored."}},"required":["received"]},"FeedbackCreate":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":4000,"description":"The message; 1 to 4000 characters."},"page":{"type":"string","maxLength":2048,"description":"The address of the page it was sent from (a path), kept with it."}},"required":["body"],"additionalProperties":false},"NotificationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"unread":{"type":"integer","description":"Unread and unarchived rows, all of them, not only the 50 listed: the bell's dot shows while this is above zero."}},"required":["data","unread"]},"Notification":{"type":"object","properties":{"id":{"type":"string","description":"The notification's id."},"kind":{"type":"string","description":"`share.invited`, `share.accepted`, `share.joined_by_link`, `share.updated`, `share.removed`, `share.left`, `access.requested`, `access.answered`, `access.withdrawn` or `access.resolved`."},"title":{"type":"string","description":"The row's first line, with the names as they were."},"detail":{"type":["string","null"],"description":"The second line: what an invitation offers (\"View, upload\"), a request's note, or the collection."},"created_at":{"type":"string","format":"date-time"},"read":{"type":"boolean"},"collection":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"description":"The collection it is about, while there is one."},"person":{"$ref":"#/components/schemas/NotificationPerson"},"link":{"type":["string","null"],"description":"The Studio address a tap opens: `/c/{id}`, and `/c/{id}?invitation=1` for an invitation; null when there is nothing to open."},"action":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["invitation","request"]},"collection":{"type":"string"},"request":{"type":"string"}},"required":["type","collection"],"description":"Accept and Decline, while the invitation (`sharing.accept` / `sharing.decline` of `collection`) or the request (`sharing.request_accept` / `sharing.request_decline` of `request`) still waits."}},"required":["id","kind","title","detail","created_at","read","collection","person","link","action"]},"NotificationPerson":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"username":{"type":"string"}},"required":["id","name","username"],"description":"The other person, as they were named."},"NotificationCount":{"type":"object","properties":{"count":{"type":"integer","description":"How many rows the call changed."}},"required":["count"]},"NotificationsRead":{"type":"object","properties":{"through":{"type":"string","format":"date-time","description":"Only rows made at or before this time are marked: the newest `created_at` the open list showed, so a row that arrived meanwhile stays unread."}},"additionalProperties":false},"NotificationArchived":{"type":"object","properties":{"archived":{"type":"boolean","enum":[true]}},"required":["archived"]},"AnnouncementList":{"type":"object","properties":{"now":{"type":"string","format":"date-time","description":"The server's clock when it answered: Studio judges each window from it."},"data":{"type":"array","items":{"$ref":"#/components/schemas/Announcement"},"description":"Every announcement whose window has not ended and that has started or starts within 24 hours, newest start first. An ended one is never listed."}},"required":["now","data"]},"Announcement":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"body_markdown":{"type":"string","description":"The body, as markdown."},"severity":{"type":"string","enum":["info","banner","blocking"],"description":"`info`: a bell row. `banner`: a bell row and the announcement strip. `blocking`: a bell row and the Terms card until its terms version is accepted."},"terms_version":{"type":["string","null"],"description":"A blocking one's; else null."},"active_from":{"type":"string","format":"date-time"},"active_until":{"type":["string","null"],"format":"date-time","description":"Null: it never ends."},"read":{"type":"boolean"},"dismissed":{"type":"boolean","description":"The strip's ✕ was pressed (a banner)."},"accepted":{"type":["boolean","null"],"description":"A blocking one: whether the person accepted its terms version; else null."}},"required":["id","title","body_markdown","severity","terms_version","active_from","active_until","read","dismissed","accepted"]},"AnnouncementMarked":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"TermsAccepted":{"type":"object","properties":{"version":{"type":"string"},"accepted_at":{"type":"string","format":"date-time"}},"required":["version","accepted_at"]},"TermsAccept":{"type":"object","properties":{"version":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,32}$","description":"The terms version on the Terms card.","example":"2026-12"}},"required":["version"],"additionalProperties":false},"MailPreferences":{"type":"object","properties":{"notification_mail":{"type":"boolean","description":"Notification mail (product events) on or off; default on (B-OPSADMIN-035)."},"announcements":{"type":"boolean","description":"Announcement mail (campaigns); default subscribed."},"events":{"$ref":"#/components/schemas/MailEventChoices"},"suppressed":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["bounce","complaint","manual"]},"since":{"type":"string","format":"date-time"}},"required":["reason","since"],"description":"Set when the account's address is on the suppression list (a hard bounce, a complaint or an operator): notification, announcement and reply mail to it has stopped (B-OPSADMIN-043)."}},"required":["notification_mail","announcements","events","suppressed"]},"MailEventChoices":{"type":"object","properties":{"notify_invited":{"type":"boolean"},"notify_accepted":{"type":"boolean"},"notify_joined":{"type":"boolean"},"notify_requested":{"type":"boolean"},"notify_updated":{"type":"boolean"},"notify_removed":{"type":"boolean"},"notify_left":{"type":"boolean"}},"required":["notify_invited","notify_accepted","notify_joined","notify_requested","notify_updated","notify_removed","notify_left"],"description":"One switch per sharing mail (R392): an invitation by name, an invitation accepted, someone joining by link, an access request, a permission change, a removal, a member leaving. A kind turned off sends no mail even while notification mail is on."},"MailPreferencesChange":{"type":"object","properties":{"notification_mail":{"type":"boolean"},"announcements":{"type":"boolean"},"events":{"type":"object","properties":{"notify_invited":{"type":"boolean"},"notify_accepted":{"type":"boolean"},"notify_joined":{"type":"boolean"},"notify_requested":{"type":"boolean"},"notify_updated":{"type":"boolean"},"notify_removed":{"type":"boolean"},"notify_left":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"Unsubscribed":{"type":"object","properties":{"unsubscribed":{"type":"boolean","enum":[true]},"category":{"type":"string","enum":["notifications","announcements"]},"still_arrives":{"type":"string"}},"required":["unsubscribed","category","still_arrives"]},"PushConfig":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Push is configured here: the signing keys are present and make a pair. False: nothing is stored or sent."},"public_key":{"type":["string","null"],"description":"The VAPID public key (base64url, 65 bytes), the browser's `applicationServerKey`; null while push is off."},"devices":{"type":"integer","description":"Your devices subscribed now (revoked ones excluded)."}},"required":["enabled","public_key","devices"]},"PushSubscribed":{"type":"object","properties":{"subscribed":{"type":"boolean","description":"True: a live subscription for this endpoint is stored for you, bound to this session. False (`push.rebind` only): there was none it may re-bind."},"created":{"type":"boolean","description":"False when this browser was already stored for you (its keys are refreshed)."}},"required":["subscribed","created"]},"PushSubscribe":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048,"description":"The browser's push address (`PushSubscription.endpoint`), https."},"keys":{"type":"object","properties":{"p256dh":{"type":"string","maxLength":120,"description":"The subscription's public key."},"auth":{"type":"string","maxLength":64,"description":"The subscription's auth secret."}},"required":["p256dh","auth"]},"user_agent":{"type":["string","null"],"maxLength":512}},"required":["endpoint","keys"]},"PushUnsubscribed":{"type":"object","properties":{"removed":{"type":"boolean","description":"False when no live subscription matched."}},"required":["removed"]},"PushUnsubscribe":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048}},"required":["endpoint"]},"PushTest":{"type":"object","properties":{"status":{"type":"string","enum":["sent","failed"]},"devices":{"type":"integer"},"accepted":{"type":"integer"},"removed":{"type":"integer","description":"Devices whose browser said the subscription is gone; they are removed."}},"required":["status","devices","accepted","removed"]},"Payouts":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether payouts are available in this environment: Stripe is set up and creator selling is switched on here (false while selling is off, R631)."},"state":{"type":"string","enum":["not_started","incomplete","pending","complete"],"description":"Payouts set-up with Stripe: not_started (Set up payouts), incomplete (details still owed to Stripe), pending (Stripe is checking them) or complete (Payouts set up · Stripe)."},"account":{"$ref":"#/components/schemas/PayoutsAccountFlags"},"plan":{"type":"object","properties":{"plan":{"type":"string"},"selling_allowed":{"type":"boolean"},"platform_fee_bps":{"type":["integer","null"],"description":"The platform fee in hundredths of a percent (1000 = 10 %)."}},"required":["plan","selling_allowed","platform_fee_bps"]},"creator_terms":{"type":"object","properties":{"version":{"type":"string"},"text":{"type":"string"},"accepted_at":{"type":["string","null"],"format":"date-time"}},"required":["version","text","accepted_at"]},"may_charge":{"type":"boolean","description":"Whether a price may be set: a paid plan, payouts complete and the creator terms accepted (B-PUBLISH-165)."},"missing":{"type":"array","items":{"type":"string","enum":["paid_plan","payouts","creator_terms"]}},"balance":{"type":["object","null"],"properties":{"available":{"type":"array","items":{"type":"object","properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string"}},"required":["amount_cents","currency"]}},"pending":{"type":"array","items":{"type":"object","properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string"}},"required":["amount_cents","currency"]}}},"required":["available","pending"],"description":"With ?balance=true once payouts are complete: Stripe's balance."},"next_payout":{"type":["object","null"],"properties":{"amount_cents":{"type":"integer"},"currency":{"type":"string"},"arrival_date":{"type":"string","format":"date-time"}},"required":["amount_cents","currency","arrival_date"],"description":"With ?balance=true: the next payout Stripe has scheduled."},"statement":{"type":"object","properties":{"month":{"type":"string","example":"2026-11"},"sales":{"type":"integer"},"sales_cents":{"type":"integer"},"platform_fee_cents":{"type":"integer"},"card_costs_cents":{"type":"integer","description":"Estimated from the fee schedule; Stripe's own statement is exact."},"refunds_cents":{"type":"integer"},"receive_cents":{"type":"integer"}},"required":["month","sales","sales_cents","platform_fee_cents","card_costs_cents","refunds_cents","receive_cents"]},"fee_schedule":{"type":"object","properties":{"card_percent_bps":{"type":"integer"},"card_fixed_cents":{"type":"integer"},"payout_percent_bps":{"type":"integer"},"verified_on":{"type":["string","null"]}},"required":["card_percent_bps","card_fixed_cents","payout_percent_bps","verified_on"]},"note":{"type":"string"}},"required":["configured","state","account","plan","creator_terms","may_charge","missing","balance","next_payout","statement","fee_schedule","note"],"description":"A publisher's payouts with Stripe Connect Express and who may charge (B-AUTH-180, 181). Money moves only on Stripe's own pages (B-API-181)."},"PayoutsAccountFlags":{"type":["object","null"],"properties":{"charges_enabled":{"type":"boolean"},"payouts_enabled":{"type":"boolean"},"details_submitted":{"type":"boolean"}},"required":["charges_enabled","payouts_enabled","details_submitted"]},"PayoutsOnboarding":{"allOf":[{"$ref":"#/components/schemas/PayoutsLink"},{"type":"object","properties":{"state":{"type":"string","enum":["not_started","incomplete","pending","complete"]}},"required":["state"]}]},"PayoutsLink":{"type":"object","properties":{"url":{"type":"string","description":"Stripe's own page: open it in the person's browser."}},"required":["url"]},"PayoutsOnboard":{"type":"object","properties":{"return_path":{"type":"string","maxLength":300,"description":"Where in Studio to come back to (a path, e.g. /profile#payouts); `payouts=return` or `payouts=refresh` is added to it."}}},"PayoutsRefreshed":{"type":"object","properties":{"state":{"type":"string","enum":["not_started","incomplete","pending","complete"]}},"required":["state"]},"CreatorTermsAccepted":{"type":"object","properties":{"version":{"type":"string"},"accepted_at":{"type":"string","format":"date-time"}},"required":["version","accepted_at"]},"CreatorTermsAccept":{"type":"object","properties":{"version":{"type":"string","maxLength":32,"example":"2026-11-13"}},"required":["version"]},"DiscoveryBrowse":{"type":"object","properties":{"row":{"type":"string","enum":["trending","channels","browse","following","liked","mine","for_you"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveryItem"},"description":"The row's collections in the server's order (B-PUBLISH-178); empty for the Channels row."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveryChannel"},"description":"The Channels row's publishers (B-PUBLISH-183); empty for every other row."},"pagination":{"$ref":"#/components/schemas/Pagination"},"hidden":{"type":"integer","minimum":0,"description":"With a tag filter: how many collections the viewer's Content setting hid that it would have matched (\"n hidden by your content settings\", B-PUBLISH-184)."},"tags":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveryTag"},"description":"Browse's first page: the tags of the feed with their counts, most used first, for the filter's chips (B-PUBLISH-176)."}},"required":["row","items","channels","pagination","hidden","tags"]},"DiscoveryItem":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"},"adult":{"type":"boolean","description":"The adult flag (B-PUBLISH-137). Hide adult content (Settings › Content, on by default and for every caller with no account) leaves such collections out altogether, so it is true only for a viewer who turned Hide off: the cover is then the blurred rendition with the Adult label (B-PUBLISH-184)."},"id_match":{"type":"boolean","description":"Pinned first because the query was this collection's number (B-PUBLISH-061); the app badges it \"ID match\"."},"relevance":{"type":"integer","minimum":0,"maximum":100,"description":"The `for_you` row only (B-PUBLISH-174): how likely the decision model judged that you want this collection, a whole percent; the card shows it quietly (\"94 % for you\")."},"price_chip":{"allOf":[{"$ref":"#/components/schemas/PriceChip"},{"description":"The card's price chip for this caller (B-PUBLISH-161); null when the collection is free."}]}},"required":["collection","adult","id_match","price_chip"]},"DiscoveryChannel":{"type":"object","properties":{"handle":{"type":"string","description":"The channel's handle, without the @."},"display_name":{"type":"string","description":"A username's channel shows the profile's display name; an alias shows its handle (D-043)."},"avatar":{"$ref":"#/components/schemas/Avatar"},"follower_count":{"type":"integer","minimum":0},"public_collection_count":{"type":"integer","minimum":0,"description":"The Public collections it has listed in Discovery."},"following":{"type":"boolean","description":"The caller follows this channel."},"own":{"type":"boolean","description":"The caller's own channel: there is no Follow on it."}},"required":["handle","display_name","avatar","follower_count","public_collection_count","following","own"]},"DiscoveryTag":{"type":"object","properties":{"tag":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["tag","count"]},"DiscoverySearch":{"type":"object","properties":{"query":{"type":"string","description":"The query as read: trimmed, at most 100 characters."},"items":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveryItem"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"hidden":{"type":"integer","minimum":0,"description":"How many collections the viewer's Content setting hid that the query would have matched."}},"required":["query","items","pagination","hidden"]},"OAuthClientInformation":{"type":"object","properties":{"client_id":{"type":"string"},"client_id_issued_at":{"type":"integer"},"client_secret":{"type":"string","description":"A new confidential client's secret: in this answer only."},"client_secret_expires_at":{"type":"integer"},"client_name":{"type":"string"},"redirect_uris":{"type":"array","items":{"type":"string"}},"grant_types":{"type":"array","items":{"type":"string"}},"response_types":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_method":{"type":"string","enum":["none","client_secret_basic","client_secret_post"]}},"required":["client_id","client_id_issued_at","client_name","redirect_uris","grant_types","response_types","token_endpoint_auth_method"]},"OAuthClientMetadata":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":10},"client_name":{"type":"string","maxLength":100},"logo_uri":{"type":"string"},"token_endpoint_auth_method":{"type":"string","enum":["none","client_secret_basic","client_secret_post"]},"grant_types":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":20,"description":"Must include `authorization_code`. The client is registered with the ones this server offers (`authorization_code`, `refresh_token`); any other is dropped, not refused (RFC 7591 §2). At most 20 entries of at most 200 characters."},"response_types":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":20,"description":"Must include `code`, the only one this server answers. At most 20 entries of at most 200 characters."}},"required":["redirect_uris"]},"OAuthTokens":{"type":"object","properties":{"access_token":{"type":"string","description":"Opaque, `zz_` and 43 characters; 1 hour; stored only as its peppered hash."},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer","example":3600},"refresh_token":{"type":"string","description":"`zzr_` and 43 characters; 90 days, renewed at each rotation (R232). Absent for a client registered without the `refresh_token` grant."},"scope":{"type":"string","example":"collections:read collections:write items:read"}},"required":["access_token","token_type","expires_in","scope"]},"OAuthConsentFlow":{"type":"object","properties":{"client":{"type":"object","properties":{"client_id":{"type":"string"},"name":{"type":"string","description":"As registered; the consent page shows it, never a fetched logo (P3-02)."},"first_party":{"type":"boolean"}},"required":["client_id","name","first_party"]},"redirect_uri":{"type":"string"},"redirect_host":{"type":"string","description":"The host the code goes back to, which the consent page names (MCP authorisation, localhost redirect risks)."},"scopes":{"type":"array","items":{"type":"string","enum":["collections:read","collections:write","collections:delete","items:read","items:write","items:delete","profile:read","profile:write","sharing:write","settings:read","settings:write","player:control"]},"description":"What Allow grants: requested and allowed to the client (B-API-172, R233)."},"resource":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["client","redirect_uri","redirect_host","scopes","resource","expires_at"]},"OAuthConsentRedirect":{"type":"object","properties":{"redirect_to":{"type":"string"}},"required":["redirect_to"]},"OAuthConsentDecision":{"type":"object","properties":{"flow":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"The `flow` of Studio's `/oauth/consent?flow=` address."},"decision":{"type":"string","enum":["allow","deny"]}},"required":["flow","decision"]},"AgentPing":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"user_id":{"type":"string","description":"The public id of the account the token acts for."},"client_name":{"type":["string","null"]},"token_id":{"type":"string","description":"The token's public id."},"scopes":{"type":"array","items":{"type":"string","enum":["collections:read","collections:write","collections:delete","items:read","items:write","items:delete","profile:read","profile:write","sharing:write","settings:read","settings:write","player:control"]}},"expires_at":{"type":"string","format":"date-time"},"queue_waiting":{"type":["integer","null"],"description":"How many prompts wait in the person's AI queue (ZEG-1446); null when it could not be read. When it is more than 0, offer: \"Would you like me to process the queue?\" and, on a yes, call queue_list."}},"required":["ok","user_id","client_name","token_id","scopes","expires_at","queue_waiting"]},"AgentUsage":{"type":"object","properties":{"plan":{"type":"string","example":"free"},"window":{"type":"string","enum":["month"]},"limit":{"type":["integer","null"],"description":"Agent operations allowed this calendar month (B-API-231); null when there is no monthly cap: Personal, Pro and an account in its trial (R406, B-AUTH-192)."},"trial_ends_at":{"type":["string","null"],"format":"date-time","description":"While the account's three-day trial runs (B-AUTH-192), when it ends; null otherwise. The plan stays Free throughout."},"ops_used":{"type":["integer","null"],"description":"Agent operations used this month, this call included when an agent makes it; null when the counter could not be read."},"resets_at":{"type":"string","format":"date-time","description":"00:00 UTC on the 1st of next month."}},"required":["plan","window","limit","trial_ends_at","ops_used","resets_at"]},"Boot":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","description":"The account's public id."},"username":{"type":"string"},"plan":{"type":"string"},"channel_seq":{"type":"integer","description":"The person's live-update channel `user:{id}`'s current `channel_seq` (P2-10, R146), read with the library: a player drops a message numbered at most this, and re-reads the library when one skips past the next. Always present."},"seeded_collection_id":{"type":["string","null"],"description":"The public id of the account's Getting Started copy (ZEG-1337), Trash included; null with none, or with a copy made before the marker existed. A collection the person made is one that is not this (the push nudge, B-CLIENT-218). Always present."},"library_tabs":{"type":"object","properties":{"purchased":{"type":"boolean"},"subscribed":{"type":"boolean"},"channels":{"type":"array","items":{"type":"string"}}},"required":["purchased","subscribed","channels"],"description":"P3-37 (B-PUBLISH-170, 171; D-039): which tabs of what the person bought appear. `purchased` once they hold a purchase, `subscribed` once a subscription runs, and `channels`: the handles of subscribed channels shown as tabs of their own. Always present."},"verification":{"$ref":"#/components/schemas/Verification"}},"required":["id","username","plan","verification"]},"collections":{"type":"array","items":{"$ref":"#/components/schemas/LibraryCollection"},"description":"The library (B-COLL-082): what the Private and Workspaces tabs list by default, as `collections.list` with `tab` answers them (the person's own live, non-archived collections and those they are a member of, a sub-collection only with Show in my library), each a card with `viewer_permissions` (B-API-157) and `capabilities` (R128), sorted by name. Never paged."},"ui_state":{"$ref":"#/components/schemas/UiState"},"page":{"type":["object","null"],"properties":{"collection_id":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"total":{"type":"integer","description":"All the collection's visible items."},"next_offset":{"type":["integer","null"],"description":"Where `items.list` continues, or null when the page holds every item."},"channel_seq":{"type":"integer","description":"`collection:{collection_id}`'s current `channel_seq` (P2-10, R146), read with the page, as `items.list` answers it. Always present."},"channel_epoch":{"type":"integer","minimum":1,"description":"ZEG-1413: The page's collection's live channel epoch: the channel is `collection:{id}` at 1 and `collection:{id}:{channel_epoch}` from 2. It moves on (to the time of the move, in ms) when someone loses the right to join, and a player that joins the name it names hears every later message. Left out for a reader who is neither a person nor their agent (who joins no channel)."}},"required":["collection_id","items","total","next_offset"],"description":"The first page of the collection in `ui_state`, as `items.list` answers it with its byte URLs in one batch: at most 24 items, fewer when more would take the answer as sent (compressed) past 50,000 bytes. Null when no collection is selected."}},"required":["user","collections","ui_state","page"]},"Verification":{"type":"object","properties":{"state":{"type":"string","enum":["none","grace","final_stretch","gated","lapsed","verified","grandfathered"],"description":"From the account's own markers, never the identity provider's email_confirmed_at (B-AUTH-137): none (no marker, as Google accounts), grace, final_stretch (under 24 h left), gated (past the deadline), lapsed, verified or grandfathered."},"deadline":{"type":["string","null"],"format":"date-time","description":"The end of the grace window."}},"required":["state","deadline"]},"LibraryCollection":{"type":"object","properties":{"number":{"type":"integer","description":"The number people see for it (R103)."},"id":{"type":"string","description":"The public id (B-API-225).","example":"b4kq7xz2m9np"},"name":{"type":"string"},"share_level":{"type":"string","enum":["private","restricted","registered","public"]},"published":{"type":"boolean"},"item_count":{"type":"integer","description":"Live items, sub-collection tiles included."},"viewer_permissions":{"$ref":"#/components/schemas/ViewerPermissions"},"description":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"parent_id":{"type":["string","null"],"description":"The parent's public id: a sub-collection listed with Show in my library."},"sub_collection_count":{"type":"integer"},"cover_placeholder_kind":{"type":["string","null"],"enum":["image","video","audio","song","youtube","spotify-song","spotify-playlist","web","page","link","pdf","word","excel","powerpoint","document","ebook","code","markdown","data","3d","zip","archive","download","unknown","log","lyrics","memory","notes","poem","prompt","specification","summary","tutorial","skill",null],"description":"With no cover chosen (R260), the default-thumbnail kind of the first item, which the card draws when that item has no picture or its picture cannot be drawn; the same as `collections.get`'s `cover.placeholder_kind`. Null for an empty collection (the card draws the collection glyph), for a first item that is a sub-collection with no picture, and for a chosen cover. Always present."},"cover_placeholder_platform":{"type":["string","null"],"enum":["instagram","facebook","x","tiktok","snapchat","reddit","threads","linkedin","pinterest","bluesky","mastodon","tumblr","twitch","telegram",null],"description":"ZEG-1555 (R632): the platform whose tile the card draws when it shows no picture; the same as `collections.get`'s `cover.placeholder_platform`. Null otherwise."},"social":{"$ref":"#/components/schemas/CollectionSocial"},"public_url":{"type":["string","null"],"description":"ZEG-1475: the public address while published (what `collections.get`'s `publication.url` says), else null: a card opens or shares it with no further read. Optional in the schema: an API from before ZEG-1475 leaves it out, and a client then reads the collection once."},"price_chip":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["price","mixed","subscribers","included","bought","retired"]},"label":{"type":"string","description":"What the chip says, for this viewer: \"$9\", \"Includes paid items · $9\", \"Subscribers\", \"Included\", \"Bought · $9\" or \"No longer sold · still yours\"."}},"required":["kind","label"],"description":"The library view (`tab`, `q`, `tags`, `sort` or `include`) and `/boot`'s library: on the person's own collection, the price chip Discovery's card shows for it (\"$9\", \"Includes paid items · $9\", \"Subscribers\"); null on someone else's and on what is not sold. Absent from the agent listing."},"description_format":{"type":"string","enum":["plain","markdown"],"description":"How the description is written: plain or markdown (B-COLL-143). Always present."},"show_in_library":{"type":"boolean","description":"A sub-collection is listed in the library tabs only when this is on (B-COLL-148). Always present."},"owner_handle":{"type":"string","description":"The owner's username, which a Workspaces card names (B-SHARE-105). Always present."},"last_activity_at":{"type":"string","format":"date-time","description":"Latest activity, kept by the database: what Most recent sorts by (B-COLL-133). Always present."},"channel_seq":{"type":"integer","description":"The live-update channel `collection:{id}`'s current `channel_seq` (P2-10, R146): the number of the last message sent on it, 0 before the first, read with the rest of this answer. A player drops a message numbered at most this, and re-reads the collection when one skips past the next. Always present."},"channel_epoch":{"type":"integer","minimum":1,"description":"ZEG-1413: The collection's live channel epoch: the channel is `collection:{id}` at 1 and `collection:{id}:{channel_epoch}` from 2. It moves on (to the time of the move, in ms) when someone loses the right to join, and a player that joins the name it names hears every later message. Left out for a reader who is neither a person nor their agent (who joins no channel)."},"cover_urls":{"type":["object","null"],"properties":{"variants":{"type":"object","additionalProperties":{"type":"string"}},"expires_at":{"type":["string","null"],"format":"date-time"}},"required":["variants","expires_at"],"description":"The cover's renditions: the same URLs as `cover.urls` (P2-05). Null with no cover, or when the caller may not read its bytes. Always present."},"capabilities":{"$ref":"#/components/schemas/Capabilities"},"shared":{"type":"boolean","description":"The owner's alone (ZEG-1448): true when anyone besides the owner is in it: an accepted member, an open invitation or a live invite link. With published, what Studio's Private, Shared and Public say; a Private one is one a clone may go into (apart from its parents). Absent for anyone but the owner."}},"required":["number","id","name","share_level","published","item_count","viewer_permissions"],"description":"A library collection as a card shows it; `collections.get` answers the whole collection."},"UiState":{"type":"object","properties":{"collection_id":{"type":["string","null"],"description":"The selected collection's public id: where the person was (B-COLL-094)."},"item_id":{"type":["string","null"],"description":"The selected item's public id."},"view_mode":{"type":["string","null"],"enum":["carousel","grid",null]},"playback_position":{"type":["number","null"],"description":"Seconds into the selected item's media."},"library_tab":{"type":"string","enum":["private","workspaces","public"],"description":"The library tab used last, which the Player opens on; private until one is written (B-COLL-168, R20). Always present."},"source":{"type":"string","enum":["user","agent"],"description":"Who moved the person last."},"client_id":{"type":["string","null"],"description":"The client of the last write (its client name)."},"updated_at":{"type":"string","format":"date-time","description":"The last write; the account's creation time while nothing was ever written."},"cleared":{"type":"array","items":{"type":"string","enum":["collection_id","item_id"]},"description":"Stored fields this read dropped because the person can no longer read what they named (B-API-091): a lost collection clears both ids, a lost item falls back to the collection's first item. Saved, so the next read is clean. Empty on a write's answer."}},"required":["collection_id","item_id","view_mode","playback_position","source","client_id","updated_at","cleared"]},"UiStateUpdate":{"type":"object","properties":{"collection_id":{"type":["string","null"],"pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"Select a collection and its first item (none when it is empty); with `item_id: null`, the collection alone. Null clears the selection. A collection the person cannot read is 404.","example":"b4kq7xz2m9np"},"item_id":{"type":["string","null"],"minLength":1,"maxLength":120,"description":"Select an item and its collection; wins over `collection_id`. Null clears the item, keeping the collection. A live item the person cannot read is 404.","example":"q7rt2bx9kz4m"},"view_mode":{"type":["string","null"],"enum":["carousel","grid",null]},"playback_position":{"type":["number","null"],"minimum":0,"maximum":604800,"description":"Seconds, 0 to 604800; null clears it."},"library_tab":{"type":"string","enum":["private","workspaces","public"],"description":"The library tab the person is on (B-COLL-168)."},"source":{"type":"string","enum":["user","agent"],"description":"Who moved the person: `user` for a person, `agent` for an agent."}},"additionalProperties":false},"PlayerNavigateAnswer":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true],"description":"The command was issued."},"accepted":{"type":"boolean","description":"A tab acknowledged the command and did not refuse it."},"command":{"type":"string","enum":["navigate"]},"args":{"type":"object","properties":{"destination":{"type":["object","null"],"additionalProperties":{},"description":"Where the command goes, as Studio's address list names it; null when it only acts on the stage."},"play":{"type":"boolean"},"fullscreen":{"type":"boolean"},"interval_ms":{"type":"number"}},"required":["destination"],"description":"What the open Studio was asked to do."},"nonce":{"type":"string","description":"The command's id; a tab acts on it once."},"issued_at":{"type":"string","format":"date-time"},"delivered":{"anyOf":[{"type":"boolean","enum":[true]},{"type":"string","enum":["timeout"]}],"description":"`true`: an open Studio acknowledged the command. `\"timeout\"`: none did within two seconds; the stored place still moved, so the person's next Studio opens there."},"rejected":{"type":"string","maxLength":120,"description":"Why a tab refused it, when it did: unsupported_for_video, no_participating_media, no_item, or unsaved_edits (the person has a changed draft open in Studio and was asked to save or discard it; try again once they have)."},"detail":{"type":"string"},"hint":{"type":"string","description":"On a timeout: where the person opens Studio."},"waited_ms":{"type":"integer"}},"required":["ok","accepted","command","args","nonce","issued_at","delivered","waited_ms"]},"PlayerNavigate":{"type":"object","properties":{"address":{"type":"string","maxLength":2048,"description":"A path from Studio's address list, such as \"/c/{id}/i/{id}?view=grid\", \"/settings/playback\" or \"/connect\". Give this or `destination`.","example":"/settings/appearance"},"destination":{"type":"object","properties":{"surface":{"type":"string","description":"One of: library, tab, search, user-library, bought, trash, collection, sub-collection, item, stage, fullscreen, play, play-settings, edit, delete, publish, share, invitation, profile, profile-section, delete-account, plan-compare, settings, settings-section, consent, connect, public-collection, bookmarks, bookmark, results. Anything else is refused with the allowed destinations."}},"required":["surface"],"additionalProperties":{},"description":"A named destination: `surface` and its arguments (ids are the 12-character ids the tools return). Surfaces: library; tab (tab); search (tab, q, tag, sort); user-library (library); bought (tab, handle); trash; collection (trail, collection); sub-collection (trail, collection); item (trail, collection, item); stage (trail, collection, item, view); fullscreen (trail, collection, item); play (trail, collection, item); play-settings (trail, collection); edit (trail, collection); delete (trail, collection); publish (trail, collection); share (trail, collection, section); invitation (trail, collection); profile; profile-section (section); delete-account; plan-compare; settings; settings-section (section); consent (flow); connect; public-collection (handle, slug); bookmarks; bookmark (bookmark); results (title, collection_ids). tab: private, workspaces, public; sort: recent, liked, viewed, az, manual; view: carousel, grid; profile section: you, sign-in, handles, plan; settings section: appearance, playback, content, notifications, library. Ids are the 12-character ids the tools return; a sub-collection's trail lists its ancestors' ids from the top. A results destination shows a set of collection_ids (at most 100 of them), with an optional title, as a grid of the ones the person can read, with Save bookmark and Dismiss.","example":{"surface":"item","collection":"b4kq7xz2m9np","item":"x7dk2mq9vb4f"}},"play":{"type":"boolean","description":"On the stage (a collection, an item, the stage, fullscreen or Play): true starts Play from the item on screen, false stops it. With no address or destination it acts on the stage on screen (B-API-221)."},"fullscreen":{"type":"boolean","description":"On the stage: true opens the item in fullscreen (not a video), false leaves fullscreen (B-API-221)."},"interval_ms":{"type":"number","description":"With play: true, how long each timed item stays, 1000 to 20000 milliseconds, for this run only; items that play to their end still do (B-MEDIA-084).","minimum":1000,"maximum":20000}},"additionalProperties":false},"PlayerCommandAckAnswer":{"type":"object","properties":{"acknowledged":{"type":"boolean","description":"True when this was the first acknowledgement of the nonce; false for a late tab or a command already replaced."}},"required":["acknowledged"]},"PlayerCommandAck":{"type":"object","properties":{"nonce":{"type":"string","format":"uuid","description":"The command's nonce, from its live message."},"rejected":{"type":"string","minLength":1,"maxLength":120,"description":"Why this tab refused the command (B-MEDIA-082); absent when it acted."},"detail":{"type":"string","maxLength":500}},"required":["nonce"],"additionalProperties":false},"Settings":{"type":"object","properties":{"theme":{"type":"string","enum":["dark","light","system"],"description":"Dark (the default), Light, or System, which follows the device (B-CLIENT-187)."},"playback_defaults":{"$ref":"#/components/schemas/PlaybackSettings"},"library":{"type":"object","properties":{"cards_across_phone":{"type":"integer"},"cards_across_desktop":{"type":["integer","null"]},"show_descriptions":{"type":"boolean"}},"required":["cards_across_phone","cards_across_desktop","show_descriptions"],"description":"Library display defaults: cards across on phone and on desktop (null: by the window's width, 3 to 6) and whether cards show descriptions (B-COLL-138)."},"content":{"type":"object","properties":{"hide_adult":{"type":"boolean"},"blur_adult":{"type":"boolean"}},"required":["hide_adult","blur_adult"]},"uploads":{"type":"object","properties":{"markdown_as_notes":{"type":"boolean"}},"required":["markdown_as_notes"]}},"required":["theme","playback_defaults","library"],"description":"The account's preferences, complete: a key never set reads as its default. Profile values (display name, bio, links) are profile.get's (R51)."},"PlaybackSettings":{"type":"object","properties":{"image":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"}},"required":["on","seconds"]},"video":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"},"to_end":{"type":"boolean"}},"required":["on","seconds","to_end"]},"audio":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"},"to_end":{"type":"boolean"}},"required":["on","seconds","to_end"]},"embed":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"}},"required":["on","seconds"]},"other":{"type":"object","properties":{"on":{"type":"boolean"},"seconds":{"type":"integer"}},"required":["on","seconds"]},"loop":{"type":"boolean"},"shuffle":{"type":"boolean"},"start_fullscreen":{"type":"boolean"},"fullscreen_exit":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["close"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["button"]},"label":{"type":"string"}},"required":["kind","label"]},{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"]}]},"after_start":{"type":"string","enum":["nothing","first_media_item","collection"]},"pin_first_item":{"type":"boolean"}},"required":["image","video","audio","embed","other","loop","shuffle","start_fullscreen","fullscreen_exit","after_start","pin_first_item"],"description":"What every new collection copies when it is created; existing collections keep their own (B-COLL-153)."},"SettingsUpdate":{"type":"object","properties":{"theme":{"type":"string","enum":["dark","light","system"],"description":"Dark (the default), Light or System, which follows the device."},"playback_defaults":{"type":"object","properties":{"image":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."}},"additionalProperties":false},"video":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."},"to_end":{"type":"boolean","description":"Play to the media's end; seconds stays the fallback."}},"additionalProperties":false},"audio":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."},"to_end":{"type":"boolean","description":"Play to the media's end; seconds stays the fallback."}},"additionalProperties":false},"embed":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."}},"additionalProperties":false,"description":"YouTube and Vimeo embeds."},"other":{"type":"object","properties":{"on":{"type":"boolean","description":"Whether items of this kind take part in a run."},"seconds":{"type":"integer","minimum":1,"maximum":20,"description":"Whole seconds, 1 to 20."}},"additionalProperties":false,"description":"Everything else: notes, PDFs, pages, links."},"loop":{"type":"boolean","description":"Start again after the last item (off by default, R75)."},"shuffle":{"type":"boolean","description":"Visit the items in a shuffled order."},"start_fullscreen":{"type":"boolean","description":"Play enters fullscreen."},"fullscreen_exit":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["close"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["button"]},"label":{"type":"string","maxLength":30,"description":"The button's text, 1 to 30 characters, trimmed; \"Start Here\" when omitted."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"],"additionalProperties":false}],"description":"The fullscreen exit control (D-059): the × that leaves fullscreen (close, the default); a button that does the same, labelled with at most 30 characters (\"Start Here\" by default); or none (no exit control; Escape and Back still leave)."},"after_start":{"type":"string","enum":["nothing","first_media_item","collection"],"description":"What the labelled button does after it leaves fullscreen (D-059): nothing (the default); first_media_item plays the next item if it is video or audio; collection starts Play at the next item."},"pin_first_item":{"type":"boolean","description":"Keep the item at position 1 at the start of the carousel (D-059)."}},"additionalProperties":false,"description":"The playback settings every new collection copies when it is created (B-COLL-153); existing collections keep their own."},"library":{"type":"object","properties":{"cards_across_phone":{"type":"integer","minimum":1,"maximum":10},"cards_across_desktop":{"type":["integer","null"],"minimum":1,"maximum":10,"description":"Null: by the window's width, 3 to 6 (B-COLL-138)."},"show_descriptions":{"type":"boolean","description":"Show descriptions on cards."}},"additionalProperties":false,"description":"Library display defaults (Settings › Library)."},"content":{"type":"object","properties":{"hide_adult":{"type":"boolean","description":"Hide other people's adult collections from Discovery and search (on by default)."},"blur_adult":{"type":"boolean","description":"Show adult collections' covers blurred where Hide is off (on by default)."}},"additionalProperties":false,"description":"Settings › Content (B-AUTH-176): the person's own; an agent naming it is refused 403 `forbidden` (B-API-219)."},"uploads":{"type":"object","properties":{"markdown_as_notes":{"type":"boolean","description":"A Markdown file uploaded (.md, .markdown, .mdown; UTF-8, at most 524,288 characters) becomes an editable Markdown text note holding its text instead of a file; off keeps it a file (on by default)."}},"additionalProperties":false,"description":"How uploads arrive (Settings › Library, ZEG-1418)."}},"additionalProperties":false},"WebhookSet":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"},"secret":{"type":"string","description":"The signing secret, 64 hex characters behind zwhsec_: shown in this answer only and never again; calling set again makes a new one and ends this. Absent from an idempotent replay."},"secret_shown_once":{"type":"boolean"}},"required":["webhook","secret_shown_once"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","description":"The webhook's public id."},"collection_id":{"type":"string","description":"Its collection's public id."},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"},"example":["collection.updated"]},"enabled":{"type":"boolean"},"failure_count":{"type":"integer","description":"Deliveries in a row that failed all four attempts; 20 disable the webhook, any 2xx resets it."},"last_status":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"disabled_reason":{"type":["string","null"]},"disabled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","collection_id","url","events","enabled","failure_count","last_status","last_error","disabled_reason","disabled_at","created_at","updated_at"]},"WebhookSetRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"description":"An https address, at most 2000 characters, without credentials, not one of Zegazone's own hosts, and resolving only to public addresses.","example":"https://example.com/hooks/zegazone"},"events":{"type":"array","items":{"type":"string"},"description":"Only collection.updated (the default); anything else is refused with allowed_events."}},"required":["url"],"additionalProperties":false},"WebhookDetail":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"recent":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"},"description":"The last five finished attempts, newest first, tests included."},"pending":{"type":"integer","description":"Deliveries waiting to be sent."}},"required":["recent","pending"]}]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","description":"collection.updated, or ping for a test."},"status":{"type":"string","enum":["pending","delivered","failed","dropped"]},"attempts":{"type":"integer"},"response_status":{"type":["integer","null"]},"error":{"type":["string","null"]},"is_test":{"type":"boolean"},"changed_count":{"type":"integer"},"changed_truncated":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"}},"required":["id","event","status","attempts","response_status","error","is_test","changed_count","changed_truncated","created_at","delivered_at"]},"WebhookRemoval":{"type":"object","properties":{"removed":{"type":"boolean","description":"False when there was no webhook to remove."}},"required":["removed"]},"WebhookActionRequest":{"type":"object","properties":{},"additionalProperties":false},"WebhookTest":{"type":"object","properties":{"delivered":{"type":"boolean"},"response_status":{"type":["integer","null"],"description":"The receiver's status; null when nothing answered."},"duration_ms":{"type":"integer"},"error":{"type":["string","null"]},"signature":{"type":"string","description":"The X-Zegazone-Signature value sent."},"body":{"type":"string","description":"The exact signed body."}},"required":["delivered","response_status","duration_ms","error","signature","body"]},"ItemSearchResult":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ItemSearchHit"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"next_offset":{"type":["integer","null"]},"scope":{"type":"string","enum":["collection","library"],"description":"Where it searched: one collection, or your whole library."}},"required":["items","pagination","next_offset","scope"]},"ItemSearchHit":{"type":"object","properties":{"id":{"type":"string","description":"The item's public id."},"number":{"type":"integer"},"collection_id":{"type":"string"},"collection_name":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"mime_type":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The first 400 characters; items.get has the whole."},"tags":{"type":"array","items":{"type":"string"}},"position":{"type":"integer"},"score":{"type":"integer","description":"Per word: 4 in the name, 3 in a tag, 2 in the description, 1 in a note's text."},"matched":{"type":"array","items":{"type":"string","enum":["name","description","note","tags"]}},"snippet":{"type":["string","null"],"description":"Text around the first match in a note, else in the description."},"skill":{"type":["object","null"],"properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"],"description":"A skill's name and description (ZEG-1271): what it does, which the search read; null on any other item."}},"required":["id","number","collection_id","collection_name","name","kind","mime_type","description","tags","position","score","matched","snippet","skill"]},"ItemDownloadChunk":{"type":"object","properties":{"item_id":{"type":"string"},"name":{"type":"string"},"mime_type":{"type":["string","null"]},"size_bytes":{"type":"integer"},"chunk_bytes":{"type":"integer","description":"Every chunk but the last holds this many bytes (98304)."},"chunk_count":{"type":"integer"},"index":{"type":"integer"},"offset":{"type":"integer","description":"Where this chunk starts in the file."},"length":{"type":"integer","description":"This chunk's bytes, before base64."},"last":{"type":"boolean"},"next_index":{"type":["integer","null"]},"chunk_sha256":{"type":"string","description":"SHA-256 of this chunk's bytes, lower-case hex."},"etag":{"type":["string","null"],"description":"The stored object's entity tag: the same on every chunk of one file."},"data":{"type":"string","description":"This chunk's bytes, base64 (standard, padded)."}},"required":["item_id","name","mime_type","size_bytes","chunk_bytes","chunk_count","index","offset","length","last","next_index","chunk_sha256","etag","data"]},"ItemDiscard":{"type":"object","properties":{"id":{"type":"string"},"discarded":{"type":"boolean","description":"True: gone for good, its bytes released. False: in Trash, as Delete leaves it."}},"required":["id","discarded"]},"ItemDiscardRequest":{"type":"object","properties":{"undo_token":{"type":"string","maxLength":200,"description":"The clone's undo token, from its items.copy answer."}},"additionalProperties":false},"ItemCopy":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/Item"},"copied_from":{"type":"string","description":"The id of the item copied."},"undo_token":{"type":"string","description":"A clone made by a person's session (ZEG-1431): what `items.discard` needs to take it back within 2 minutes. Never answered to an agent."}},"required":["item","copied_from"]},"ItemCopyRequest":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection the copy goes to (its id): one you may add to.","example":"b4kq7xz2m9np"},"name":{"type":"string","description":"The copy's name; the original's by default."},"clone":{"type":"boolean","description":"A clone, as the Player's Clone makes (ZEG-1431): refused with `forbidden` unless `to` is a collection of yours that nobody else can see (private, not published, no members, no open invitations or links, and the same above it). Into the item's own collection it lands right after the original. The copy made is the same."}},"required":["to"],"additionalProperties":false},"CollectionImport":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"},"collections":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","description":"The source's id."},"to":{"type":"string","description":"The new id."},"number":{"type":"integer","description":"The new number."}},"required":["from","to","number"]}},"items":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","description":"The source's id."},"to":{"type":"string","description":"The new id."},"number":{"type":"integer","description":"The new number."},"kind":{"type":"string"}},"required":["from","to","number","kind"]}},"left":{"type":"array","items":{"type":"object","properties":{"part":{"type":"string","enum":["file","skill_files","note_text","link_url","link_snapshot","cover","subcollection","playback_settings","viewer","artwork","thumbnail","reference"]},"from":{"type":"string"},"to":{"type":["string","null"]},"collection_from":{"type":"string"},"collection_to":{"type":"string"},"kind":{"type":["string","null"]},"name":{"type":"string"},"position":{"type":["integer","null"]},"mime_type":{"type":["string","null"]},"size_bytes":{"type":["integer","null"]},"item_from":{"type":["string","null"]},"item_to":{"type":["string","null"],"description":"With cover: the new id of its item when the import made it; else null."},"cover_source":{"type":["string","null"],"description":"With cover: item (chosen from an item) or upload (an image of its own)."},"place":{"type":["integer","null"],"description":"Where the item belongs in the new collection's order, from 0, once every item before it is there: make a collection's left items in ascending place, each at its place."},"upload":{"type":["object","null"],"properties":{"collection_id":{"type":"string"},"filename":{"type":"string"},"size_bytes":{"type":["integer","null"]},"content_type":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"description_format":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"transfer":{"type":"string","enum":["inline"]},"kind":{"type":"string","enum":["file","skill"]}},"required":["collection_id","filename","size_bytes","content_type","name","description","tags","transfer","kind"],"description":"With file and skill_files: items.upload's arguments for it (size_bytes is the export's; send items.download's when they differ)."},"finalise":{"type":["object","null"],"properties":{"position":{"type":"integer"},"thumbnail_label":{"type":"string"}},"required":["position"],"description":"With file and skill_files: items.finalise's arguments that place and label it."},"artwork":{"type":["string","null"],"description":"With file and skill_files: items.set_thumbnail's source for its chosen artwork."},"viewer":{"type":["string","null"],"description":"With file: its viewer in the source; items.update it when the new item's differs."},"skill_files":{"type":["array","null"],"items":{"type":"string"},"description":"With skill_files: the bundle's files, to check the new skill against."},"target_from":{"type":["string","null"],"description":"With reference: the old id a zz://item reference in the new note or skill (to) still names."},"target_in_import":{"type":["boolean","null"],"description":"With reference: true when that item is in the import (its new id is in items when the import made it; else it is left and, if you make it, point the reference at the new id with items.update), false when it is outside the import (left as written)."}},"required":["part","from","to","collection_from","collection_to","kind","name","position","mime_type","size_bytes","item_from","item_to","cover_source","place","upload","finalise","artwork","viewer","skill_files","target_from","target_in_import"]}}},"required":["collection","collections","items","left"]},"CollectionImportRequest":{"type":"object","properties":{"exports":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["zegazone-collection-export"]},"version":{"type":"number","enum":[1]},"collection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"description_format":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"playback_settings":{},"show_in_library":{"type":"boolean"},"cover":{"type":["object","null"],"properties":{"source":{"type":"string"},"item_id":{"type":["string","null"]}},"required":["source"]}},"required":["id","name"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"description_format":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"mime_type":{"type":["string","null"]},"position":{"type":"integer"},"url":{"type":["string","null"]},"size_bytes":{"type":["integer","null"]},"subcollection_id":{"type":["string","null"]},"thumbnail_label":{"type":["string","null"]},"viewer":{"type":["string","null"]},"placeholder_kind":{"type":["string","null"]},"placeholder_platform":{"type":["string","null"]},"skill_form":{"type":["string","null"]},"skill_files":{"type":["array","null"],"items":{"type":"string"}},"custom_thumbnail":{"type":"boolean"},"text":{"type":["string","null"]},"text_truncated":{"type":"boolean"}},"required":["id","kind","name","position"]},"maxItems":500},"total":{"type":"integer"}},"required":["format","version","collection","items"]},"minItems":1,"maxItems":100,"description":"Every page collections.export answered, as it answered them: the root collection's pages first, then each sub-collection's (at most 50 collections and 500 items). A note's text must be whole: one cut by the export (text_truncated) is left for later unless its whole text (from items_get) is put in and text_truncated set to false."},"name":{"type":"string","description":"The new root's name; the source's by default."},"parent_id":{"type":["string","null"],"pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"Make the root a sub-collection of this collection. parent_id follows collections.create rules."},"partial":{"type":"boolean","description":"True to import a collection whose pages hold fewer items than its export's total; refused otherwise."}},"required":["exports"],"additionalProperties":false},"CollectionBatch":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"next_offset":{"type":["integer","null"]},"not_found":{"type":"array","items":{"type":"string"},"description":"Ids that are not a collection you may read (absent, private to others, or malformed): the answer does not say which."}},"required":["items","pagination","next_offset","not_found"]},"ItemBatch":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"next_offset":{"type":["integer","null"]},"not_found":{"type":"array","items":{"type":"string"}}},"required":["items","pagination","next_offset","not_found"]},"ItemDescription":{"type":"object","properties":{"id":{"type":"string"},"collection_id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"description":{"type":["string","null"]},"description_format":{"type":"string"},"described":{"type":"boolean","description":"False when the item has no description yet: the ones worth writing one for."},"tags":{"type":"array","items":{"type":"string"}}},"required":["id","collection_id","name","kind","description","description_format","described","tags"]},"CollectionTree":{"type":"object","properties":{"root_id":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/CollectionTreeNode"},"description":"Breadth-first: the root, then each level, a parent always before its children and siblings in the order of their tiles."},"total":{"type":"integer","description":"How many nodes `nodes` holds."},"truncated":{"type":"boolean","enum":[true],"description":"Present only when the tree had more nodes than `cap`: the deepest levels were cut. Ask the tree again from a node whose `sub_collection_count` is more than its children listed."},"cap":{"type":"integer","description":"With `truncated`: the most nodes one answer holds."}},"required":["root_id","nodes","total"]},"CollectionTreeNode":{"type":"object","properties":{"id":{"type":"string","description":"The collection's public id."},"number":{"type":"integer"},"name":{"type":"string"},"parent_id":{"type":["string","null"],"description":"Its parent's id; null for the root of the answer."},"depth":{"type":"integer","description":"Levels below the root (the root is 0)."},"position":{"type":["integer","null"],"description":"Its tile's place in the parent (from 0), as `items.list` numbers it for you (a member not shown some tiles counts only the tiles shown); null for the root."},"item_count":{"type":"integer","description":"As `collections.get` counts it."},"sub_collection_count":{"type":"integer","description":"As `collections.get` counts it: more than the children listed when the tree was cut or limited by `max_depth` below this node."},"cover_urls":{"allOf":[{"$ref":"#/components/schemas/CoverUrls"},{"description":"The cover's renditions, as `collections.get` answers them (a private cover's URLs carry a short-lived token; `collections.batch_get` renews them)."}]},"placeholder_kind":{"type":["string","null"],"description":"As the collection's `cover.placeholder_kind`: the default thumbnail it shows."},"placeholder_platform":{"type":["string","null"],"description":"As the collection's `cover.placeholder_platform`."},"published":{"type":"boolean"},"share_level":{"type":"string"},"archived":{"type":"boolean"}},"required":["id","number","name","parent_id","depth","position","item_count","sub_collection_count","cover_urls","placeholder_kind","placeholder_platform","published","share_level","archived"]},"CollectionExport":{"type":"object","properties":{"format":{"type":"string","enum":["zegazone-collection-export"]},"version":{"type":"number","enum":[1]},"exported_at":{"type":"string","format":"date-time"},"collection":{"$ref":"#/components/schemas/Collection"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ExportItem"}},"total":{"type":"integer","description":"The collection's live items."},"pagination":{"$ref":"#/components/schemas/Pagination"},"next_offset":{"type":["integer","null"]}},"required":["format","version","exported_at","collection","items","total","pagination","next_offset"]},"ExportItem":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"integer"},"kind":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"description_format":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"mime_type":{"type":["string","null"]},"position":{"type":"integer"},"url":{"type":["string","null"],"description":"A link's address."},"size_bytes":{"type":["integer","null"],"description":"A file's size."},"subcollection_id":{"type":["string","null"],"description":"A tile's collection."},"thumbnail_label":{"type":["string","null"],"description":"The word or two drawn over its tile (at most 40 characters); null for none."},"viewer":{"type":["string","null"],"description":"Its viewer; a note's display mode (text is plain, markdown, code). Null for a tile."},"placeholder_kind":{"type":["string","null"],"description":"A chosen default-thumbnail kind; null for none."},"placeholder_platform":{"type":["string","null"],"description":"A chosen social platform's tile as its artwork; null for none."},"skill_form":{"type":["string","null"],"description":"A skill's form: single (its text is its SKILL.md) or bundle (it has files). Null for other kinds."},"skill_files":{"type":["array","null"],"items":{"type":"string"},"description":"A skill bundle's files (their paths, SKILL.md included), which items.download brings as one zip. Null for a single skill, other kinds and an item gated against you."},"custom_thumbnail":{"type":"boolean","description":"True when the item's tile is a custom thumbnail: items.get's thumbnail.urls has its renditions (items.set_thumbnail with source url copies it). False for an item gated against you."},"text":{"type":["string","null"],"description":"A note's text, cut to 20000 characters."},"text_length":{"type":["integer","null"]},"text_truncated":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","number","kind","name","description","description_format","tags","mime_type","position","url","size_bytes","subcollection_id","text","text_length","text_truncated","created_at","updated_at"]},"BugReport":{"type":"object","properties":{"status":{"type":"string","enum":["received","duplicate"]},"report_id":{"type":"string","description":"This submission's id."},"duplicate_of":{"type":["string","null"],"description":"The open report it was counted under, when it matches one."}},"required":["status","report_id","duplicate_of"]},"BugReportRequest":{"type":"object","properties":{"category":{"type":"string","enum":["error","wrong_result","docs_mismatch","performance","other"],"description":"What kind of problem it is."},"related_op":{"type":"string","minLength":1,"maxLength":100,"description":"The operation or tool it is about, such as items_add."},"title":{"type":"string","minLength":1,"maxLength":200},"expected":{"type":"string","maxLength":2000},"actual":{"type":"string","maxLength":2000},"error_code":{"type":"string","maxLength":100},"severity":{"type":"string","enum":["low","medium","high","critical"]},"repro":{"type":"object","additionalProperties":{},"description":"A JSON object, at most 4096 characters written out: the steps or arguments that show it."},"notes":{"type":"string","maxLength":2048}},"required":["category","related_op","title"],"additionalProperties":false},"ItemContents":{"type":"object","properties":{"item_id":{"type":"string"},"kind":{"type":"string","enum":["skill","archive"],"description":"skill: a skill item (its manifest); archive: a stored archive file."},"format":{"type":"string","enum":["zip","tar","gzip","bzip2","xz","7z","rar"],"description":"A skill is always zip."},"label":{"type":"string","description":"What a person reads.","example":"Zip archive"},"size_bytes":{"type":["integer","null"],"description":"The stored bytes; null for a skill that is one SKILL.md (its zip is built when it is downloaded)."},"state":{"type":"string","enum":["listed","partial","large","unreadable","not_listed"],"description":"listed: the whole directory was read and the counts are exact; partial: a very long directory, only its first names read (entry_count is as the archive states it); large: a Zip64 archive, not listed; unreadable: no readable directory (damaged, or one that claims more than it holds); not_listed: an archive that is not a zip (tar, gzip, 7z, rar…), its type and size only."},"entry_count":{"type":["integer","null"],"description":"Every entry, folders included, as the directory states it."},"file_count":{"type":["integer","null"],"description":"Counted when listed."},"folder_count":{"type":["integer","null"]},"total_bytes":{"type":["integer","null"],"description":"The files' unpacked sizes as the zip states them (never measured), added up, when listed; null for a Zip64 entry."},"password_protected":{"type":"boolean","description":"Some entry is encrypted (of the entries read)."},"entries":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"},"folder":{"type":"boolean"}},"required":["path","size","folder"]},"description":"The first 50 entries in the archive's order (a skill's files, SKILL.md first). Nothing is unpacked: names and sizes only."},"more":{"type":["integer","null"],"description":"How many entries are not in entries; null when not known."},"skill_check":{"type":["object","null"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"]},"detail":{"type":["string","null"]}},"required":["valid","reason","detail"],"description":"For a zip kept as a file that holds one folder with a SKILL.md: whether it would be a skill, and, when not, the invalid_skill reason and a sentence saying why (too_many_files, skill_too_large, zip_unsupported for an encrypted one, unsafe_path, frontmatter_missing and the rest). null otherwise."}},"required":["item_id","kind","format","label","size_bytes","state","entry_count","file_count","folder_count","total_bytes","password_protected","entries","more","skill_check"]},"SkillAdd":{"type":"object","properties":{"markdown":{"type":"string","description":"A skill that is one SKILL.md, whole: YAML frontmatter with a name (lower-case letters, digits and hyphens, at most 64) and a description (what it does and when to use it, at most 1,024 characters), then the instructions in markdown; at most 524,288 characters. Give this or files."},"files":{"type":"object","additionalProperties":{"type":"string"},"description":"A skill with more than one file: each key is a path inside the skill's folder (SKILL.md, references/guide.md, scripts/run.py), each value that file's text. SKILL.md is required and holds the frontmatter; at most 200 files and 20 MB. Text files only: a file with bytes that are not text is refused with invalid_skill and reason binary_file. The server makes the zip. Give this or markdown.","example":{"SKILL.md":"---\nname: pdf-processing\ndescription: Extract text from PDFs.\n---\n# Steps","references/forms.md":"# Form fields"}},"tags":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"Tags for the item, as items.add takes them."}},"additionalProperties":false},"SkillRead":{"type":"object","properties":{"id":{"type":"string","description":"The item's public id."},"collection_id":{"type":"string"},"kind":{"type":"string","enum":["skill"]},"name":{"type":"string","description":"The skill's name from its frontmatter: lower-case letters, digits and hyphens, at most 64 characters; for a bundle it is also the zip's folder.","example":"pdf-processing"},"description":{"type":"string","description":"What the skill does and when to use it, from its frontmatter: at most 1,024 characters. Search reads it."},"form":{"type":"string","enum":["single","bundle"],"description":"single: the SKILL.md alone, read as markdown and edited in place; bundle: a zip of the skill's folder with its scripts, references and assets. Either is a full skill."},"version":{"type":"integer","description":"From 1; one more on each edit."},"frontmatter":{"type":"object","additionalProperties":{"type":"string"},"description":"Every top-level field of the SKILL.md's frontmatter as text, name and description first."},"text":{"type":"string","description":"The SKILL.md after its frontmatter: the instructions, read when the skill is used. A very long one is cut to the result budget over MCP (text_offset reads on)."},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"},"url":{"type":["string","null"],"description":"A private byte address for this file of a bundle (GET, no credential, until urls_expires_at), under the same entitlement as the zip download; null for a single skill (its one file is text) and when none can be issued."}},"required":["path","size","url"]}},"urls_expires_at":{"type":["string","null"],"description":"When the file urls stop working (ISO 8601); null with none."}},"required":["id","collection_id","kind","name","description","form","version","frontmatter","text","files","urls_expires_at"]},"SkillFile":{"anyOf":[{"type":"object","properties":{"item_id":{"type":"string"},"kind":{"type":"string","enum":["skill_file"]},"path":{"type":"string"},"size_bytes":{"type":"integer"},"encoding":{"type":"string","enum":["utf8"]},"url":{"type":["string","null"],"description":"A private byte address for this file (a plain GET until url_expires_at, under the same entitlement as the zip download), for a client that can fetch from the web; null for a single skill and when none can be issued."},"url_expires_at":{"type":["string","null"]},"text":{"type":"string"}},"required":["item_id","kind","path","size_bytes","encoding","url","url_expires_at","text"]},{"type":"object","properties":{"item_id":{"type":"string"},"kind":{"type":"string","enum":["skill_file"]},"path":{"type":"string"},"size_bytes":{"type":"integer"},"encoding":{"type":"string","enum":["base64"]},"chunk_bytes":{"type":"integer"},"chunk_count":{"type":"integer"},"index":{"type":"integer"},"offset":{"type":"integer"},"length":{"type":"integer"},"last":{"type":"boolean"},"next_index":{"type":["integer","null"]},"chunk_sha256":{"type":"string"},"data":{"type":"string"},"url":{"type":["string","null"],"description":"A private byte address for this file (a plain GET until url_expires_at, under the same entitlement as the zip download), for a client that can fetch from the web; null for a single skill and when none can be issued."},"url_expires_at":{"type":["string","null"]}},"required":["item_id","kind","path","size_bytes","encoding","chunk_bytes","chunk_count","index","offset","length","last","next_index","chunk_sha256","data","url","url_expires_at"]}]},"SkillFileWrite":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/Item"},"version":{"type":"integer","description":"The skill's new version: what the next edit is based on."},"form":{"type":"string","enum":["single","bundle"],"description":"single: the SKILL.md alone, read as markdown and edited in place; bundle: a zip of the skill's folder with its scripts, references and assets. Either is a full skill."},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"}},"required":["path","size"]}}},"required":["item","version","form","files"]},"SkillFilePut":{"type":"object","properties":{"content":{"type":"string","description":"The file's text, whole (at most 10 MB). Give this, upload_id, or a partial change (edits, prepend, append). A file holding bytes that are not text is refused with invalid_skill and reason binary_file: send it as an upload. To change part of an existing text file, prefer edits, which do not resend it."},"edits":{"type":"array","items":{"type":"object","properties":{"old_string":{"type":"string","minLength":1,"description":"The exact text to replace, spaces and line breaks included: it must be in the text once (or at least once, with replace_all)."},"new_string":{"type":"string","description":"What replaces it; empty removes it. To insert at a place, keep the anchor: old_string `## Steps`, new_string `## Steps\\n- the new step`."},"replace_all":{"type":"boolean","description":"Replace every occurrence of old_string instead of exactly one."}},"required":["old_string","new_string"],"additionalProperties":false},"minItems":1,"maxItems":100,"description":"Changes part of an existing text file without resending it, exactly as items.update's edits change a note: each edit, in order, replaces its old_string with new_string in the text the one before it left; each old_string must be in the text exactly once, unless replace_all. All or nothing: an edit that matches nowhere or more than once refuses the call (400 invalid_request, field edits.<n>.old_string, reason not_found or found_more_than_once, matches) and nothing is written. Not with content or upload_id."},"prepend":{"type":"string","minLength":1,"description":"Text put before an existing text file's text (after any edits), without resending it. Not with content or upload_id."},"append":{"type":"string","minLength":1,"description":"Text put after an existing text file's text (after any edits), without resending it. Not with content or upload_id."},"upload_id":{"type":"string","minLength":1,"maxLength":64,"description":"For a binary file (an image, a PDF): the upload_id of your own pending upload of its bytes into the skill's collection (items.upload, transfer inline or presigned, bytes sent, not finalised). Its bytes become the file and the upload is then discarded, so no other item appears. Give this or content."},"base_version":{"type":"integer","minimum":1,"description":"The skill's version (skills.get's version) this edit was based on. When the stored skill has moved on since, nothing is written and the answer is 409 skill_changed with current_version: read it again and redo the edit. Omitted, the edit applies to whatever is stored."}},"additionalProperties":false},"CollectionOpen":{"type":"object","properties":{"collection":{"$ref":"#/components/schemas/Collection"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"pagination":{"$ref":"#/components/schemas/Pagination"},"next_offset":{"type":["integer","null"],"description":"Where the next page of items starts (`items.list`), or null at the end."}},"required":["collection","items","pagination","next_offset"]},"DropLink":{"type":"object","properties":{"id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The link's id: what items_drop_link_revoke takes. Not the token."},"drop_url":{"type":"string","description":"The address to give the person: `{apex}/drop/{token}`. The token is shown here once and stored only as a hash."},"token_prefix":{"type":"string","description":"The token's first 8 characters, to tell links apart."},"expires_at":{"type":"string","format":"date-time"},"expires_in_seconds":{"type":"number","enum":[900]},"collection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"max_files":{"type":"integer","description":"The link takes this many files."},"expected_filenames":{"type":"array","items":{"type":"string"}},"note":{"type":["string","null"]},"next":{"type":"string","description":"What to say and do next."},"hint":{"type":"string"}},"required":["id","drop_url","token_prefix","expires_at","expires_in_seconds","collection","max_files","expected_filenames","note","next","hint"]},"DropLinkRequest":{"type":"object","properties":{"expected_filenames":{"type":"array","items":{"type":"string","maxLength":400},"maxItems":25,"description":"The names of the files you expect (at most 25, each cut to 200 characters). The page shows them as a checklist that ticks as a file of that name arrives; they are never enforced, and any file may be dropped."},"expected_count":{"type":"integer","minimum":1,"maximum":25,"description":"How many files the link takes, from 1 to 25 (default 10). It is a cap: past it the link is used up. Out of range is refused, not clamped."},"note":{"type":["string","null"],"maxLength":400,"description":"A line for the person, shown on the page (at most 200 characters): what to drop and why."}},"additionalProperties":false},"DropLinkRevoked":{"type":"object","properties":{"id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$"},"revoked":{"type":"boolean","enum":[true]},"changed":{"type":"boolean","description":"False when it was already turned off."},"revoked_at":{"type":"string","format":"date-time"}},"required":["id","revoked","changed","revoked_at"]},"OpenDropLinks":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OpenDropLink"}}},"required":["items"]},"OpenDropLink":{"type":"object","properties":{"id":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$"},"token_prefix":{"type":"string"},"note":{"type":["string","null"]},"expected_filenames":{"type":"array","items":{"type":"string"}},"max_files":{"type":"integer"},"files_received":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"mine":{"type":"boolean","description":"The caller made it."}},"required":["id","token_prefix","note","expected_filenames","max_files","files_received","expires_at","created_at","mine"]},"DropInfo":{"type":"object","properties":{"state":{"type":"string","enum":["active","expired","used_up","revoked","invalid"],"description":"active: files may be dropped. expired, used_up and revoked: the link is closed. invalid: not a link, or never one; the answer never says which (B-UPLOAD-041)."},"collection":{"type":["object","null"],"properties":{"name":{"type":"string"}},"required":["name"],"description":"Only while active: the collection the files join."},"note":{"type":["string","null"]},"expected_filenames":{"type":"array","items":{"type":"string"}},"seconds_left":{"type":["integer","null"],"description":"How long the link works for, by the server's clock."},"files_received":{"type":["integer","null"]},"max_files":{"type":["integer","null"]}},"required":["state","collection","note","expected_filenames","seconds_left","files_received","max_files"]},"DropUploadStarted":{"type":"object","properties":{"item_id":{"type":"string","description":"Names the upload in the calls that follow."},"number":{"type":"integer"},"status":{"type":"string","enum":["pending"]},"upload_id":{"type":"string"},"expires_at":{"type":"string","format":"date-time","description":"Finalise by then: an upload not finalised within 24 hours is removed."},"transfer":{"$ref":"#/components/schemas/UploadTransfer"}},"required":["item_id","number","status","upload_id","expires_at","transfer"]},"DropUploadRequest":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":1024},"size_bytes":{"type":"integer","minimum":1,"maximum":9007199254740991},"content_type":{"type":["string","null"],"maxLength":255}},"required":["filename","size_bytes"],"additionalProperties":false},"DropRenewed":{"type":"object","properties":{"item_id":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"transfer":{"$ref":"#/components/schemas/UploadTransfer"}},"required":["item_id","expires_at","transfer"]},"DropFinalised":{"type":"object","properties":{"noop":{"type":"boolean"},"item_id":{"type":"string"},"size_bytes":{"type":"integer"},"sniffed_type":{"type":"string"},"state":{"type":"string","enum":["active","expired","used_up","revoked"],"description":"The link as it stands now."},"seconds_left":{"type":"integer"},"files_received":{"type":"integer"},"max_files":{"type":"integer"}},"required":["noop","item_id","size_bytes","sniffed_type","state","seconds_left","files_received","max_files"]},"DropFinaliseRequest":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"part_number":{"type":"integer","minimum":1,"maximum":10000},"etag":{"type":"string","minLength":1,"maxLength":256}},"required":["part_number","etag"],"additionalProperties":false},"maxItems":10000}},"additionalProperties":false},"DropAborted":{"type":"object","properties":{"item_id":{"type":"string"},"aborted":{"type":"boolean","enum":[true]},"object_deleted":{"type":"boolean"}},"required":["item_id","aborted","object_deleted"]}},"parameters":{}},"paths":{"/auth/realtime-token":{"get":{"operationId":"profile.auth.realtime_token","tags":["profile"],"summary":"Mint the live-update token","description":"A ten-minute token for the live-update socket, minted from the session's stored refresh token (B-AUTH-131). Ask again before it expires and on every reconnect. Concurrent requests for one session make a single provider refresh and receive the same token. If the identity provider rejects the stored refresh token, the session ends (401 `session_ended`, B-AUTH-186); any other failure is 503 `live_updates_unavailable`, the session is kept, and the client pauses live updates and retries.","responses":{"200":{"description":"The token, when it expires, and where to connect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimeToken"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `live_updates_unavailable`: No live-update token could be minted (the identity provider did not answer); the session is kept. Retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","live_updates_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/signup":{"post":{"operationId":"profile.auth.signup","tags":["profile"],"summary":"Create an account with an email and a password, and sign in","description":"Creates the account and signs in at once, with no confirmation step (B-AUTH-003). The account enters the email-verification loop: a confirmation link is mailed to the address, which it confirms within 48 hours to keep adding items; until then publishing and sharing wait (B-AUTH-059, 184). The answer sets the session cookie; it carries no token. A password that is not at least 8 characters with an uppercase letter, a lowercase letter, a number and a special character is refused as `invalid_request` on `password` (B-AUTH-141). An address that already has an account, in any letter case, is refused as `invalid_request` on `email` with `reason: account_exists`; an address that is not valid is refused the same way without it. Rate-limited per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignUp"}}}},"responses":{"201":{"description":"Created. With `signed_in: true`, `Set-Cookie` carries the session cookie; with `signed_in: false` the account exists and the person signs in (B-AUTH-007).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedUp"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"},"reason":{"type":"string","enum":["account_exists"],"description":"account_exists: the address already has an account (B-AUTH-142); absent for an address that is not valid."}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/login":{"post":{"operationId":"profile.auth.login","tags":["profile"],"summary":"Sign in with an email and a password","description":"Starts a new session on this device. The answer sets the session cookie; it carries no token. An unknown email and a wrong password get the same answer. A suspended account is refused 403 `account_suspended` (B-AUTH-101). Rate-limited per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignIn"}}}},"responses":{"200":{"description":"Signed in. `Set-Cookie` carries the session cookie.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedIn"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/google":{"get":{"operationId":"profile.auth.google","tags":["profile"],"summary":"Continue with Google","description":"A browser navigation, not a fetch. Starts Google sign-in server-side with PKCE: sets a short-lived signed flow cookie holding the verifier and the sanitised `next`, and redirects with the S256 challenge (B-AUTH-134). Where the environment holds its Google client secret, the redirect is Google's own authorization endpoint with this API's callback as `redirect_uri`, a `state` and a hashed `nonce` (both kept in the cookie), so no identity-provider host is shown (ZEG-1522); otherwise the identity provider's authorize URL. `next` is kept only if it is a path on the app (one leading `/`, no `//`, no backslash); otherwise `/` (B-AUTH-020). Rate-limited per IP.","parameters":[{"schema":{"type":"string","description":"Where to return in the app after signing in; sanitised (B-AUTH-020).","example":"/"},"required":false,"description":"Where to return in the app after signing in; sanitised (B-AUTH-020).","name":"next","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"An invite code."},"required":false,"description":"An invite code.","name":"invite_code","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"A “you're in” link's token."},"required":false,"description":"A “you're in” link's token.","name":"waitlist","in":"query"},{"schema":{"type":"string","enum":["personal","pro"],"description":"A paid plan to buy."},"required":false,"description":"A paid plan to buy.","name":"plan","in":"query"}],"responses":{"302":{"description":"To Google's authorization endpoint (or, without the Google client secret, the identity provider's authorize URL), or to the app's `/?auth_error=google_failed` if the flow cannot start.","headers":{"Location":{"schema":{"type":"string"},"description":"Where the browser goes next."},"Set-Cookie":{"schema":{"type":"string"},"description":"The Google flow cookie (set at the start, cleared at the callback)."}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/google/callback":{"get":{"operationId":"profile.auth.google_callback","tags":["profile"],"summary":"Finish Continue with Google","description":"Where Google (or the identity provider) returns the browser. Exchanges the code with the verifier from the flow cookie (at Google's token endpoint, after checking `state`, then signs in to the identity provider with the checked ID token and nonce; or with the identity provider in its own flow), creates the account on a first sign-in (B-AUTH-011, 190), sets the session cookie, clears the flow cookie and redirects to the app at the sanitised `next`. Any failure redirects to the app's `/?auth_error=google_failed` (B-AUTH-134); a suspended account to `/?auth_error=account_suspended` (B-AUTH-101). Rate-limited per IP.","parameters":[{"schema":{"type":"string"},"required":false,"name":"code","in":"query"},{"schema":{"type":"string"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error_code","in":"query"},{"schema":{"type":"string"},"required":false,"name":"error_description","in":"query"}],"responses":{"302":{"description":"To the app: the sanitised `next` when signed in, `/?auth_error=google_failed` or `/?auth_error=account_suspended` when not.","headers":{"Location":{"schema":{"type":"string"},"description":"Where the browser goes next."},"Set-Cookie":{"schema":{"type":"string"},"description":"The Google flow cookie (set at the start, cleared at the callback)."}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/logout":{"post":{"operationId":"profile.auth.logout","tags":["profile"],"summary":"Sign out of this session","description":"Deletes this session and clears its cookie (B-AUTH-133). Other sessions and agent connections are unaffected. Signing out without a session is not an error.","responses":{"204":{"description":"Signed out; `Set-Cookie` clears the session cookie."},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/verification":{"get":{"operationId":"profile.auth.verification","tags":["profile"],"summary":"The signed-in account's email-verification state","description":"The caller's own state only (B-AUTH-067): whether the account is in the verification loop, its deadline, the address the loop mails and when Resend may send again.","responses":{"200":{"description":"The caller's state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationStatus"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/verification/resend":{"post":{"operationId":"profile.auth.verification_resend","tags":["profile"],"summary":"Send a new confirmation link (the strip's Resend)","description":"Mails a new 24-hour confirmation link to the address the loop mails, at most once per account per 60 s: inside that, 429 `rate_limited` with `retry_after`. An account outside the loop gets `sent: false`.","responses":{"200":{"description":"Sent, or nothing to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationResendAnswer"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/verify":{"post":{"operationId":"profile.auth.verify","tags":["profile"],"summary":"Confirm an email address from its link","description":"Needs no session: the link may open in any browser (B-AUTH-146). Idempotent (B-AUTH-068): `confirmed` once, then `already_confirmed`; publishing, sharing and adding are open from the next request. A link older than 24 hours is `expired` (B-AUTH-147); one that is not ours, or no longer matches its account's address, is 400 `invalid_request` on `token`. Rate-limited per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmail"}}}},"responses":{"200":{"description":"What happened to the link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailAnswer"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/verify/resend":{"post":{"operationId":"profile.auth.verify_resend","tags":["profile"],"summary":"Ask for a new confirmation link, signed out","description":"From `/verify-email`: an address, or an expired link's token. Always the same answer, whether or not the address has an account (B-AUTH-066). A new link goes only to an account in the verification loop, at most once per account per 60 s. Rate-limited per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailResend"}}}},"responses":{"202":{"description":"Accepted; the one answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailResendAnswer"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/service/status":{"get":{"operationId":"settings.service.status","tags":["settings"],"summary":"Read whether registration and the service are open","description":"Public. The registration position (open, free_paused, all_paused) with its public line, the service position (running, read_only, closed) with the operator's notice, the bot check's site key, and, with a session cookie, the account's hold. Reflects a change in admin within a minute.","responses":{"200":{"description":"The status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceStatus"}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/waitlist":{"post":{"operationId":"settings.waitlist.join","tags":["settings"],"summary":"Join the waitlist","description":"Email and the plan wanted only. The entry counts once the emailed link confirms it (double opt-in). The answer is the same whether the address is new, already on the list, or has an account.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoin"}}}},"responses":{"202":{"description":"Received; check the email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistReceived"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/waitlist/confirm":{"post":{"operationId":"settings.waitlist.confirm","tags":["settings"],"summary":"Confirm a waitlist place","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":128}},"required":["token"]}}}},"responses":{"200":{"description":"Whether the link confirmed a place.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistConfirmed"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/waitlist/leave":{"post":{"operationId":"settings.waitlist.leave","tags":["settings"],"summary":"Leave the waitlist and delete the entry","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":128}},"required":["token"]}}}},"responses":{"200":{"description":"Done (the same answer whether or not there was an entry).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistLeft"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/waitlist/invitation":{"get":{"operationId":"settings.waitlist.invitation","tags":["settings"],"summary":"Read what a “you're in” link offers","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"The plan the link admits on, and when it stops working.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistInvitation"}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/waitlist/invitation/free":{"post":{"operationId":"settings.waitlist.invitation_free","tags":["settings"],"summary":"Go back to the free queue instead of the paid place","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":128}},"required":["token"]}}}},"responses":{"200":{"description":"Whether the entry went back to the free queue (the link is spent either way).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistRequeued"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/admission/free":{"post":{"operationId":"profile.admission.free","tags":["profile"],"summary":"Join the free queue from an account on hold","description":"For an account on hold (`admission_hold`: `awaiting_payment`, let in to buy a paid plan, or `collaborator`, let in by an invitation): its address joins the free queue, confirmed at once when the account's address is verified, otherwise by the confirmation email; the hold is lifted when the entry is released.","responses":{"200":{"description":"Queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdmissionQueued"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/recover":{"post":{"operationId":"profile.auth.recover","tags":["profile"],"summary":"Ask for a password-reset link","description":"Always answers 202 with the same words, whether or not the address has an account (B-AUTH-143). Sets an HttpOnly binding cookie on this browser: the link works once, for 1 hour, and only in the browser that asked for it (B-AUTH-144). At most one send per address per 60 s; a request inside that gets the same answer and sends nothing. Rate-limited per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordRecover"}}}},"responses":{"202":{"description":"Accepted; the one answer. `Set-Cookie` carries the binding cookie.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordRecoverAnswer"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/reset/callback":{"get":{"operationId":"profile.auth.reset_callback","tags":["profile"],"summary":"Where a password-reset link returns the browser","description":"A browser navigation, not a fetch: the link in the reset mail, `?s=` the secret it carries. The secret is kept in an HttpOnly cookie, and only when this browser holds the binding cookie of the request that asked for the link and the secret is the one mailed; the answer is always a redirect to Studio's `/reset-password`, whose state says whether a password can be set (B-AUTH-144, 145). Opening the link spends nothing: opened in another browser, or by a mail scanner, it changes nothing, and the browser that asked can still use it. Rate-limited per IP.","parameters":[{"schema":{"type":"string","description":"The link's secret: 43 URL-safe characters."},"required":false,"description":"The link's secret: 43 URL-safe characters.","name":"s","in":"query"}],"responses":{"302":{"description":"To Studio's `/reset-password`.","headers":{"Location":{"schema":{"type":"string"},"description":"Studio's reset page."},"Set-Cookie":{"schema":{"type":"string"},"description":"The link cookie, only for the browser that asked and the secret that was mailed."}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/reset/state":{"get":{"operationId":"profile.auth.reset_state","tags":["profile"],"summary":"Whether this browser can set a password from a reset link","description":"Read from the cookies alone, so it is `expired` in any browser that did not ask for the link, and `used` once a password was set through it (B-AUTH-144, 145). Rate-limited per IP.","responses":{"200":{"description":"The state, and the address when it is known.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetState"}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/reset":{"post":{"operationId":"profile.auth.reset","tags":["profile"],"summary":"Set a new password from a reset link and sign in","description":"Uses the link once: redeems the recovery token the API holds for this browser, sets the password as the recovery session, signs in here (`Set-Cookie`) and ends every other session of the account in the same transaction (B-AUTH-153). Agent connections stay (R34). A link not opened in the browser that asked, used before, or older than an hour is 410 `reset_link_expired`. A password that is not at least 8 characters with an uppercase letter, a lowercase letter, a number and a special character is refused as `invalid_request` on `password` before the link is used (B-AUTH-141). Rate-limited per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordReset"}}}},"responses":{"200":{"description":"The done state: signed in here, every other session ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetDone"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`reset_link_expired`: The reset link is expired, already used, or was not opened in the browser that asked for it; `state` says `expired` or `used`. Ask for a new link.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["reset_link_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/password":{"post":{"operationId":"profile.auth.password_change","tags":["profile"],"summary":"Change the password","description":"From Profile › Sign-in. Verifies the current password with the identity provider (`invalid_request` on `current` when it is wrong, and for an account that has no password, which sets one through a reset link), sets the new one with this session's own token, keeps this session and ends every other (B-AUTH-185). Agent connections stay (R34). For a session over 24 hours old the provider also wants the code it emails (R108): the answer is 403 `reauthentication_required`; `POST /auth/password/code` sends it and this call is repeated with `code`. An account whose earlier password a Google sign-in retired (ZEG-1391), with no password of the person's own since, sets one without `current` from a session Google signed in within 10 minutes; from any other session it is `invalid_request` on `new` with `reason` `google_sign_in_needed`. Rate-limited per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}}},"responses":{"200":{"description":"Changed; this session is kept.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChanged"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `reauthentication_required`: A sensitive action wants a recent sign-in. Changing the password on a session over 24 hours old (R108): the identity provider wants the code it emails; `address` shows where it goes. Send it with `POST /auth/password/code`, then repeat the change with `code`. Minting a personal agent token (`POST /tokens`, ZEG-1401) wants proof within 10 minutes: `reason` `password_required`, repeat it with `current_password`; `sign_in_again`, sign in again, then repeat it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","reauthentication_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/methods":{"get":{"operationId":"profile.auth.methods","tags":["profile"],"summary":"How this account signs in","description":"For Profile › Sign-in (B-AUTH-159): the email and whether Google and a password are connected, read from the identity provider's own claims for this session's person. The provider is asked through the session's shared refresh (R90), so a provider that cannot answer is 503 and the session is kept (B-AUTH-129).","responses":{"200":{"description":"The account's sign-in methods.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInMethods"}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/auth/password/code":{"post":{"operationId":"profile.auth.password_code","tags":["profile"],"summary":"Email the code a password change wants","description":"Has the identity provider email this session's person its reauthentication code (R108), through Zegazone's own template. Send it again from here; the provider limits it to one a minute (429 `rate_limited`). Rate-limited per IP.","responses":{"202":{"description":"Sent; `address` says where, masked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordCodeSent"}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me":{"get":{"operationId":"profile.get","tags":["profile"],"summary":"The signed-in account and its profile","description":"The account behind the session with its display name, bio and links, and, for the account menu and sheet, its email address and the bytes it stores (R184). An agent with `profile:read` reads the same without the email address.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The account behind the session or the token, with its display name, bio, links, email (a person's only) and storage used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:read","x-mcp-tool":"profile_get"},"patch":{"operationId":"profile.update","tags":["profile"],"summary":"Change the display name, bio or links","description":"Takes the display name, the bio (at most 160 characters) and up to three links, and nothing else (R51): preferences are `settings.set`'s, the username is fixed and the avatar has its own operation. Name only what changes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}}},"responses":{"200":{"description":"The account and its profile as now stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/sessions":{"get":{"operationId":"profile.sessions.list","tags":["profile"],"summary":"List this account's sessions","parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"The account's sessions, most recently active first, with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/sessions/{id}":{"delete":{"operationId":"profile.sessions.revoke","tags":["profile"],"summary":"End one of this account's sessions","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Ended. Its next request is 401 `session_ended`. Ending the current session also clears its cookie."},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/plans":{"get":{"operationId":"settings.plans.list","tags":["settings"],"summary":"List the plans and their limits","parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"The plans, cheapest first, with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/limits":{"get":{"operationId":"settings.limits.get","tags":["settings"],"summary":"Your plan's limits now, what you have used, warnings and over-cap state","description":"The signed-in person's limits from the plan table, read at call time: the trial's while it runs (B-AUTH-192), the plan's after it. Warnings at 80 % and 100 % of storage and of a capped monthly allowance; the over-cap state names each cap and by how much.","responses":{"200":{"description":"The limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLimits"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/billing":{"get":{"operationId":"profile.billing.get","tags":["profile"],"summary":"Your plan's billing: the subscription, the trial, a payment warning","description":"The signed-in person's plan and how it is paid: the live subscription at the price they subscribed at, its renewal, a failed payment's grace period, the trial while it runs, and whether Upgrade and Manage are offered. `enabled: false` where billing is switched off here. The session cookie only.","responses":{"200":{"description":"Billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountBilling"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/billing/checkout":{"post":{"operationId":"profile.billing.checkout","tags":["profile"],"summary":"Upgrade: open Stripe Checkout for a plan (the person's own session only)","description":"Opens Stripe Checkout for `personal` or `pro` at the plan table's price now, reusing the person's Stripe customer. The plan changes when Stripe's subscription event arrives, never in this call. 400 `invalid_request` with `reason` `not_for_sale`, `already_on_plan` or `already_subscribed` (change a paid plan with Manage). The session cookie only: an agent can never press Upgrade.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"responses":{"200":{"description":"Where the browser goes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRedirect"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`billing_unavailable`: Billing is not switched on here, or the payment provider did not answer; nothing was opened or charged (`reason`). `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["billing_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/billing/extra-channels/add":{"post":{"operationId":"profile.billing.channels.add","tags":["profile"],"summary":"Plus: one more extra channel on Pro (the person's own session only)","description":"Raises the extra-channel quantity on the Pro subscription by one, at the plan table's add-on price, up to the plan's channel ceiling in all (B-AUTH-191); Stripe bills it with the plan from today. Only Pro offers it (`invalid_request`, reason `not_offered`). `reason` `stale_quantity` when `quantity` is not the current number plus one, `at_most` at the ceiling, `payment_overdue` while a payment waits. The session cookie only: no agent buys a channel.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtraChannelsAdd"}}}},"responses":{"200":{"description":"The quantity, and the billing record after it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtraChannelsChange"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`billing_unavailable`: Billing is not switched on here, or the payment provider did not answer; nothing was opened or charged (`reason`). `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["billing_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/billing/extra-channels/remove":{"post":{"operationId":"profile.billing.channels.remove","tags":["profile"],"summary":"Minus: one extra channel fewer, retiring a chosen alias if need be","description":"Lowers the extra-channel quantity by one (B-AUTH-191). An unused extra channel simply goes. When every one is in use (`retire_to_remove`), it goes only by retiring the alias named in `alias_id` with `confirm: true`, through the ordinary alias deletion (B-AUTH-168: its collections are unpublished and stay in your library; the handle is held for 90 days, B-AUTH-169); without one, `invalid_request` reason `choose_alias`. An alias with subscribers is never retired (`alias_has_subscribers`, B-AUTH-170). The quantity never goes below the aliases over the included ones. The session cookie only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtraChannelsRemove"}}}},"responses":{"200":{"description":"The quantity, the alias retired, and the billing record after it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtraChannelsChange"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["forbidden","missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`alias_has_subscribers`: People subscribe to the alias: stop the subscription before it is retired.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["alias_has_subscribers"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`billing_unavailable`: Billing is not switched on here, or the payment provider did not answer; nothing was opened or charged (`reason`). `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["billing_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/billing/portal":{"post":{"operationId":"profile.billing.portal","tags":["profile"],"summary":"Manage: open Stripe's billing portal (the person's own session only)","description":"Opens Stripe's billing portal to change plan, change card or cancel, returning to Profile › Plan (B-OPSADMIN-074). 404 `no_billing_account` when the account has never paid for a plan. The session cookie only.","responses":{"200":{"description":"Where the browser goes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRedirect"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`no_billing_account`: The account has no billing customer: it has never paid for a plan.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["no_billing_account"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`billing_unavailable`: Billing is not switched on here, or the payment provider did not answer; nothing was opened or charged (`reason`). `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["billing_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections":{"post":{"operationId":"collections.create","tags":["collections"],"summary":"Create a collection","description":"Live, unpublished and private unless a level is stated (B-COLL-001, 002), owned by the caller; under a parent of theirs when `parent_id` is given. At most 1,000 live collections per account (B-COLL-006, 121); a name is unique among its siblings (the same parent, or the owner's top level) by address, and a clash is `duplicate_collection_name` naming the sibling as `conflict` (B-COLL-150).","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"}}}},"responses":{"201":{"description":"The new collection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `duplicate_collection_name`: A collection beside it (the same parent, or the owner's top level) already has this name; `conflict` names it. `nesting_too_deep`: Collections nest at most 64 levels deep; this would put one deeper. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","duplicate_collection_name","nesting_too_deep","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_create"},"get":{"operationId":"collections.list","tags":["collections"],"summary":"List your collections and those shared with you","description":"Your live collections and those shared with you (direct or inherited memberships), each with `viewer_permissions` (B-COLL-082, B-API-157) and `capabilities` (R128). With `tab`, `q`, `tags`, `sort` or `include` it is Studio's library view (B-COLL-124–134, 148, 158): a tab's collections, searched, filtered and sorted on the server, hidden sub-collections and archived ones only when included, and on the first page the foot rows' `counts`. Otherwise the agent listing: archived, deleted and sub-collections left out unless asked for (B-COLL-042, 063; R104), manual order, then newest first.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"},{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"Only this parent's live children (B-COLL-042).","example":"b4kq7xz2m9np"},"required":false,"description":"Only this parent's live children (B-COLL-042).","name":"parent_id","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Also list sub-collections (left out by default, B-COLL-042). Not with parent_id."},"required":false,"description":"Also list sub-collections (left out by default, B-COLL-042). Not with parent_id.","name":"include_subcollections","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Also list your own archived collections (the archived view, B-COLL-158)."},"required":false,"description":"Also list your own archived collections (the archived view, B-COLL-158).","name":"include_archived","in":"query"},{"schema":{"type":"string","enum":["all","owned","shared"],"description":"owned: yours; shared: others' you are a member of; all: both (B-COLL-125). The agent listing: not with tab, q, tags, sort or include."},"required":false,"description":"owned: yours; shared: others' you are a member of; all: both (B-COLL-125). The agent listing: not with tab, q, tags, sort or include.","name":"scope","in":"query"},{"schema":{"type":"string","pattern":"^([pP][rR][iI][vV][aA][tT][eE]|[wW][oO][rR][kK][sS][pP][aA][cC][eE][sS]|[pP][uU][bB][lL][iI][cC]|[lL][iI][bB][rR][aA][rR][yY]:[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})$","description":"A library tab (B-COLL-124, 125; R125): private (yours), workspaces (others' you are a member of), public (yours, published), or library:{id}, a library you created (P2-31, B-COLL-126: its collections you can still read). Without it, with q, tags, sort or include: private and workspaces together.","example":"private"},"required":false,"description":"A library tab (B-COLL-124, 125; R125): private (yours), workspaces (others' you are a member of), public (yours, published), or library:{id}, a library you created (P2-31, B-COLL-126: its collections you can still read). Without it, with q, tags, sort or include: private and workspaces together.","name":"tab","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Search: a substring of the name or description, ignoring case; an exact number (#48213) or id pins that collection first (B-COLL-132, 169)."},"required":false,"description":"Search: a substring of the name or description, ignoring case; an exact number (#48213) or id pins that collection first (B-COLL-132, 169).","name":"q","in":"query"},{"schema":{"type":"string","description":"Comma-separated: collections carrying any of these tags (their own tags, never their items'; B-COLL-132).","example":"travel,family"},"required":false,"description":"Comma-separated: collections carrying any of these tags (their own tags, never their items'; B-COLL-132).","name":"tags","in":"query"},{"schema":{"type":"string","enum":["recent","liked","viewed","az","manual"],"description":"recent (the default with the library view: latest activity first, B-COLL-133), liked (most likes first), viewed (most views first) or az (by name, ignoring case). liked and viewed order by the all-time counts and break ties by latest activity (P3-24). manual, on a created library's tab only (tab=library:{id}): its own order, the order you put its collections in, or for a tab that follows a collection that collection's tile order; unstated there, a tab's default is manual when it follows a collection or you have ordered it, else recent."},"required":false,"description":"recent (the default with the library view: latest activity first, B-COLL-133), liked (most likes first), viewed (most views first) or az (by name, ignoring case). liked and viewed order by the all-time counts and break ties by latest activity (P3-24). manual, on a created library's tab only (tab=library:{id}): its own order, the order you put its collections in, or for a tab that follows a collection that collection's tile order; unstated there, a tab's default is manual when it follows a collection or you have ordered it, else recent.","name":"sort","in":"query"},{"schema":{"type":"string","pattern":"^(hidden_subcollections|archived)(,(hidden_subcollections|archived))*$","description":"Comma-separated: hidden_subcollections (sub-collections without Show in my library, B-COLL-148), archived (B-COLL-158)."},"required":false,"description":"Comma-separated: hidden_subcollections (sub-collections without Show in my library, B-COLL-148), archived (B-COLL-158).","name":"include","in":"query"}],"responses":{"200":{"description":"One page of collections with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_list"}},"/collections/{id}":{"get":{"operationId":"collections.get","tags":["collections"],"summary":"Get a collection","description":"Any collection the caller may read: their own (archived or in Trash included, R104), one they are a member of, or a published one by its level (B-COLL-031). Signed out, only published public collections, rate-limited per address (R295). A published Registered or Restricted collection the caller may not read is refused with its `gate` (B-PUBLISH-147). Anything else is `not_found` (B-API-090). Someone outside the collection is shown only what its publication says (P3-20).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"The collection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. A published Registered or Restricted collection's refusal carries its `gate`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"},"gate":{"$ref":"#/components/schemas/PublicGate"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. A published Registered or Restricted collection's refusal carries its `gate`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"},"gate":{"$ref":"#/components/schemas/PublicGate"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_get"},"patch":{"operationId":"collections.update","tags":["collections"],"summary":"Change a collection's name, description, share level, tags, playback settings or Show in my library","description":"Owner only (B-COLL-008), the playback settings included (B-COLL-152, B-API-238): a member's change to how it plays lasts for their visit and is never stored. `description_format` (plain or markdown, B-COLL-143) and `show_in_library` (B-COLL-141, 148) are stored as stated. A published collection's name is locked (`publish_handle_locked`). A share level that narrows a published collection's audience bumps its epoch.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"}}}},"responses":{"200":{"description":"The collection as changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `duplicate_collection_name`: A collection beside it (the same parent, or the owner's top level) already has this name; `conflict` names it. `publish_handle_locked`: The handle of a published collection cannot change. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","duplicate_collection_name","publish_handle_locked","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_update"}},"/collections/by-address/{handle}/{slug}":{"get":{"operationId":"collections.get_by_slug","tags":["collections"],"summary":"Get a published collection by its address","description":"The collection at `/{handle}/{slug}` (B-PUBLISH-014, 095, 142), in the one collection shape, for anyone it reaches: signed out, a published Public collection; signed in, a Registered one too; its owner and members, whatever its level, while it is published there. A published Registered or Restricted collection the caller may not read answers `session_required` (signed out) or `forbidden` with its `gate`: name, handle and the one action (B-PUBLISH-147). Every other address (unpublished, private, in Trash, suspended, never published, malformed) is the same `not_found` with the same bytes (B-PUBLISH-146, 193). Signed out, rate-limited per address (R295). Someone outside the collection is shown only what its publication says (no owner account, no library place, counts of what they can see).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","maxLength":200,"example":"charlie"},"required":true,"name":"handle","in":"path"},{"schema":{"type":"string","maxLength":200,"example":"field-notes"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The collection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. A published Registered or Restricted collection's refusal carries its `gate`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"},"gate":{"$ref":"#/components/schemas/PublicGate"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. A published Registered or Restricted collection's refusal carries its `gate`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"},"gate":{"$ref":"#/components/schemas/PublicGate"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_get_by_slug"}},"/collections/{id}/move":{"post":{"operationId":"collections.move","tags":["collections"],"summary":"Set or clear a collection's parent","description":"Atomic (B-COLL-147): `cycle_detected` for the collection itself or one inside it, 400 for an archived parent, `forbidden` for a collection that is not yours, `noop: true` for the current parent. `show_in_library` (B-COLL-141, 148) is written with the move, or alone when the parent stays; `noop` is true only when nothing at all changed.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionMoveRequest"}}}},"responses":{"200":{"description":"Moved, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionMove"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `cycle_detected`: A collection cannot move into its own subtree. `nesting_too_deep`: Collections nest at most 64 levels deep; this would put one deeper. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","cycle_detected","nesting_too_deep","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_move"}},"/collections/{id}/archive":{"post":{"operationId":"collections.archive","tags":["collections"],"summary":"Archive a collection and its sub-collections","description":"It leaves every list and live update; its owner still reads it by id; its publication and public address are unchanged (B-COLL-063, 156, 158; R104).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"Archived, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionArchive"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write"}},"/collections/{id}/unarchive":{"post":{"operationId":"collections.unarchive","tags":["collections"],"summary":"Unarchive a collection","description":"Brings it back with the sub-collections its archive took.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"Unarchived, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionArchive"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write"}},"/collections/{id}/delete":{"post":{"operationId":"collections.delete","tags":["collections"],"summary":"Send a collection to Trash","description":"Needs `confirm: true` unless `dry_run: true`, which only reports (B-COLL-066). Refuses a collection with live items unless `cascade_media: true` (`collection_not_empty`). Restorable for 14 days (B-COLL-165); bumps the epoch, so its URLs stop at once (B-ACCESS-179); its sub-collections become top level until it is restored (B-COLL-156).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDeleteRequest"}}}},"responses":{"200":{"description":"Deleted, or the dry run's report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionDeletion"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `collection_not_empty`: Delete refused for a non-empty collection without cascade.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","collection_not_empty"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `has_buyers`: People bought this collection, so it can't be deleted: stop selling instead (B-PUBLISH-160); `buyers` says how many. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","has_buyers","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:delete","x-mcp-tool":"collections_delete"}},"/collections/{id}/restore":{"post":{"operationId":"collections.restore","tags":["collections"],"summary":"Restore a collection from Trash","description":"Owner only, within 14 days of the delete; after that `restore_window_expired` with `deleted_at` and `restorable_until` (B-COLL-068). Brings back the items its delete took (B-COLL-071) and re-attaches the sub-collections it made top level (B-COLL-156).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"Restored, or `noop` when not in Trash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionRestore"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `duplicate_collection_name`: A collection beside it (the same parent, or the owner's top level) already has this name; `conflict` names it. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","duplicate_collection_name","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`restore_window_expired`: The restore window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["restore_window_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_restore"}},"/collections/{id}/publish":{"post":{"operationId":"collections.publish","tags":["collections"],"summary":"Publish a collection","description":"Kept as an alias of `publishing.publish` (P3-17): the same call without a handle, slug or dry run. Gives the collection its address, `/{handle}/{slug}`, under your default handle, and lets its share level reach people who are not members (B-COLL-031). A stated level is written, otherwise the stored one stays (B-PUBLISH-002), except that a level never stated becomes public (B-PUBLISH-003). It never lists the collection in Discovery (B-PUBLISH-191); at most 3 published at once on Free (`publish_limit_reached`); an account that has not confirmed its email is refused (`email_verification_required`).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPublishRequest"}}}},"responses":{"200":{"description":"Published, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPublication"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `publish_limit_reached`: The plan's published-collection cap is reached. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission","publish_limit_reached","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `publish_held`: The secret check found a possible secret: fix the item or mark the finding not a secret, then publish. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","publish_held","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write"}},"/collections/{id}/unpublish":{"post":{"operationId":"collections.unpublish","tags":["collections"],"summary":"Unpublish a collection","description":"Kept as an alias of `publishing.unpublish` (P3-17). Clears the published state and bumps the epoch in the same change, so every URL minted before stops (B-ACCESS-179); the share level stays for the next publish unless one is stated, and Discovery is switched off with the publication (B-PUBLISH-005).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPublishRequest"}}}},"responses":{"200":{"description":"Unpublished, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUnpublication"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write"}},"/collections/{id}/enter":{"post":{"operationId":"collections.enter","tags":["collections"],"summary":"Answer to enter","description":"Answers the question of a published Members collection that has answer to enter on. Open to anyone, signed in or not (never an agent's token). A correct answer makes a signed-in person a member; with the name and email the card asks for, it makes a lightweight unverified account and the member in one step, signed in; otherwise it gives this device a 30-day pass. 5 guesses a minute per device, then 429 `rate_limited` with `retry_after`. A wrong answer is 403 `forbidden` with `reason: \"wrong_answer\"`. Every collection that has no door, an unknown id included, is one identical `not_found`. A full collection is `quota_exceeded`; an email that already has an account is `invalid_request` on `email`.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEnterRequest"}}}},"responses":{"200":{"description":"Entered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntered"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/by-address/{handle}/{slug}/enter":{"post":{"operationId":"collections.enter_by_address","tags":["collections"],"summary":"Answer to enter, by address","description":"`collections.enter` for the collection published at `/{handle}/{slug}`: the gate carries the address and never an id, so its card answers here. The same answers, limits and refusals; an address with no door is the one identical `not_found`.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"handle","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEnterRequest"}}}},"responses":{"200":{"description":"Entered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionEntered"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/items":{"post":{"operationId":"items.add","tags":["items"],"summary":"Add a note or a link to a collection","description":"A skill (kind: skill, ZEG-1271) in its single form: its SKILL.md as markdown, checked (name, description) and stored as a note's text; named after the skill and described by its description unless named. A text note (kind: note): its display mode decides its stored type and viewer, detected once and stored (B-MEDIA-001, 025); Markdown unless display_mode says plain or code; unless named, named from its first usable line (else \"Text note\"). A link (kind: link, P2-08): the server fetches the URL once through its outbound fetcher (5 s, 512,000 bytes; private, loopback, link-local and metadata addresses refused in every encoding, redirects re-checked, at most 5; B-UPLOAD-146). YouTube and Vimeo become links with viewer video and are never downloaded (B-MEDIA-116); a URL that answers with an image, video, audio, PDF or document is ingested as a file item through the upload path, charged and rendered as an upload is (100 MiB, 45 s; a failure answers 400 naming its cause, B-UPLOAD-030, 071); any other page becomes a website link with its metadata, or \"Website preview unavailable\" when it cannot be read (B-MEDIA-034), and its picture follows from the image ladder in the background (link.ladder_status, B-UPLOAD-172). Either is appended at the end of the collection's order (B-UPLOAD-156). Needs can_upload. A collection holding 5,000 live items refuses it (429 `quota_exceeded`, B-UPLOAD-104).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemAdd"}}}},"responses":{"201":{"description":"The new item: a note with its body, a link, or the file a link's URL answered with.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `invalid_skill`: A skill is refused; `reason` names why: skill_md_missing, frontmatter_missing, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, markdown_missing, markdown_too_long, not_a_zip, zip_unsupported, unsafe_path, too_many_files, skill_too_large, not_single_folder, bundle_not_editable, binary_file (a file handed over MCP as text holds bytes that are not text) or path_conflict (a file where the bundle has a folder, or inside one of its files).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","invalid_skill"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size. `storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large","storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_add"},"get":{"operationId":"items.list","tags":["items"],"summary":"List a collection's items in order","description":"Its visible items in the one stored order (B-COLL-130), with the exact total. A page stops early so that no answer exceeds 150,000 characters (B-API-186): continue from `next_offset`. Note bodies are not listed. Archived items are hidden (B-MEDIA-117). Someone outside the collection is not listed a sub-collection tile whose child has no public page or gate, nor who added an item (B-PUBLISH-037, P3-20); signed out, rate-limited per address (R295).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"},{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"One page of items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"items_list"}},"/items/{id}":{"get":{"operationId":"items.get","tags":["items"],"summary":"Get an item","description":"Any item the caller may read, a note with its body. The owner also reads one in Trash (R104). Anything else is `not_found` (B-API-090), a sub-collection tile an outsider is not listed included (P3-20). Signed out, rate-limited per address (R295).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"The item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"items_get"},"patch":{"operationId":"items.update","tags":["items"],"summary":"Change an item's name, description, tags, viewer, thumbnail label or note","description":"Needs can_edit. The viewer only among the type's choices (B-MEDIA-004, `field: viewer` otherwise); a note's body is required and at most 524,288 characters, and omitting its display mode leaves its type and viewer (B-MEDIA-028). A note's text changes whole (`text`) or in part (`edits`, `prepend`, `append`, ZEG-1531), in place: its id, number, position, thumbnail, tags and name stay unless the call changes them. With `base_version`, a text change based on a version that is no longer the stored one is 409 `note_changed` with `current_version`, and nothing is written; `force` writes over it. The answer carries a note's whole text; `include_text=false` answers its `text_length`, `version` and `text_excerpt` instead.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemUpdate"}}}},"responses":{"200":{"description":"The item as changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `not_a_text_note`: A text-note operation on an item that is not a note. `invalid_skill`: A skill is refused; `reason` names why: skill_md_missing, frontmatter_missing, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, markdown_missing, markdown_too_long, not_a_zip, zip_unsupported, unsafe_path, too_many_files, skill_too_large, not_single_folder, bundle_not_editable, binary_file (a file handed over MCP as text holds bytes that are not text) or path_conflict (a file where the bundle has a folder, or inside one of its files).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","not_a_text_note","invalid_skill"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `note_changed`: The note's text changed since the version this write was based on; nothing was written. Read it again (`current_version`) and redo the change, or send `force: true` to write over it. `word_name_taken`: Another item in this account already has that name; nothing was written. `holder` names it (id, title, collection). `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","note_changed","word_name_taken","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_update"}},"/items/{id}/reorder":{"post":{"operationId":"items.reorder","tags":["items"],"summary":"Move an item, or a group of items, within its collection's order","description":"To the start, one left, one right, to the end, or an explicit position, written as the collection's one stored order (positions 0..n−1) that every reader uses (B-COLL-130). With `ids`, the item and those items move as one group that keeps its relative order, and the order is written once (B-MEDIA-145). Needs can_edit.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemReorderRequest"}}}},"responses":{"200":{"description":"Moved, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemReorder"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_reorder"}},"/items/{id}/delete":{"post":{"operationId":"items.delete","tags":["items"],"summary":"Send an item to Trash","description":"To Trash for 14 days, notes included (B-MEDIA-187, R95); the items after it close up. Needs can_delete. An item already in Trash is 400.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemActionRequest"}}}},"responses":{"200":{"description":"In Trash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDeletion"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:delete","x-mcp-tool":"items_delete"}},"/items/{id}/restore":{"post":{"operationId":"items.restore","tags":["items"],"summary":"Restore an item from Trash","description":"Within 14 days of the delete it returns to its place, or to the end when the order is now shorter; after that `restore_window_expired` with `deleted_at` and `restorable_until`. The owner, or a member who may delete (B-MEDIA-187). An item whose collection is in Trash comes back with the collection.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemActionRequest"}}}},"responses":{"200":{"description":"Restored, or `noop` when not in Trash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemRestore"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`restore_window_expired`: The restore window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["restore_window_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write"}},"/items/{id}/snapshot/refresh":{"post":{"operationId":"items.refresh_snapshot","tags":["items"],"summary":"Read a social media post's snapshot again","description":"For a link to a social media post (`link.social` set; whoever may edit the item): its platform's lookups are read again, and only when that read gives something does the new snapshot (author, caption, date, thumbnail) replace the old one. The item's name and description follow the snapshot only while they are still the snapshot's own: a name or description you typed is never overwritten. A read that gives nothing (the platform allows no lookup, a timeout, a refusal, a deleted or private post) changes nothing and answers `refreshed: false`. Anything but a link to a recognised post is 400.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"The item, and whether its snapshot was replaced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotRefresh"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_refresh_snapshot"}},"/items/move":{"post":{"operationId":"items.move","tags":["items"],"summary":"Move items to another collection","description":"Up to 200 items go to the end of the collection `to`, each source's in the order it had; they keep their bytes. Needs the right to delete each item where it is and to add in `to`. Each source closes up and its access epoch moves on, so the items' old URLs there stop at once (R109); when `to` has another owner, the storage charge moves to them and must fit their plan (B-UPLOAD-174). All or nothing: an item in Trash, archived or a sub-collection's tile refuses the call.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsMoveRequest"}}}},"responses":{"200":{"description":"Moved, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsMove"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`storage_quota_exceeded`: The owner's storage is full. `file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["storage_quota_exceeded","file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_move"}},"/items/move-to-new-subcollection":{"post":{"operationId":"items.move_to_new_subcollection","tags":["items"],"summary":"Move items into a new sub-collection","description":"In one step: a private sub-collection of the items' collection (its tile at the end of it, D-027), and the items moved into it in their order. Owner only; every item must be in that one collection. Returns the new collection and where each item went.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsMoveToNewSubcollectionRequest"}}}},"responses":{"201":{"description":"The new sub-collection, holding the items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsMoveToNewSubcollection"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `duplicate_collection_name`: A collection beside it (the same parent, or the owner's top level) already has this name; `conflict` names it. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","duplicate_collection_name","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_move_to_new_subcollection"}},"/items/batch-update":{"post":{"operationId":"items.batch_update","tags":["items"],"summary":"Apply one edit to several items","description":"Tags added to every item and removed from every item that has them (a tag already on only some items stays as it is), the description replaced on every item (B-MEDIA-146), and the thumbnail label replaced or cleared on every item (ZEG-1489), for up to 200 items. Needs can_edit on each. All or nothing: any item refused, or left with more than 10 tags, refuses the call and changes no item.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsBatchUpdateRequest"}}}},"responses":{"200":{"description":"Every item as changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsBatchUpdate"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_batch_update"}},"/items/{id}/third-party-url":{"post":{"operationId":"items.third_party_url","tags":["items"],"summary":"Get a short-lived URL of an item for a third-party viewer","description":"For an Office document you may read (purpose: office), a URL Microsoft's viewer can fetch: this one item's one variant, bound to you, for at most 300 s (B-ACCESS-184). A URL for another item or variant, or after it expires, is refused by the bytes host. When it cannot be issued the answer is `third_party_url_unavailable`: show the error, never a broader URL.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemThirdPartyUrlRequest"}}}},"responses":{"200":{"description":"The URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemThirdPartyUrl"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `third_party_url_unavailable`: No single-object URL for a third-party viewer could be issued; show the viewer's error, never a broader URL.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","third_party_url_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read"}},"/items/gate":{"post":{"operationId":"items.gate","tags":["items"],"summary":"Set the gate of items, the collection's default gate or its adult flag","description":"Set an item's gate: clear, blurred (with an optional label), members only, or paid; the collection-wide default for items with no gate of their own; and the collection's adult flag. The owner's (capability `items.gate`); an agent needs `items:write`. A viewer who is not entitled to a gated item receives only its blurred rendition and its label, on every path (public and private URLs, downloads, link previews, agent results); the owner and every accepted member are entitled through every gate. `paid` items are clear to the owner, members and holders of an entitlement (a purchase, or a subscription to its channel; P3-36). A change that makes anything more restrictive raises the collection's access epoch, so every URL issued before stops from the next request (B-ACCESS-169). All or nothing; at most 200 items, all in one collection. Any change, a loosening too, is announced to the open pages as a live `items.gated` message (a notification: they read again to learn what they may see; ZEG-1284). Reveal is not an operation an agent has (B-ACCESS-186). While creator selling is not switched on here, `paid` (an item's or the default) is 503 `selling_unavailable` (R631); a Paid gate already set keeps withholding.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsGateRequest"}}}},"responses":{"200":{"description":"The gates as they now are.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsGate"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `selling_unavailable`: Selling is not switched on here, or Stripe could not be reached: no price was set and no checkout opened.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","selling_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_gate"}},"/items/{id}/reveal":{"post":{"operationId":"items.reveal","tags":["items"],"summary":"Reveal a blurred item","description":"After the viewer's one-line confirmation: the clear variants of one gated item. Of a Blurred item only (Members only and Paid items are not revealed: `forbidden`). A signed-in viewer gets private URLs bound to them (at most 15 minutes; ask again within the visit for fresh ones, R9); a signed-out visitor gets a 15-minute token bound to this item, its collection and its epoch, not to a person (R4); a visitor holding a device pass of answer to enter gets URLs of at most 5 minutes, each opening one variant of this item (R399); and for an adult collection only a person may reveal: `session_required`, \"Sign in to reveal\" (R72). The server keeps no record of a reveal: leaving the page ends it. Not an agent operation and not an MCP tool (B-ACCESS-186): a bearer token is refused.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"The clear variants.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemReveal"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/purchases":{"get":{"operationId":"profile.purchases.list","tags":["profile"],"summary":"Your purchases and subscriptions","description":"Purchases and subscriptions, from the account menu (B-PUBLISH-172): each one-off purchase with whether it was opened and, while it is refundable (unopened and within 14 days, B-PUBLISH-164), until when; each subscription with its price, renewal or end, its first period's refund and Show as a tab; and which library tabs appear (Purchased, Subscribed). The web app's own: not open to agents.","responses":{"200":{"description":"Everything you bought.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Purchases"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/purchases/{id}/refund":{"post":{"operationId":"profile.purchases.refund","tags":["profile"],"summary":"Refund a purchase you have not opened","description":"Only while unopened (no Paid item's stage rendition or original was served clear to you on any client: tiles and the free sample never count) and within 14 days of buying (B-PUBLISH-164, D-034); otherwise 409 `not_refundable` with `reason`. The full price comes back; the publisher's share is netted from their next payout and Zegazone absorbs Stripe's kept fee (R87). The collection stops reading clear from your next request. The person's own: never an agent's (B-API-181).","parameters":[{"schema":{"type":"string","description":"Its id."},"required":true,"description":"Its id.","name":"id","in":"path"}],"responses":{"200":{"description":"The purchase, refunded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Purchase"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`not_refundable`: A refund is available only while unopened and within 14 days (B-PUBLISH-164); `reason` says why not: `opened`, `window`, `refunded` or `ended`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_refundable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `selling_unavailable`: Selling is not switched on here, or Stripe could not be reached: no price was set and no checkout opened.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","selling_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/subscriptions/{id}/cancel":{"post":{"operationId":"profile.subscriptions.cancel","tags":["profile"],"summary":"Cancel a subscription at the end of its period","description":"It stops renewing and keeps giving access until the end of the period you paid for; then Paid items read blurred from your next request (B-ACCESS-173, B-PUBLISH-164). No partial refund: the first period's refund is `profile.subscriptions.refund`. Already cancelled: no change. The person's own.","parameters":[{"schema":{"type":"string","description":"Its id."},"required":true,"description":"Its id.","name":"id","in":"path"}],"responses":{"200":{"description":"The subscription, ending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`not_refundable`: A refund is available only while unopened and within 14 days (B-PUBLISH-164); `reason` says why not: `opened`, `window`, `refunded` or `ended`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_refundable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `selling_unavailable`: Selling is not switched on here, or Stripe could not be reached: no price was set and no checkout opened.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","selling_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/subscriptions/{id}/refund":{"post":{"operationId":"profile.subscriptions.refund","tags":["profile"],"summary":"Refund a subscription's first period","description":"The first period only, never renewed, while no Paid item of the channel was served clear to you and within 14 days (B-PUBLISH-164); otherwise 409 `not_refundable`. It ends now and the period's price comes back in full (R87). The person's own.","parameters":[{"schema":{"type":"string","description":"Its id."},"required":true,"description":"Its id.","name":"id","in":"path"}],"responses":{"200":{"description":"The subscription, ended and refunded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`not_refundable`: A refund is available only while unopened and within 14 days (B-PUBLISH-164); `reason` says why not: `opened`, `window`, `refunded` or `ended`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_refundable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `selling_unavailable`: Selling is not switched on here, or Stripe could not be reached: no price was set and no checkout opened.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","selling_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/subscriptions/{id}/tab":{"post":{"operationId":"profile.subscriptions.set_tab","tags":["profile"],"summary":"Show a subscribed channel as a library tab, or stop","description":"Show as a tab (B-PUBLISH-171, D-039): pins the channel as a library tab of its own; off hides the tab and keeps the subscription. The person's own.","parameters":[{"schema":{"type":"string","description":"Its id."},"required":true,"description":"Its id.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionTabRequest"}}}},"responses":{"200":{"description":"The subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/price":{"get":{"operationId":"collections.price.get","tags":["collections"],"summary":"A collection's price, its channel's subscription, and what you hold","description":"For anyone who may read the collection, signed out included (rate-limited per address): its one-off price while it sells (B-PUBLISH-155), the subscription of the channel it is published under, the one way to pay (B-PUBLISH-156), how many items it has and how many are Paid, and whether you receive the Paid items clear (owner, member, buyer or subscriber; B-ACCESS-171, B-PUBLISH-163). The owner also gets the fee read-back (B-PUBLISH-154) and `seller`: what they still need before they can charge (B-PUBLISH-165). Nothing here buys (B-API-181).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"The price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPrice"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_price_get"},"post":{"operationId":"collections.price.set","tags":["collections"],"summary":"Set or remove a collection's one-off price","description":"The owner's (an agent needs `collections:write`). A price is one of the fixed points from $2 to $499 in US cents (B-PUBLISH-153); one per collection (B-PUBLISH-155): another amount replaces it. Setting one needs a paid plan, payouts set up and the creator terms accepted (403 `seller_not_ready` with `missing`; B-PUBLISH-165, 163); while selling is off here, 503 `selling_unavailable`. `null` makes it free again while nothing has sold; once anything sold, `forbidden`: send `selling: false` to stop selling instead (P3-37, B-PUBLISH-160), which keeps every buyer's access. Which items need the purchase is each item's Paid gate (`items.gate`). Nothing here charges anyone (B-API-181).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceRequest"}}}},"responses":{"200":{"description":"The price as it now is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPrice"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `seller_not_ready`: Setting a price needs a paid plan, payouts set up and the creator terms accepted (B-PUBLISH-165); `missing` names what is left.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","seller_not_ready"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `selling_unavailable`: Selling is not switched on here, or Stripe could not be reached: no price was set and no checkout opened.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","selling_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_price_set"}},"/me/aliases/{id}/price":{"get":{"operationId":"profile.aliases.price.get","tags":["profile"],"summary":"Your handle's subscription price","description":"The monthly price of one of your handles (the system username or an alias) with its read-back, how many subscribe, and what you still need before you can charge (B-AUTH-166). The web app's own: not open to agents.","parameters":[{"schema":{"type":"string","description":"The handle's id."},"required":true,"description":"The handle's id.","name":"id","in":"path"}],"responses":{"200":{"description":"The handle's price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelPrice"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"},"post":{"operationId":"profile.aliases.set_price","tags":["profile"],"summary":"Set or remove your handle's subscription price","description":"A monthly price from the same fixed points as a collection's (B-AUTH-166), US cents; null stops offering it while nobody subscribes; `selling: false` is Stop the subscription (P3-37, B-AUTH-170): no new subscription or renewal, subscribers keep access until their paid month runs out. Needs what a collection's price needs (403 `seller_not_ready`; 503 `selling_unavailable`). The web app's own: not open to agents.","parameters":[{"schema":{"type":"string","description":"The handle's id."},"required":true,"description":"The handle's id.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceRequest"}}}},"responses":{"200":{"description":"The handle's price as it now is.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelPrice"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `seller_not_ready`: Setting a price needs a paid plan, payouts set up and the creator terms accepted (B-PUBLISH-165); `missing` names what is left.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden","seller_not_ready"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `selling_unavailable`: Selling is not switched on here, or Stripe could not be reached: no price was set and no checkout opened.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","selling_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/checkout":{"post":{"operationId":"checkout.create","tags":["checkout"],"summary":"Open Stripe's checkout for a purchase or a subscription","description":"Buy a collection (`kind: purchase`, its one-off price) or subscribe to a channel (`kind: subscription`: the channel `collection_id` is published under, or `handle`). Answers Stripe's hosted page (`url`): the browser goes there, and Stripe brings it back to `return_to` with `?checkout={id}` (B-PUBLISH-158). Refused with `already_entitled` when you already receive it clear, `not_for_sale` when nothing sells there, 503 `selling_unavailable` while selling is off. The person's own, through the session: not an agent operation and not an MCP tool (B-API-181).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"The checkout, open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`not_for_sale`: Nothing is for sale there: no live price, or the seller cannot take payments now. `already_entitled`: You already receive this clear (the owner, a member, a buyer or a subscriber): there is nothing to buy. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_for_sale","already_entitled","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `selling_unavailable`: Selling is not switched on here, or Stripe could not be reached: no price was set and no checkout opened.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","selling_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/checkout/{id}":{"get":{"operationId":"checkout.get","tags":["checkout"],"summary":"What became of your checkout","description":"The page Stripe brought you back to asks this. `complete` with `entitled: true` means you receive what you paid for clear from now on (B-ACCESS-174): the entitlement is granted from the confirming payment, whether Stripe's event or this read reached it first. `open` while Stripe has not confirmed it; `expired` when it was abandoned. Yours only.","parameters":[{"schema":{"type":"string","description":"The checkout's id."},"required":true,"description":"The checkout's id.","name":"id","in":"path"}],"responses":{"200":{"description":"The checkout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/tags":{"get":{"operationId":"tags.list","tags":["tags"],"summary":"Your collection tags with their counts","description":"The tags on your collections, each with how many collections carry it, most used first, then by name (B-COLL-160): the existing tags a tag picker offers before the global vocabulary and before a new tag. Collection tags only, never item tags (B-COLL-132).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"},{"schema":{"type":"string","pattern":"^([pP][rR][iI][vV][aA][tT][eE]|[wW][oO][rR][kK][sS][pP][aA][cC][eE][sS]|[pP][uU][bB][lL][iI][cC]|[lL][iI][bB][rR][aA][rR][yY]:[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})$","example":"private","description":"Count what this tab lists (a system tab, or library:{id}, a library you created), as collections.list with the same tab and include does, so a count is what filtering the tab by that tag finds. Without it: every live collection you own, archived ones and sub-collections included (Edit's picker)."},"required":false,"description":"Count what this tab lists (a system tab, or library:{id}, a library you created), as collections.list with the same tab and include does, so a count is what filtering the tab by that tag finds. Without it: every live collection you own, archived ones and sub-collections included (Edit's picker).","name":"tab","in":"query"},{"schema":{"type":"string","pattern":"^(hidden_subcollections|archived)(,(hidden_subcollections|archived))*$","description":"With tab, as collections.list: hidden_subcollections, archived."},"required":false,"description":"With tab, as collections.list: hidden_subcollections, archived.","name":"include","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Only tags containing this text (B-COLL-160's search field)."},"required":false,"description":"Only tags containing this text (B-COLL-160's search field).","name":"q","in":"query"}],"responses":{"200":{"description":"One page of tags with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagCountList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read"}},"/tags/vocabulary":{"get":{"operationId":"tags.vocabulary","tags":["tags"],"summary":"The global tag vocabulary","description":"The active rows of the curated vocabulary in their order (B-COLL-053, 160), each with how many of your collections carry the tag: what a tag picker offers after your own tags (`tags.list`) and before a new one. The same rows for everyone; only the counts are yours. An empty list while no vocabulary is loaded.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Only tags whose slug or label contains this text (B-COLL-160's search field)."},"required":false,"description":"Only tags whose slug or label contains this text (B-COLL-160's search field).","name":"q","in":"query"}],"responses":{"200":{"description":"One page of vocabulary rows with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagVocabularyList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read"}},"/trash":{"get":{"operationId":"collections.trash.list","tags":["collections"],"summary":"Your Trash: deleted collections and items","description":"Your deleted collections and the deleted items of your collections, newest deletion first, at most 200 (B-COLL-157, 166). Each row has its restore window; item rows name their collection and carry private byte URLs only (B-COLL-167, B-ACCESS-188). An item whose collection is in Trash comes back with it and is not a row of its own.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The Trash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrashList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read"}},"/collections/{id}/tags/suggest":{"post":{"operationId":"tags.suggest","tags":["tags"],"summary":"Suggest tags for a collection","description":"Up to 8 tags for one of your collections, each with a percentage, highest first, never one it already has, with a line naming what was read. Nothing is added: add the tags you choose with collections.update. The candidates are your own tags and the 40 most used in Discovery; what is read is text only, the collection's name and description and its items' names, descriptions and notes. When nothing scores high enough the list is empty with reason \"No strong suggestions\". Each call uses one of the month's suggestions (20 Free, 500 Personal, 2,000 Pro), except on a published collection, which is never counted; past the allowance it answers 429 `suggestion_allowance_exceeded` with `resets_at` and `allowance` and asks nothing. The daily decision budget answers 429 `decision_budget_exceeded`. The collection's owner's; an agent needs `items:write`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagSuggestRequest"}}}},"responses":{"200":{"description":"The suggestions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagSuggestions"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `suggestion_allowance_exceeded`: The month's suggestion allowance is spent (B-API-166). `decision_budget_exceeded`: The account's daily decision budget is spent (B-API-164).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","suggestion_allowance_exceeded","decision_budget_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"tags_suggest"}},"/libraries":{"get":{"operationId":"libraries.list","tags":["libraries"],"summary":"Your libraries","description":"The libraries you created, in their order after the system tabs (B-COLL-124, 126), hidden ones included. Each library's collections are collections.list with tab=library:{id}.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"Your libraries with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"libraries_list"},"post":{"operationId":"libraries.create","tags":["libraries"],"summary":"Create a library","description":"A new, empty library after your others: a private tab of references to collections (B-COLL-124, 126), or, with follows_collection_id, a tab that lists one collection's sub-collections as they are when read. At most 50 libraries; names are unique among yours, ignoring case.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryCreate"}}}},"responses":{"201":{"description":"The new library.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Library"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `duplicate_library_name`: The person already has a library with this name (case ignored). `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","duplicate_library_name","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"libraries_create"}},"/libraries/{id}":{"patch":{"operationId":"libraries.update","tags":["libraries"],"summary":"Rename, hide, show, reorder or follow a library","description":"Give only what changes: name, hidden (off the tab strip, or shown again), position, or follows_collection_id (a collection whose sub-collections the tab lists, or null to stop). Your libraries only.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryUpdate"}}}},"responses":{"200":{"description":"The library as changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Library"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `duplicate_library_name`: The person already has a library with this name (case ignored). `library_not_empty`: The library holds collections, so it cannot follow one; remove them first, or make a new library. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","duplicate_library_name","library_not_empty","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"libraries_update"}},"/libraries/{id}/delete":{"post":{"operationId":"libraries.delete","tags":["libraries"],"summary":"Delete a library","description":"The library and its references go at once; every collection it referenced stays exactly as it was, in every system library it was in.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryDeleteResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"libraries_delete"}},"/libraries/{id}/collections":{"post":{"operationId":"libraries.add","tags":["libraries"],"summary":"Add collections to a library","description":"Copies references into one of your libraries (B-COLL-126): collections by id, each one you can read now and not in Trash, or every collection a system tab lists under a search and filter (from). The collections themselves do not change: they stay in Private, Workspaces or Public as before. A library holds at most 1,000.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAdd"}}}},"responses":{"200":{"description":"What was added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryAddResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `library_follows_collection`: The library follows a collection, so it takes no collections by hand and has no order of its own; stop following first, or use another library. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","library_follows_collection","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"libraries_add"}},"/libraries/{id}/collections/remove":{"post":{"operationId":"libraries.remove","tags":["libraries"],"summary":"Remove collections from a library","description":"Their references leave the library; the collections are untouched and stay wherever else they are.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryRemove"}}}},"responses":{"200":{"description":"What was removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryRemoveResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `library_follows_collection`: The library follows a collection, so it takes no collections by hand and has no order of its own; stop following first, or use another library. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","library_follows_collection","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"libraries_remove"}},"/libraries/move":{"post":{"operationId":"libraries.move_collection","tags":["libraries"],"summary":"Move collections from one library of yours to another","description":"Between your own libraries a collection moves (B-COLL-126): it leaves `from` and enters `to`. Each must be in `from`. The collections themselves do not change.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryMove"}}}},"responses":{"200":{"description":"What moved, and both libraries as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryMoveResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `library_follows_collection`: The library follows a collection, so it takes no collections by hand and has no order of its own; stop following first, or use another library. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","library_follows_collection","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"libraries_move_collection"}},"/bookmarks":{"get":{"operationId":"bookmarks.list","tags":["bookmarks"],"summary":"Your bookmarks","description":"Your bookmarks, newest first, each with the collections it shows you now (B-COLL-058, 061): the ones you can still read, so a collection deleted, archived or no longer shared with you is not in it and is not counted. `q` keeps those whose title contains it. At most 500 bookmarks of up to 100 collections each.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"},{"schema":{"type":"string","maxLength":500,"description":"Only the bookmarks whose title contains this, in any case."},"required":false,"description":"Only the bookmarks whose title contains this, in any case.","name":"q","in":"query"}],"responses":{"200":{"description":"Your bookmarks with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"bookmarks_list"},"post":{"operationId":"bookmarks.create","tags":["bookmarks"],"summary":"Save a bookmark","description":"Saves a titled list of 1 to 100 collections for the person to find again (B-COLL-058). Past 100 collections, or 500 bookmarks, is 429 `quota_exceeded`. An id that names no collection you can read now is 404 `not_found`, the same answer whether it is private or was never made (ZEG-1452). There is no rename for an agent: the person renames in Studio (B-COLL-060).","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkCreate"}}}},"responses":{"201":{"description":"The new bookmark.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"bookmarks_create"}},"/bookmarks/{id}/delete":{"post":{"operationId":"bookmarks.delete","tags":["bookmarks"],"summary":"Delete a bookmark","description":"The bookmark goes at once; every collection it named stays exactly as it was. Your bookmarks only.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkDeleteResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"bookmarks_delete"}},"/bookmarks/{id}":{"get":{"operationId":"bookmarks.get","tags":["bookmarks"],"summary":"One of your bookmarks","description":"Studio's own read of a bookmark for its address. Agents list (`bookmarks.list`) and use the ids that answers.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The bookmark.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"},"patch":{"operationId":"bookmarks.rename","tags":["bookmarks"],"summary":"Rename a bookmark","description":"The person renames a bookmark in Studio. Not open to agents: B-COLL-060 gives them save, list and delete only.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkRename"}}}},"responses":{"200":{"description":"The bookmark as renamed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/bookmarks/{id}/collections":{"post":{"operationId":"bookmarks.add","tags":["bookmarks"],"summary":"Add collections to a bookmark","description":"The person adds collections to a bookmark in Studio (Bookmark, in a collection's More): after those it holds, each once, up to 100 in all. Not open to agents: they save a new bookmark.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkAdd"}}}},"responses":{"200":{"description":"The bookmark as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/queue":{"get":{"operationId":"queue.list","tags":["queue"],"summary":"Your AI queue","description":"The prompts the person queued for their agent in Studio, oldest first, with `prompt`: all of them as one prompt, each entry framed by lines carrying a random mark. Do each, then call `queue.complete` with its id. An entry whose collection or items are gone is left out without a word; reading writes nothing.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The queue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Queue"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"queue_list"},"post":{"operationId":"queue.add","tags":["queue"],"summary":"Add a prompt to the AI queue","description":"Studio's AI symbol: queues a prompt of the catalogue, or one of the person's own saved prompts (`custom` with `prompt_id`), for its targets, written now from the catalogue or the stored prompt (the body carries no text). The same prompt for the same targets while one waits answers that one (`added` false). A catalogue prompt only for a change the person may make (`forbidden` otherwise); a saved prompt for any collection they can read. At most 100 items an entry; the prompt names them by id alone. At most 60 adds a minute (429 `rate_limited`). At most 200 waiting: past that, 429 `quota_exceeded`. Not open to agents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueAdd"}}}},"responses":{"200":{"description":"That prompt was already waiting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueAddResult"}}}},"201":{"description":"Queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueAddResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens). `rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded","rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/queue/complete":{"post":{"operationId":"queue.complete","tags":["queue"],"summary":"Mark queue entries done or failed","description":"Marks entries of the person's queue `done` or `failed`, with an optional note the person reads in Studio. An entry already finished is answered as it is. Ids that name no entry of theirs come back in `not_found`.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueComplete"}}}},"responses":{"200":{"description":"The entries as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueCompleteResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"queue_complete"}},"/queue/{id}/remove":{"post":{"operationId":"queue.remove","tags":["queue"],"summary":"Remove a prompt from the AI queue","description":"The person removes one waiting entry. Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"h3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The entry as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueEntry"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/queue/clear":{"post":{"operationId":"queue.clear","tags":["queue"],"summary":"Clear the AI queue","description":"The person removes every waiting entry. Not open to agents.","responses":{"200":{"description":"How many went.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueClearResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/prompts":{"get":{"operationId":"prompts.list","tags":["prompts"],"summary":"Your saved prompts","description":"The person's own saved prompts, by title (at most 100). The person's own session only: not open to agents.","responses":{"200":{"description":"The prompts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomPromptList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"},"post":{"operationId":"prompts.create","tags":["prompts"],"summary":"Save a prompt","description":"Saves a prompt of the person's own. Control and format characters are stripped; a placeholder other than those its `fits` allows is refused with a sentence naming them. At most 100 a person (429 `quota_exceeded`); at most 60 writes a minute (429 `rate_limited`). The person's own session only: not open to agents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomPromptCreate"}}}},"responses":{"201":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomPrompt"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/prompts/{id}":{"patch":{"operationId":"prompts.update","tags":["prompts"],"summary":"Edit a saved prompt","description":"Changes the person's own prompt, checked whole again. A queue entry added from it keeps the text it was added with. The person's own session only: not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"p3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomPromptUpdate"}}}},"responses":{"200":{"description":"The prompt as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomPrompt"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/prompts/{id}/delete":{"post":{"operationId":"prompts.delete","tags":["prompts"],"summary":"Delete a saved prompt","description":"Deletes the person's own prompt. A queue entry added from it keeps its text. The person's own session only: not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"p3m8wq2z5rtc"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomPromptDeleted"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/exports":{"post":{"operationId":"profile.export.request","tags":["profile"],"summary":"Download everything: ask for the account's export","description":"Queues one archive of every collection you own (not those shared with you), each as `collections.export` writes it with every item and every note whole (files listed by id and size), and a manifest. It is made in the background: the person gets a bell row and an email when it is ready, and it is kept for 7 days. Counts against no storage. While one is queued, being made or ready, another is 409 `export_in_progress` with that one in `export`. Then `profile.export.get` says its state and `profile.export.download` reads it.","security":[{"agentToken":[]},{}],"responses":{"202":{"description":"Queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExport"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `export_in_progress`: An export of the account is already queued, being made, or ready for its 7 days; `export` is that one. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","export_in_progress","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"profile_export_request"},"get":{"operationId":"profile.export.get","tags":["profile"],"summary":"The account's latest export","description":"The newest export of your account, in any state, or null when none was ever asked for. Ready: read it with `profile.export.download` until `expires_at`.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The latest export, or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExportLatest"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"profile_export_get"}},"/me/exports/{id}/download":{"get":{"operationId":"profile.export.download","tags":["profile"],"summary":"Read the export in chunks, through the call","description":"A ready export of your own account in chunks of 98304 bytes, base64, as `items.download` serves a file: call with no index for chunk 0 (which says `chunk_count`), then each `next_index` until `last`; the chunks joined are the JSON archive exactly, each with its SHA-256. Another account's export is `not_found`; one past its 7 days is 410 `download_expired`; one not ready yet is `not_found` with its `state`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"e7kq2xz4m9np"},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Which chunk, from 0 (the default). Chunk 0 says how many there are.","example":0},"required":false,"description":"Which chunk, from 0 (the default). Chunk 0 says how many there are.","name":"index","in":"query"}],"responses":{"200":{"description":"One chunk.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExportChunk"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`download_expired`: The download window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["download_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"profile_export_download"}},"/me/exports/{id}/archive":{"get":{"operationId":"profile.export.archive","tags":["profile"],"summary":"Download the export","description":"Profile's Download: the archive whole, streamed as an attachment, for the signed-in person whose export it is (the session cookie only). Past its 7 days it is 410 `download_expired`.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"e7kq2xz4m9np"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The archive, a JSON document, as a file (an attachment named zegazone-export-….json).","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`download_expired`: The download window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["download_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/deletion":{"get":{"operationId":"profile.deletion.get","tags":["profile"],"summary":"What deleting the account would take","description":"The counts Profile's Delete account sheet lists: collections and items (and how many are published), handles and their channels, channel prices and their subscribers, AI connections and API keys. Read it with the session cookie, or with an agent token holding `profile:read` to tell the person what would go. Confirming is `profile.deletion.confirm`, which only the person's own session can call: no token, tool or navigation confirms a deletion (B-API-205).","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"What goes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionSummary"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:read"},"post":{"operationId":"profile.deletion.confirm","tags":["profile"],"summary":"Delete the account (the person's own session only)","description":"Profile's red Delete account. The session cookie only: a bearer token is 401 `wrong_token_type`. `email` must be the account's own (spaces and case ignored), else 400 `invalid_request` with `reason` `email_mismatch` and nothing changes. Then every session ends (the cookie is cleared) and, until it completes or is cancelled, the account looks deleted to everyone: its public collection and publisher pages answer the not-found page, its handles stay held and its agent tokens are refused. Deletion completes in 14 days. Sign in before then to cancel it. Signing in within the 14 days cancels it and everything works again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionConfirm"}}}},"responses":{"200":{"description":"The window is open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionPending"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing":{"get":{"operationId":"sharing.list","tags":["sharing"],"summary":"Who a collection is shared with","description":"Owner only (B-SHARE-110). The people (members and pending invitations by name, with their switches), the email invitations with their expiry, the invite links with who joined through each, the pending access requests, the invite template, the Requests switch and the count toward 50. Needs collections:read.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"responses":{"200":{"description":"The collection's sharing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sharing"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"sharing_list"}},"/sharing/received":{"get":{"operationId":"sharing.received","tags":["sharing"],"summary":"Invitations waiting for you","description":"Your pending invitations by name, newest first: the collection's name, who invited you, what you would be able to do and how many items it holds. Accept or decline with `sharing.accept` and `sharing.decline`. Needs collections:read.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"Your pending invitations with the exact total.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingReceivedList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"sharing_received"}},"/collections/{id}/sharing/invitations":{"post":{"operationId":"sharing.invite","tags":["sharing"],"summary":"Invite someone","description":"Owner only, and only once your email is confirmed (`email_verification_required`). By id or username, or by address: an account with the address is invited in the app, any other address gets a 7-day email invitation for that address only (the person's own, not an agent's). The invitee sees it at once and accepts or declines in one step. At most 50 people (members plus open invitations) and 20 invitations waiting for an answer on a collection, and 50 sent in 24 hours, are `quota_exceeded`, checked before the person is looked up. An agent's invitations are also limited to 15 an hour per account (`rate_limited` with Retry-After); the person's own are not. Someone already on the collection, or yourself, is `invalid_request`. Needs sharing:write.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingInvite"}}}},"responses":{"201":{"description":"The pending member, or the email invitation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingInvited"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"sharing:write","x-mcp-tool":"sharing_invite"}},"/collections/{id}/sharing/members/{person}":{"patch":{"operationId":"sharing.update","tags":["sharing"],"summary":"Change a person's permissions","description":"Owner only. Changes the switches sent, on a pending or an accepted member; none at all is `invalid_request`. Lowering anything an accepted member held bumps the epoch in the same change, so their URLs stop from the next request (B-ACCESS-179). Needs sharing:write.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"A member's id (an account's id, as `sharing.list` returns it), or for `sharing.remove` an open email invitation's id."},"required":true,"description":"A member's id (an account's id, as `sharing.list` returns it), or for `sharing.remove` an open email invitation's id.","name":"person","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingUpdate"}}}},"responses":{"200":{"description":"The member as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingUpdated"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"sharing:write","x-mcp-tool":"sharing_update"},"delete":{"operationId":"sharing.remove","tags":["sharing"],"summary":"Remove a person or an invitation","description":"Owner only. Deletes a member (pending or accepted) or an open email invitation by its id; a removal that deleted nothing is `not_found`, never success. Removing an accepted member bumps the epoch: they lose access at once, including to the sub-collections; their uploads stay. Needs sharing:write.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"A member's id (an account's id, as `sharing.list` returns it), or for `sharing.remove` an open email invitation's id."},"required":true,"description":"A member's id (an account's id, as `sharing.list` returns it), or for `sharing.remove` an open email invitation's id.","name":"person","in":"path"}],"responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingRemoved"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"sharing:write","x-mcp-tool":"sharing_remove"}},"/collections/{id}/sharing/accept":{"post":{"operationId":"sharing.accept","tags":["sharing"],"summary":"Accept an invitation","description":"Your own pending invitation to this collection becomes a membership, in one step (B-SHARE-129). The owner is told. Needs sharing:write.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"responses":{"200":{"description":"You are a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingAccepted"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"sharing:write","x-mcp-tool":"sharing_accept"}},"/collections/{id}/sharing/decline":{"post":{"operationId":"sharing.decline","tags":["sharing"],"summary":"Decline an invitation","description":"Your own pending invitation to this collection is deleted; no one is notified (B-SHARE-060). Needs sharing:write.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"responses":{"200":{"description":"Declined.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingDeclined"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"sharing:write","x-mcp-tool":"sharing_decline"}},"/collections/{id}/sharing/leave":{"post":{"operationId":"sharing.leave","tags":["sharing"],"summary":"Leave a collection shared with you","description":"Ends your own membership: your access to the collection and to its sub-collections stops at once, and the owner is told (B-SHARE-133). Needs sharing:write.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"responses":{"200":{"description":"You have left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingLeft"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"sharing:write","x-mcp-tool":"sharing_leave"}},"/collections/{id}/sharing/lookup":{"get":{"operationId":"sharing.lookup","tags":["sharing"],"summary":"Find someone to invite","description":"Studio's Invite field, as you type from 2 characters: display names and usernames, never aliases, never you, at most 25; a person already on the collection is marked `member`. An address is answered only with whether it becomes an in-app or an email invitation (B-SHARE-103, 112). Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"},{"schema":{"type":"string","maxLength":320,"description":"Name, username or address."},"required":true,"description":"Name, username or address.","name":"q","in":"query"}],"responses":{"200":{"description":"The matches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingLookup"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/invitations/{invitation}/resend":{"post":{"operationId":"sharing.resend","tags":["sharing"],"summary":"Send an email invitation again","description":"Owner only, with a confirmed email. A new token and a new 7 days; the old link stops; the template's switches are restated (B-SHARE-113). An expired invitation counts toward the limits again. Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"An email invitation's id, as `sharing.list` returns it."},"required":true,"description":"An email invitation's id, as `sharing.list` returns it.","name":"invitation","in":"path"}],"responses":{"200":{"description":"The invitation as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingResent"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/settings":{"patch":{"operationId":"sharing.settings","tags":["sharing"],"summary":"Save the invite template or the Requests switch","description":"Owner only. The invite template (four switches, saved for the collection, B-SHARE-114) and the Requests switch (B-SHARE-115), each saved at once. Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingSettings"}}}},"responses":{"200":{"description":"The settings as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingSettingsSaved"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/links":{"post":{"operationId":"sharing.link_create","tags":["sharing"],"summary":"Make an invite link","description":"Owner only, with a confirmed email. A link carrying the template's switches (any stated one wins), an expiry and a join limit; its code is in the answer once and only a hash is kept (B-SHARE-123, 124). Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingLinkCreate"}}}},"responses":{"201":{"description":"The link and its code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingLinkMinted"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/links/{link}":{"delete":{"operationId":"sharing.link_revoke","tags":["sharing"],"summary":"Revoke an invite link, or remove a dead one","description":"Owner only. An active link stops at once; people who joined through it stay members (B-SHARE-127). On a link already revoked, expired or used up, the same call removes it from the list. Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"An invite link's id, as `sharing.list` returns it."},"required":true,"description":"An invite link's id, as `sharing.list` returns it.","name":"link","in":"path"}],"responses":{"200":{"description":"Revoked or removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingLinkEnded"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/requests":{"post":{"operationId":"sharing.request_access","tags":["sharing"],"summary":"Ask for access","description":"A signed-in person who is not the owner or a member asks to join a published Public or Restricted collection while its Requests switch is on (B-SHARE-043, 115, 135). Any other collection is `not_found`. 5 an hour and 20 a day per person, and 10 an hour and 20 a day per collection, are `rate_limited` with Retry-After, asked before the collection is looked up (B-SHARE-044); so are more than 30 attempts an hour per person, whatever they answer. A reason the gate can read is in `state`: `owner`, `member`, `requests_disabled`, `pending`, `rejected`. Open to an unverified account; not open to agents (B-SHARE-086).","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingRequestAccess"}}}},"responses":{"201":{"description":"The pending request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingRequested"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/requests/mine":{"delete":{"operationId":"sharing.request_withdraw","tags":["sharing"],"summary":"Take back your request","description":"Withdraws your own pending request, so you may ask again later; the owner's row updates (B-SHARE-048, 131). Anything else is one indistinct `not_found`.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"}],"responses":{"200":{"description":"Withdrawn.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingWithdrawn"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/requests/{request}/accept":{"post":{"operationId":"sharing.request_accept","tags":["sharing"],"summary":"Accept an access request","description":"Owner only, with a confirmed email. The person becomes an accepted member with view only (R18): raise their switches afterwards with `sharing.update`. Counts toward the 50. Accepting an accepted request changes nothing; a declined one is `invalid_request` (B-SHARE-046, 116). Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"An access request's id, as `sharing.list` returns it."},"required":true,"description":"An access request's id, as `sharing.list` returns it.","name":"request","in":"path"}],"responses":{"200":{"description":"The request, resolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingResolved"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/sharing/requests/{request}/decline":{"post":{"operationId":"sharing.request_decline","tags":["sharing"],"summary":"Decline an access request","description":"Owner only. The request stays, rejected, and that person cannot ask again; only an invitation opens the way (B-SHARE-047, 116). Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The collection's id.","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"An access request's id, as `sharing.list` returns it."},"required":true,"description":"An access request's id, as `sharing.list` returns it.","name":"request","in":"path"}],"responses":{"200":{"description":"The request, resolved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingResolved"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/sharing/links/join":{"post":{"operationId":"sharing.link_join","tags":["sharing"],"summary":"Join through an invite link","description":"A signed-in person joins with a link's code: an accepted member at once with the link's switches, counted against the link's limit and the collection's 50 (B-SHARE-126). Open to an unverified account (B-SHARE-139). An unknown, revoked, expired or used-up code is one identical `not_found` (B-SHARE-124); a full collection is `quota_exceeded`. The owner is told at each join.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingCode"}}}},"responses":{"200":{"description":"Joined, or already a member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingJoined"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/sharing/invitations/accept":{"post":{"operationId":"sharing.invitation_accept","tags":["sharing"],"summary":"Accept an email invitation","description":"A signed-in account whose address is the invited one accepts with the token of the email (B-SHARE-024). An expired or already accepted token is `invalid_request` with its `state`; another address is `forbidden`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingToken"}}}},"responses":{"200":{"description":"Accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingJoined"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/sharing/links/preview":{"post":{"operationId":"sharing.link_preview","tags":["sharing"],"summary":"What an invite link's landing shows","description":"No credential. The inviter's name, the collection's name, its item count and kinds, what the visitor would be able to do and when the link ends (B-SHARE-125). An unknown, revoked, expired or used-up code is one identical `not_found` (B-SHARE-124). Limited per address.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingCode"}}}},"responses":{"200":{"description":"The preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingLinkPreview"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/sharing/invitations/preview":{"post":{"operationId":"sharing.invitation_preview","tags":["sharing"],"summary":"What an email invitation's landing shows","description":"No credential. The inviter, the collection and the address it is for, with a `state` of open, expired or accepted (B-SHARE-130). A token that is not one, or was withdrawn, is `not_found`. Limited per address.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingToken"}}}},"responses":{"200":{"description":"The preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharingInvitationPreview"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/collections/{id}/items/upload":{"post":{"operationId":"items.upload","tags":["items"],"summary":"Start an upload into a collection","description":"Creates a pending item and returns where to PUT its bytes (B-UPLOAD-130), or, with transfer inline, how to send them in 512 KiB chunks through the API (at most 25 MB; over it, 413 `file_too_large` naming the link route). Needs can_upload. The declared size is checked against the collection owner's plan, whoever uploads (B-UPLOAD-174): over the per-file cap is 413 `file_too_large`, over the owner's storage 413 `storage_quota_exceeded` with `bytes_used`, `limit_bytes` and `plan` (B-UPLOAD-101). A collection holding 5,000 live items refuses it (429 `quota_exceeded`). Then PUT the bytes (or send the chunks) and call finalise; the item reaches lists and live updates only then. With `replace_item_id` (ZEG-1531) no item is created: the bytes become that note's text at finalise, the note keeping its id and everything else, and nothing is charged. The storage the upload reserves lapses 15 minutes after its last sign of life (its start, an items.renew, an inline chunk): while uploading, renew at least every 10 minutes, or finalise may find the space taken.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"responses":{"201":{"description":"The pending item and its PUT (or its chunks).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadStarted"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `invalid_skill`: A skill is refused; `reason` names why: skill_md_missing, frontmatter_missing, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, markdown_missing, markdown_too_long, not_a_zip, zip_unsupported, unsafe_path, too_many_files, skill_too_large, not_single_folder, bundle_not_editable, binary_file (a file handed over MCP as text holds bytes that are not text) or path_conflict (a file where the bundle has a folder, or inside one of its files). `not_a_text_note`: A text-note operation on an item that is not a note.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","invalid_skill","not_a_text_note"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","insufficient_permission","account_suspended","forbidden","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `note_changed`: The note's text changed since the version this write was based on; nothing was written. Read it again (`current_version`) and redo the change, or send `force: true` to write over it. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","note_changed","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size. `storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large","storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_upload"}},"/items/{id}/finalise":{"post":{"operationId":"items.finalise","tags":["items"],"summary":"Finish an upload","description":"The uploader, after the PUT. Checks the bytes arrived (409 `upload_not_found` while they have not), records their measured size (more than the declared size + 1 % is 400 `integrity_mismatch` and the item stays pending), reads their type from the bytes (the declared type is only a hint, B-UPLOAD-132), stores the viewer, charges the collection owner's storage and makes the item visible at the end of the collection, which is when live updates announce it (B-UPLOAD-169). A Markdown file (its filename ends .md, .markdown or .mdown; UTF-8, at most 524,288 characters) becomes a Markdown text note instead, under the same item id, with `converted_to_note: true`, unless the collection owner turned off `uploads.markdown_as_notes` (ZEG-1418). The filename decides, never the PUT's Content-Type or how the bytes begin (R622). `converted_to_note: false` on a Markdown file means it did NOT become a note: `kept_as_file_reason` and `warning` say why, and items.convert_to_note can make a text file a note later. For an upload started with `replace_item_id` (ZEG-1531), the item is that note: its text is replaced in place (`replaced: true`), exactly as items.update with `text` replaces it, the uploaded file is deleted, and a stale `base_version` is 409 `note_changed` (the bytes stay for another finalise). Past the 24-hour window, 410 `upload_expired`. Again after success: the item, `noop: true`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFinaliseRequest"}}}},"responses":{"200":{"description":"The item, now visible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFinalise"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received. `invalid_skill`: A skill is refused; `reason` names why: skill_md_missing, frontmatter_missing, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, markdown_missing, markdown_too_long, not_a_zip, zip_unsupported, unsafe_path, too_many_files, skill_too_large, not_single_folder, bundle_not_editable, binary_file (a file handed over MCP as text holds bytes that are not text) or path_conflict (a file where the bundle has a folder, or inside one of its files).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","integrity_mismatch","invalid_skill"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","insufficient_permission","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `upload_not_found`: Finalise found no uploaded bytes for this item yet; PUT them, then finalise again. `note_changed`: The note's text changed since the version this write was based on; nothing was written. Read it again (`current_version`) and redo the change, or send `force: true` to write over it. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","upload_not_found","note_changed","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_finalise"}},"/uploads/{upload_id}/chunks":{"post":{"operationId":"items.upload_chunk","tags":["items"],"summary":"Send one chunk of an inline upload","description":"The uploader, between an inline items.upload and finalise: stores chunk `index` (base64 `data`, exactly the chunk size but for the last one). A chunk sent again with the same index and the same bytes changes nothing (`noop: true`); other bytes for the same index are 409 `idempotency_conflict`. Chunks may arrive in any order. A chunk of the wrong length or with a wrong sha256 is 400 `integrity_mismatch` and nothing is stored. An upload that is not inline is 400 `invalid_request`; past the 24-hour window, 410 `upload_expired`; a finished upload, 400 `invalid_request`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"u7rt2bx9kz4m","description":"The upload_id that items.upload answered (not the item_id)."},"required":true,"description":"The upload_id that items.upload answered (not the item_id).","name":"upload_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChunkRequest"}}}},"responses":{"200":{"description":"The chunk is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChunk"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","insufficient_permission","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_upload_chunk"}},"/items/{id}/renew":{"post":{"operationId":"items.renew","tags":["items"],"summary":"Fresh PUT URLs for an upload","description":"The uploader, between create and finalise, when a PUT URL has lapsed (each lasts 15 minutes): the same key and, above 100 MiB, the same multipart upload with every part's URL signed again, so parts already sent keep their ETags. Renew at least every 10 minutes while uploading, not only when a URL lapsed: the upload's storage reservation lapses 15 minutes after its last sign of life. Writes nothing but the upload's renewal time (its storage reservation holds another 15 minutes) and does not move the 24-hour window: past it, 410 `upload_expired`. A finished upload is 400 `invalid_request`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"The upload's PUT, signed again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRenewal"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","insufficient_permission","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write"}},"/items/{id}/abort":{"post":{"operationId":"items.abort","tags":["items"],"summary":"Cancel an upload","description":"The uploader, before finalise: deletes the pending item at once, abandons its multipart upload and deletes any bytes that arrived. The pending item was never shown, announced or charged, so nothing else changes. An upload never finalised and never aborted is removed after 24 hours anyway (B-UPLOAD-167). A finished upload is 400 `invalid_request` (delete the item instead); again after success, 404 `not_found`. For a replace of a note's text (ZEG-1531), only the replace is cancelled: the note stays as it was (`note_kept`), and a finished replace is 400 `invalid_request` saying the note holds the new text.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"The upload is gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadAbort"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","insufficient_permission","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_abort"}},"/items/{id}/convert-to-note":{"post":{"operationId":"items.convert_to_note","tags":["items"],"summary":"Turn a text file into a Markdown note","description":"A file item whose stored type is text/plain or text/markdown becomes a Markdown text note holding the file's text, in place (R622): its id, number, position, name, description, tags, custom thumbnail and thumbnail label stay. Needs can_edit. The text must be UTF-8, not empty and at most 524,288 characters; otherwise 400 `invalid_request` says why and nothing changes. The note is the item's content from then on: the file's bytes stop counting against the owner's storage and go to the bin, which deletes them for good after 14 days. Live updates announce it as an update. Any other kind or type is 400 `invalid_request`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"responses":{"200":{"description":"The note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemConvertToNote"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","insufficient_permission","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_convert_to_note"}},"/collections/{id}/cover":{"post":{"operationId":"collections.set_cover","tags":["collections"],"summary":"Set a collection's cover","description":"The owner chooses the collection's one square cover (B-COLL-144): an uploaded image, one of its items (rendered from that item's image or custom thumbnail, never its tile, B-UPLOAD-140), or none (the first item's default thumbnail). `source: url` with `url` has the server fetch an http(s) image for you and finishes in the one call; `source: free_photo` with `provider` and `photo_id` (a photo `photos.search` found, ZEG-1528) does the same from that provider's own image paths, and takes no URL. Every new image takes effect only once its renditions exist: the call renders it, then puts it in place, and a failed render answers 502 `render_failed` with nothing changed (B-UPLOAD-143). Where the processing queue runs (staging, production), a new image is the exception (ZEG-1147, ZEG-1152): finishing its upload (or a cover from an item) records the choice and answers `rendering` at once, the item, collection or profile showing the new image with no renditions yet (`urls` empty or null); they are made behind the answer and announced as its event (`items.set_thumbnail`, `collections.set_cover`, `profile.set_avatar`). The image it replaces stays until then; a render that cannot be made puts it back, and a thumbnail's event then carries `thumbnail.render_failed: true`. The image it replaces is disposed of after. An upload is two calls around a PUT: `source: upload` with `filename` and `size_bytes` (at most 25 MB, never charged, B-UPLOAD-165) answers `upload_started` with where to PUT; after the PUT, `source: upload` with `upload_id` renders and sets it. `focal` alone moves the current image's crop: its square renditions are re-cut in the background (`rendering`), the current ones served until then.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverRequest"}}}},"responses":{"200":{"description":"The collection, its cover as it now stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoverChange"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`upload_not_found`: Finalise found no uploaded bytes for this item yet; PUT them, then finalise again. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_not_found","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"502":{"description":"`render_failed`: The image could not be rendered (undecodable, or the renderer failed); nothing changed. Retry, or use another image.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["render_failed"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `photo_search_unavailable`: Free-photo search is not available: no provider key is set here, or the provider is down or out of quota (`reason`). Upload your own image instead, or try again in a minute.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","photo_search_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_set_cover"}},"/items/{id}/thumbnail":{"post":{"operationId":"items.set_thumbnail","tags":["items"],"summary":"Set an item's thumbnail","description":"The collection's owner chooses what the item's tile shows: a custom image, which wins over every automatic one (B-UPLOAD-173); auto, its own image once rendered, else its kind's default thumbnail; one of the 34 default thumbnails, `placeholder:<kind>`; or, on any item, one of 14 social platforms' tiles, `placeholder:<platform>` (ZEG-1559; the item then answers `thumbnail.placeholder_platform`). Any other name is 400 (B-MEDIA-030). `source: url` with `url` has the server fetch an http(s) image for you and finishes in the one call; `source: free_photo` with `provider` and `photo_id` (a photo `photos.search` found, ZEG-1528) does the same from that provider's own image paths, and takes no URL. Every new image takes effect only once its renditions exist: the call renders it, then puts it in place, and a failed render answers 502 `render_failed` with nothing changed (B-UPLOAD-143). Where the processing queue runs (staging, production), a new image is the exception (ZEG-1147, ZEG-1152): finishing its upload (or a cover from an item) records the choice and answers `rendering` at once, the item, collection or profile showing the new image with no renditions yet (`urls` empty or null); they are made behind the answer and announced as its event (`items.set_thumbnail`, `collections.set_cover`, `profile.set_avatar`). The image it replaces stays until then; a render that cannot be made puts it back, and a thumbnail's event then carries `thumbnail.render_failed: true`. The image it replaces is disposed of after. An upload is two calls around a PUT: `source: upload` with `filename` and `size_bytes` (at most 25 MB, never charged, B-UPLOAD-165) answers `upload_started` with where to PUT; after the PUT, `source: upload` with `upload_id` renders and sets it. `focal` alone moves the current image's crop: its square renditions are re-cut in the background (`rendering`), the current ones served until then.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailRequest"}}}},"responses":{"200":{"description":"The item, its thumbnail as it now stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailChange"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`upload_not_found`: Finalise found no uploaded bytes for this item yet; PUT them, then finalise again. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_not_found","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"502":{"description":"`render_failed`: The image could not be rendered (undecodable, or the renderer failed); nothing changed. Retry, or use another image.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["render_failed"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `photo_search_unavailable`: Free-photo search is not available: no provider key is set here, or the provider is down or out of quota (`reason`). Upload your own image instead, or try again in a minute.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","photo_search_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_set_thumbnail"}},"/profile/avatar":{"post":{"operationId":"profile.set_avatar","tags":["profile"],"summary":"Set your avatar","description":"Your own avatar (B-AUTH-158): an uploaded image, or none. Its renditions are public, tokenless bytes at `/pub/u/{user}/{epoch}/{variant}`; every change moves them to a new epoch and the previous addresses stop answering (R6, B-UPLOAD-171). With `alias_id` it is that alias's own picture on its public profile instead (ZEG-1476), at `/pub/a/{alias}/{epoch}/{variant}`; the answer's `avatar` is then the alias's. Every new image takes effect only once its renditions exist: the call renders it, then puts it in place, and a failed render answers 502 `render_failed` with nothing changed (B-UPLOAD-143). Where the processing queue runs (staging, production), a new image is the exception (ZEG-1147, ZEG-1152): finishing its upload (or a cover from an item) records the choice and answers `rendering` at once, the item, collection or profile showing the new image with no renditions yet (`urls` empty or null); they are made behind the answer and announced as its event (`items.set_thumbnail`, `collections.set_cover`, `profile.set_avatar`). The image it replaces stays until then; a render that cannot be made puts it back, and a thumbnail's event then carries `thumbnail.render_failed: true`. The image it replaces is disposed of after. An upload is two calls around a PUT: `source: upload` with `filename` and `size_bytes` (at most 25 MB, never charged, B-UPLOAD-165) answers `upload_started` with where to PUT; after the PUT, `source: upload` with `upload_id` renders and sets it. `focal` alone moves the current image's crop: its square renditions are re-cut in the background (`rendering`), the current ones served until then.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarRequest"}}}},"responses":{"200":{"description":"Your avatar as it now stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarChange"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`upload_not_found`: Finalise found no uploaded bytes for this item yet; PUT them, then finalise again. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_not_found","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"502":{"description":"`render_failed`: The image could not be rendered (undecodable, or the renderer failed); nothing changed. Retry, or use another image.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["render_failed"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `photo_search_unavailable`: Free-photo search is not available: no provider key is set here, or the provider is down or out of quota (`reason`). Upload your own image instead, or try again in a minute.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","photo_search_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:write","x-mcp-tool":"profile_set_avatar"}},"/photos/search":{"get":{"operationId":"photos.search","tags":["photos"],"summary":"Search free photos","description":"Free photos for a keyword, from Pexels first and Pixabay second (ZEG-1528), 24 a page, one provider's photos an answer. Choose one with `source: free_photo`, `provider` and `photo_id` on `collections.set_cover` or `items.set_thumbnail`: the server fetches it from the provider and stores it as an uploaded image, so nothing shown later comes from the provider's host. Show `attribution` (the provider's line and link) whenever you show the results: the providers' terms require it. Each photo also carries `credit`, the provider's data on who took it; no term requires showing it, and Zegazone does not. Pixabay is searched with safe search on. Answers are kept 24 hours. At most 30 searches a minute per account (429 `rate_limited`). 503 `photo_search_unavailable` when no provider is configured here (`reason: not_configured`), or the provider is down or out of quota (`provider_down`, `provider_quota`: try again in a minute). An agent needs `items:read`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","maxLength":200,"description":"The keywords (at most 100 characters are searched). Absent or empty: no provider is asked, and the answer only says which providers this server can search (`providers`, empty when none is configured).","example":"mountain lake"},"required":false,"description":"The keywords (at most 100 characters are searched). Absent or empty: no provider is asked, and the answer only says which providers this server can search (`providers`, empty when none is configured).","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":20,"description":"The page, 1 to 20; 24 photos a page."},"required":false,"description":"The page, 1 to 20; 24 photos a page.","name":"page","in":"query"},{"schema":{"type":"string","enum":["pexels","pixabay"],"description":"Only this provider. Absent: the first configured (Pexels, then Pixabay), and the next one when the first is down or out of quota."},"required":false,"description":"Only this provider. Absent: the first configured (Pexels, then Pixabay), and the next one when the first is down or out of quota.","name":"provider","in":"query"},{"schema":{"type":"string","enum":["landscape","portrait","square"],"description":"Only photos of this shape (Pixabay has no square: any shape there)."},"required":false,"description":"Only photos of this shape (Pixabay has no square: any shape there).","name":"orientation","in":"query"}],"responses":{"200":{"description":"A page of photos.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoSearch"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds. `photo_search_unavailable`: Free-photo search is not available: no provider key is set here, or the provider is down or out of quota (`reason`). Upload your own image instead, or try again in a minute.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy","photo_search_unavailable"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"photos_search"}},"/photos/preview":{"get":{"operationId":"photos.preview","tags":["photos"],"summary":"A free photo's preview, for Studio","description":"The bytes of one photos.search result's thumbnail_url or preview_url, fetched by the server for Studio's picker, whose page policy shows images only from Zegazone's own hosts. Only an address on Pexels' or Pixabay's image paths (images.pexels.com/photos/, cdn.pixabay.com/photo/, pixabay.com/get/; every redirect checked before it is followed), at most 2 MB, JPEG, PNG or WebP (GIF and SVG refused); never stored. At most 240 a minute per account (429 `rate_limited`). The session's alone: an agent token is refused (401 `wrong_token_type`) and an agent reads the URLs themselves.","parameters":[{"schema":{"type":"string","maxLength":2048,"description":"A thumbnail_url or preview_url photos.search answered."},"required":true,"description":"A thumbnail_url or preview_url photos.search answered.","name":"url","in":"query"}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/tokens":{"post":{"operationId":"profile.tokens.create","tags":["profile"],"summary":"Mint a personal agent token","description":"Needs a signed-in session and proof of the person within the last 10 minutes (ZEG-1401): the session signed in that recently, or `current_password` for an account with a password. Otherwise 403 `reauthentication_required` with `reason` `password_required` (send `current_password`) or `sign_in_again` (an account without a password: sign in again). A wrong password is 400 `invalid_request` on `current_password`; attempts are rate-limited per IP (429). A bearer token, personal or OAuth, never mints one (401 `wrong_token_type`). The answer carries the token once; only its peppered hash is stored. The token is also a connection (`GET /connections`), and an account holds at most its plan's live-token limit (`quota_exceeded`). The longest expiry is 365 days.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintAgentToken"}}}},"responses":{"201":{"description":"Minted. `token` is shown here only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintedAgentToken"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `reauthentication_required`: A sensitive action wants a recent sign-in. Changing the password on a session over 24 hours old (R108): the identity provider wants the code it emails; `address` shows where it goes. Send it with `POST /auth/password/code`, then repeat the change with `code`. Minting a personal agent token (`POST /tokens`, ZEG-1401) wants proof within 10 minutes: `reason` `password_required`, repeat it with `current_password`; `sign_in_again`, sign in again, then repeat it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","reauthentication_required","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens). `rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded","rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"},"get":{"operationId":"profile.tokens.list","tags":["profile"],"summary":"List this account's agent tokens","parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"The account's tokens, newest first, with the exact total. Never a token value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTokenList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/tokens/{id}":{"delete":{"operationId":"profile.tokens.revoke","tags":["profile"],"summary":"Revoke one of this account's agent tokens","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked (or already revoked). Its next request is 401 `token_revoked`, from anywhere."},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/connections":{"get":{"operationId":"profile.connections.list","tags":["profile"],"summary":"List this account's connections","description":"Everything that can act as the person: each OAuth grant (a client allowed on the consent page) and each personal token, newest first, with the exact total. A disconnected or expired connection is not listed. Each carries its scopes as one plain-words line (B-API-173).","parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"The connections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/connections/{id}":{"patch":{"operationId":"profile.connections.update","tags":["profile"],"summary":"Change a connection's \"Can move the Player\"","description":"Turns \"Can move the Player\" on or off for one connection (B-API-208). Off, every Player command from that client is refused `stopped by the person` until it is turned back on.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionUpdate"}}}},"responses":{"200":{"description":"The connection as now stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"},"delete":{"operationId":"profile.connections.disconnect","tags":["profile"],"summary":"Disconnect one connection","description":"Revokes the connection and every token under it: its next request, on MCP or REST, is refused 401 `token_revoked`. The person's other connections keep working and their library is untouched (B-API-174). Disconnecting what is already disconnected answers 204 again.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Disconnected (or already disconnected)."},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/connections/disconnect-all":{"post":{"operationId":"profile.connections.disconnect_all","tags":["profile"],"summary":"Disconnect everything","description":"Revokes every connection of the person, on every client, with the same next-request effect as disconnecting one (B-API-175). The library is untouched.","responses":{"200":{"description":"How many connections were ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectedAll"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/activity":{"get":{"operationId":"activity.list","tags":["profile"],"summary":"Recent agent activity","description":"The writes the person's agents made, newest first, for the last 30 days, with the total: exact up to 500 rows (or offset + limit, when larger), else that bound with `total_capped` true. Reads and navigation never appear (B-API-209); a settings change appears as \"<client> updated settings\" (B-API-220). A person reads it with the session cookie; an agent with a bearer token holding `profile:read`, and its call is counted.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"The activity, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActivityList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:read","x-mcp-tool":"activity_list"}},"/collections/{id}/publishing/publish":{"post":{"operationId":"publishing.publish","tags":["publishing"],"summary":"Publish a collection at an address","description":"Owner only, and only once your email is confirmed (`email_verification_required`). An adult collection is never published (R-ZEG-1610): its publish is 400 `invalid_request` with `reason: \"adult_collection\"` and `allowed_levels: []`; share it with people by name or email instead. Gives the collection the address `/{handle}/{slug}` on the apex (B-PUBLISH-014) and lets its level reach people who are not members. A publish never lists it in Discovery: that is `publishing.set_discovery` (B-PUBLISH-191). At most 3 published at once on Free (`publish_limit_reached`, with `current`, `max` and `plan`; republishing is never blocked, B-PUBLISH-129). While published its name, handle and address are locked (R24); publishing again with another level changes the level. A handle that is not yours or not an alias of yours is refused (`invalid_request` on `handle`); a taken slug is `slug_taken`. Nothing new publishes under a frozen alias, one kept over the plan's channels after Pro ended (`alias_frozen`, B-AUTH-191): a collection already published under it stays, and its level can still change.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishingPublishRequest"}}}},"responses":{"200":{"description":"Published, republished, `noop`, or the dry run's report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPublication"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `publish_limit_reached`: The plan's published-collection cap is reached. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission","publish_limit_reached","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `publish_handle_locked`: The handle of a published collection cannot change. `slug_taken`: The slug is reserved (deleted collections included). `publish_held`: The secret check found a possible secret: fix the item or mark the finding not a secret, then publish. `alias_frozen`: The alias is frozen (over the plan's channels): what is published under it stays, nothing new publishes under it. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","publish_handle_locked","slug_taken","publish_held","alias_frozen","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"publishing_publish"}},"/collections/{id}/publishing/unpublish":{"post":{"operationId":"publishing.unpublish","tags":["publishing"],"summary":"Unpublish a collection","description":"Owner only. Clears the published state and bumps the epoch in the same change, so every address and public URL minted before answers 404 from the next request (B-ACCESS-179); the level stays for the next publish unless one is stated, the Discovery listing goes with the publication (B-PUBLISH-005), and the address is kept for a republish. Nothing redirects (B-PUBLISH-019).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishingUnpublishRequest"}}}},"responses":{"200":{"description":"Unpublished, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPublishing"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"publishing_unpublish"}},"/collections/{id}/publishing/discovery":{"post":{"operationId":"publishing.set_discovery","tags":["publishing"],"summary":"List or unlist a collection in Discovery","description":"Owner only. Discovery is its own switch (R25): open only while the collection is published and public, else `invalid_request` on `searchable` (B-PUBLISH-028, 132). Unpublishing or lowering the level turns it off, and republishing never turns it back on. Listing changes nothing about who may view.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishingDiscoveryRequest"}}}},"responses":{"200":{"description":"Listed, unlisted, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionPublishing"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"publishing_set_discovery"}},"/collections/{id}/publishing/secret-check":{"post":{"operationId":"publishing.check_secrets","tags":["publishing"],"summary":"Check a collection for secrets","description":"Owner only (or a workspace member who may publish it). Scans the collection's notes and text files (HTML, Markdown, plain text, code) and their descriptions for keys, tokens and passwords with deterministic pattern and entropy rules, never a model (B-PUBLISH-168), and answers what it found, masked. A priced collection runs this check before every publish and is held by an open finding (`publish_held`); any other publish runs it when asked (`check_secrets: true`). Bounded: at most 1000 text items and 8 MiB per call; what the bound leaves out is listed in `unchecked`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretCheckRequest"}}}},"responses":{"200":{"description":"What the check found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretCheck"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"publishing_check_secrets"}},"/collections/{id}/publishing/secret-findings/{finding}/not-a-secret":{"post":{"operationId":"publishing.mark_not_secret","tags":["publishing"],"summary":"Mark a secret-check finding as not a secret","description":"Owner only. Releases this one finding: records who and when, and the finding's fingerprint, so that exact value never raises a finding in this collection again; a new value is a new finding, and every other open finding still holds (B-PUBLISH-169).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"},{"schema":{"type":"string","pattern":"^[1-9][0-9]{0,17}$","example":"42"},"required":true,"name":"finding","in":"path"}],"responses":{"200":{"description":"The finding, now not a secret, and what is still open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretFindingMarked"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"publishing_mark_not_secret"}},"/me/aliases":{"get":{"operationId":"profile.aliases.list","tags":["profile"],"summary":"List your handles","description":"Your channels: the username first, then the aliases you added in the order you added them, each with its followers, the collections published under it and whether it is the default for publishing (B-AUTH-157, 167). A handle deleted in the last 90 days is held and not listed (B-AUTH-169).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"Your handles.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:read","x-mcp-tool":"profile_aliases_list"},"post":{"operationId":"profile.aliases.create","tags":["profile"],"summary":"Claim a new handle","description":"Claims an alias through B-AUTH-163's checks, in order: format (3 to 30 characters of a-z, 0-9, dot, underscore and hyphen, no dot at either end, never two dots in a row; `invalid_request` on `handle`), uniqueness across every alias and username (`handle_taken`), reserved names (`name_reserved`, with `class`), look-alikes of another account's handle (`name_reserved`, class `existing_user_homograph`), the plan's cap (`alias_limit_reached`, with `current`, `max` and `plan`: Free holds 1, Personal and Pro 5), then screening (`name_screen_rejected`, which never says why). A reserved name is never answered as a limit (B-AUTH-088). An alias is never renamed (B-AUTH-161): to change a handle, add a new alias and delete the old one. `dry_run` runs the same checks without claiming. With `collection_id` the handle is claimed as that collection's own, making it a workspace (D-062, B-COLL-172): your top-level Members (restricted) collection with no handle yet, checked before the claim (`not_found` for a collection you cannot see, `forbidden` for one that is not yours, `invalid_request` on `collection_id` otherwise); it counts as a channel like any alias.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasCreateRequest"}}}},"responses":{"200":{"description":"The dry run: the handle can be claimed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasCreation"}}}},"201":{"description":"The new alias.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasCreation"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `alias_limit_reached`: The plan's alias cap is reached. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","alias_limit_reached","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `handle_taken`: The handle is taken. `name_reserved`: The name is reserved. `name_screen_rejected`: The name was refused by the name screen. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","handle_taken","name_reserved","name_screen_rejected","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:write","x-mcp-tool":"profile_aliases_create"}},"/me/aliases/{id}/delete":{"post":{"operationId":"profile.aliases.delete","tags":["profile"],"summary":"Delete a handle","description":"Needs `confirm: true`, or `dry_run: true` to see what would happen (B-AUTH-168). Unpublishes every collection published under the alias (each bumps its epoch, so its address answers 404 at once and nothing redirects), clears the handle from any other collection that carries it, moves the default for publishing to the username if it was this alias, and holds the handle for 90 days (B-AUTH-169). The collections stay in your library, owned by you, unpublished. The username can never be deleted.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasDeleteRequest"}}}},"responses":{"200":{"description":"Deleted, or the dry run's report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasDeletion"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `has_subscribers`: People subscribe to this handle, so it can't be deleted yet: stop the subscription first (B-AUTH-170); `subscribers` says how many. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","has_subscribers","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:write","x-mcp-tool":"profile_aliases_delete"}},"/me/aliases/{id}":{"patch":{"operationId":"profile.aliases.update","tags":["profile"],"summary":"Edit a handle's public profile","description":"Each handle has its own public profile at `/{handle}`, like a channel (ZEG-1476): its display name, bio and picture, and whether the page is shown. An alias's values are its own and never show the username or another alias; the username's row edits the profile's own display name and bio (the values `profile.update` changes). `profile_hidden: true` hides the page: it then answers exactly as a handle that does not exist, to everyone but you, and the handle leaves the sitemap and Discovery's Channels; the collections published under it keep their own addresses. The picture is `profile.set_avatar` with `alias_id`. Name at least one field.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasUpdateRequest"}}}},"responses":{"200":{"description":"The handle as it is now, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasUpdate"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:write","x-mcp-tool":"profile_aliases_update"}},"/me/aliases/{id}/set_default":{"post":{"operationId":"profile.aliases.set_default","tags":["profile"],"summary":"Make a handle the default for publishing","description":"Exactly one handle is the default (B-AUTH-167): the username until you choose another. The username's own row puts it back. A default never moves a live address: a collection keeps the handle it is published under (B-PUBLISH-017). A frozen alias cannot be the default (`alias_frozen`, B-AUTH-191).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The default, or `noop`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AliasDefault"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `alias_frozen`: The alias is frozen (over the plan's channels): what is published under it stays, nothing new publishes under it. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","alias_frozen","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:write","x-mcp-tool":"profile_aliases_set_default"}},"/publishers/{handle}":{"get":{"operationId":"publishers.get","tags":["publishers"],"summary":"Get a publisher's page by its handle","description":"The channel at `/{handle}` (D-031, B-PUBLISH-148–150), a username or an alias alike: its avatar, display name, bio and up to three links (the links a username's only; an alias shows its own display name, bio and picture, ZEG-1476), the follower count and the count of its Public collections, and its published top-level collections newest first, Public ones with Discovery off included (R30), Registered and Restricted ones as gates for someone outside them. A workspace's handle (D-062, B-COLL-172) is its workspace page: what is published under it at any depth, to its owner and members the members-only publications too and the workspace's name, to anyone else only what they may read (no gate), and the not-found when that is nothing. A Public collection inside another is listed in its own right when the caller cannot open its parent from the page (the parent private, under another handle, or gated and not openable by the caller); when they can (Public; Registered when signed in; Restricted for a member; their own) it is the parent's tile only, never shown twice. A Registered or Restricted sub-collection is never listed (ZEG-1476, R600). A profile its owner hid answers `not_found` to everyone else. A handle resolves while the caller reaches at least one of its Public collections from the page, as a card or as a tile inside a parent they can open there; every other handle (unknown, malformed, a route's name, suspended, no Public collection) is the same `not_found` with the same bytes as an unpublished collection's address (B-PUBLISH-146), except to its owner, who reads an empty page. Signed out, rate-limited per address (R295).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","maxLength":200,"example":"charlie"},"required":true,"name":"handle","in":"path"}],"responses":{"200":{"description":"The publisher's page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Publisher"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read"}},"/sitemap":{"get":{"operationId":"publishers.sitemap","tags":["publishers"],"summary":"List the addresses a crawler may be told of","description":"The published Public collections listed in Discovery and the handles with something Public, for the apex's `sitemap.xml` (B-PUBLISH-201). Names, descriptions and counts are not part of it. Anonymous like `collections.get_by_slug`: rate-limited per address (R295), `Cache-Control: no-store`.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The addresses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sitemap"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read"}},"/collections/{id}/workspace":{"get":{"operationId":"collections.workspace","tags":["collections"],"summary":"Get a workspace: its members, their roles and what is published","description":"A workspace (D-062, B-COLL-172) is a top-level Members collection carrying a handle of its own (`profile.aliases.create` with `collection_id`). For its owner and accepted members: the workspace as a collection, its handle and page, the owner's two switches, its members with their roles (R157), and what is published under its handle that the caller may read. Anyone else, and a collection with no handle, is `not_found`. Needs collections:read.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The workspace collection's id.","example":"b4kq7xz2m9np"},"required":true,"description":"The workspace collection's id.","name":"id","in":"path"}],"responses":{"200":{"description":"The workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read"}},"/collections/{id}/like":{"post":{"operationId":"collections.like","tags":["social"],"summary":"Like a collection","description":"One like per person per collection; idempotent, atomic with the count, which never goes below 0 (B-PUBLISH-070). Accepted on a collection you may read and never on your own (`forbidden`, B-PUBLISH-073). Signed in only. At most 120 an hour per account (B-API-082): `rate_limited` with `retry_after_seconds`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"Liked, or already liked (`changed: false`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionLike"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_like"}},"/collections/{id}/unlike":{"post":{"operationId":"collections.unlike","tags":["social"],"summary":"Remove your like from a collection","description":"Idempotent: a collection you did not like answers `liked: false, changed: false`. The count never goes below 0.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"Unliked, or not liked (`changed: false`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionLike"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_unlike"}},"/liked":{"get":{"operationId":"collections.liked.list","tags":["social"],"summary":"List the collections you have liked","description":"Your liked collections that are not deleted and that you can still read (one unpublished or narrowed since is not shown), by collection id, newest first, as the one collection payload, with the exact total (B-PUBLISH-074). At most your 5,000 most recent likes are scanned.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"One page of liked collections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LikedCollections"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_liked_list"}},"/collections/{id}/stats":{"get":{"operationId":"collections.stats.get","tags":["social"],"summary":"Read a collection's likes, views and followers","description":"For any collection you may read (B-PUBLISH-081); anything else is the one `not_found`. Counts are public; `liked` is yours.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionStats"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_stats_get"}},"/collections/{id}/views":{"post":{"operationId":"collections.views.record","tags":["social"],"summary":"Record that a collection was opened","description":"The Player, the public page and the app call this on every open (B-PUBLISH-192, R26). A view counts at most once per viewer per collection in 24 hours: a signed-in viewer by account, a signed-out visitor by the session id in the body. Not open to agents. The owner's own opens are not views. Signed out, limited per address like the public read (R295).","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionViewRecord"}}}},"responses":{"200":{"description":"Counted, or why not.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionViewRecorded"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/channels/{handle}/follow":{"post":{"operationId":"aliases.follow","tags":["social"],"summary":"Follow a channel","description":"People follow channels, not accounts: the handle is an alias, or a username through its primary alias (B-PUBLISH-082). One follow per person per channel; idempotent. Your own channel is `invalid_request` on `handle`. An unknown handle is `not_found`. At most 60 an hour per account (B-API-082).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","maxLength":200,"description":"The channel's handle, with or without the @: an alias, or a username.","example":"mia.tom"},"required":true,"description":"The channel's handle, with or without the @: an alias, or a username.","name":"handle","in":"path"}],"responses":{"200":{"description":"Followed, or already following (`changed: false`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelFollow"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"aliases_follow"}},"/channels/{handle}/unfollow":{"post":{"operationId":"aliases.unfollow","tags":["social"],"summary":"Stop following a channel","description":"Idempotent: a channel you did not follow answers `following: false, changed: false`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","maxLength":200,"description":"The channel's handle, with or without the @: an alias, or a username.","example":"mia.tom"},"required":true,"description":"The channel's handle, with or without the @: an alias, or a username.","name":"handle","in":"path"}],"responses":{"200":{"description":"Unfollowed, or not following (`changed: false`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelFollow"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"aliases_unfollow"}},"/following":{"get":{"operationId":"aliases.following.list","tags":["social"],"summary":"List the channels you follow","description":"Your follows, newest first, each with the channel's follower count and when you followed (B-PUBLISH-085). Who follows whom is private: only you read your follows (B-PUBLISH-086).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"One page of followed channels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowedChannels"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"aliases_following_list"}},"/collections/{id}/reports":{"post":{"operationId":"reports.create","tags":["reports"],"summary":"Report a collection","description":"The public page's Report sheet (B-PUBLISH-187). For a collection the caller may open, signed in or out; any other is the one `not_found`. One of six reasons and an optional note. Limited to 10 an hour per address and 60 an hour per collection (docs/ops/API-LIMITS.md). A report changes nothing by itself (B-PUBLISH-188); the reporter is never shown to the publisher. Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportCreate"}}}},"responses":{"200":{"description":"Filed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportReceived"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/feedback":{"post":{"operationId":"feedback.create","tags":["reports"],"summary":"Send feedback","description":"Feedback from the account menu (D-054): the message and the page it came from, stored for the operators; never a moderation case. A signed-in person's session alone; 10 an hour per account. Not open to agents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackCreate"}}}},"responses":{"200":{"description":"Stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackReceived"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/notifications":{"get":{"operationId":"notifications.list","tags":["notifications"],"summary":"The bell's list","description":"The caller's 50 newest unarchived notifications, newest first, with the count of unread ones (B-SHARE-078). Invitations and access requests that still wait carry `action`. The web app's own: not open to agents.","responses":{"200":{"description":"The list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationList"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/notifications/read":{"post":{"operationId":"notifications.read_all","tags":["notifications"],"summary":"Mark everything read","description":"Marks every unread notification read (opening the list does this after 2 seconds, B-SHARE-078). Idempotent. Not open to agents.","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationsRead"}}}},"responses":{"200":{"description":"How many were marked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCount"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/notifications/archive-read":{"post":{"operationId":"notifications.archive_read","tags":["notifications"],"summary":"Archive every read notification","description":"Takes every read notification out of the list, except an access request that still waits for an answer (B-SHARE-078). Not open to agents.","responses":{"200":{"description":"How many were archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCount"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/notifications/{id}/archive":{"post":{"operationId":"notifications.archive","tags":["notifications"],"summary":"Archive one notification","description":"Takes one notification out of the list. An access request that still waits cannot be archived until it is answered: 400 `invalid_request` with `state: pending` (B-SHARE-078). Another person's notification is the same 404 as a missing one. Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationArchived"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/announcements":{"get":{"operationId":"notifications.announcements.list","tags":["notifications"],"summary":"What Zegazone is announcing to you","description":"Studio reads this once when it boots, with the person's read, dismissed and accepted state, and re-evaluates each window every 30 s itself (B-OPSADMIN-054). A person reads it with the session cookie; an agent with a bearer token holding `profile:read`, and its call is counted. An agent can never mark, dismiss or accept.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The announcements.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementList"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:read"}},"/announcements/{id}/read":{"post":{"operationId":"notifications.announcements.read","tags":["notifications"],"summary":"Mark an announcement read","description":"Its bell row is read. Idempotent. One that is not showing (ended, not started, or not the caller's) is 404. Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementMarked"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/announcements/{id}/dismiss":{"post":{"operationId":"notifications.announcements.dismiss","tags":["notifications"],"summary":"Dismiss a banner announcement","description":"The announcement strip's ✕: this banner never shows to the person again (B-CLIENT-217). It is read too. Only a banner is dismissed (400 `invalid_request` otherwise). Not open to agents.","parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"b4kq7xz2m9np"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Dismissed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementMarked"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/terms":{"post":{"operationId":"profile.terms.accept","tags":["profile"],"summary":"Agree to a version of the Terms","description":"The Terms card's Agree and continue (B-AUTH-148): records one acceptance of exactly this version for the account, once; the card never returns for it. A version no showing blocking announcement asks of the person is 400 `invalid_request`. The person's alone: a bearer token is 401 `wrong_token_type`, so no agent can agree for them.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAccept"}}}},"responses":{"200":{"description":"Accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAccepted"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/comms/preferences":{"get":{"operationId":"settings.mail.get","tags":["settings"],"summary":"Your mail choices","description":"Settings › Notifications: notification mail on or off, announcements, the per-event choices, and whether the address is suppressed after a bounce or complaint (B-OPSADMIN-043). The web app's own: not open to agents.","responses":{"200":{"description":"The choices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailPreferences"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"},"put":{"operationId":"settings.mail.set","tags":["settings"],"summary":"Change your mail choices","description":"Changes what the body names and answers with every choice as it now stands. Transactional mail (sign-in, password, invitations) cannot be turned off (B-OPSADMIN-035). Not open to agents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailPreferencesChange"}}}},"responses":{"200":{"description":"The choices now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailPreferences"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/comms/unsubscribe":{"post":{"operationId":"settings.mail.unsubscribe","tags":["settings"],"summary":"Unsubscribe with a mail's link","description":"Signed out, one tap: turns off exactly the category the token names (notification mail or announcements) for exactly the account it names, and says what still arrives (B-OPSADMIN-041). The token comes as `{token}` in a JSON body, or as `?token=` for a mail client's one-click POST (RFC 8058). Idempotent. An invalid token is 400 on `token` and changes nothing.","parameters":[{"schema":{"type":"string","maxLength":200},"required":false,"name":"token","in":"query"}],"responses":{"200":{"description":"Unsubscribed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unsubscribed"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/push/config":{"get":{"operationId":"push.config","tags":["push"],"summary":"Push on this environment, and your devices","description":"Whether push is configured, the VAPID public key a browser subscribes with, and how many of your devices are subscribed (B-OPSADMIN-069, 071). The web app's own: not open to agents.","responses":{"200":{"description":"Push here.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushConfig"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/push/subscribe":{"post":{"operationId":"push.subscribe","tags":["push"],"summary":"Subscribe this browser","description":"Stores the browser's push subscription for you, once per endpoint: subscribing again refreshes its keys. The same browser stored for another account stops receiving that account's pushes (R426). 503 `push_unavailable` while push is not configured.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscribe"}}}},"responses":{"200":{"description":"Subscribed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscribed"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`push_unavailable`: Push is not configured here (its signing keys are absent or do not make a pair); nothing was stored or sent. `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["push_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"},"delete":{"operationId":"push.unsubscribe","tags":["push"],"summary":"Unsubscribe this browser","description":"Revokes your subscription for the endpoint: nothing is pushed to it again. Another account's subscription of the same browser is untouched.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushUnsubscribe"}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushUnsubscribed"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/push/rebind":{"post":{"operationId":"push.rebind","tags":["push"],"summary":"Re-bind this browser's subscription to this session","description":"The web app's silent re-bind at boot (R518), with no prompt: binds to this session a subscription you already have for the endpoint, when it is live or was revoked only by the move to session-bound subscriptions (0077). Never stores a new one, never revives one you turned off or the push service refused, and never takes the browser from another account: `subscribed` is false then. 503 `push_unavailable` while push is not configured.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscribe"}}}},"responses":{"200":{"description":"Re-bound, or not.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscribed"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`push_unavailable`: Push is not configured here (its signing keys are absent or do not make a pair); nothing was stored or sent. `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["push_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/push/test":{"post":{"operationId":"push.test","tags":["push"],"summary":"Send yourself a test push","description":"One test push to every device you subscribed, which never raises the app-icon badge (B-OPSADMIN-070). Once every 60 s: sooner is 429 `rate_limited` with `retry_after_seconds`. 400 on `devices` when none is subscribed; 503 `push_unavailable` while push is not configured.","responses":{"200":{"description":"What the devices answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTest"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`push_unavailable`: Push is not configured here (its signing keys are absent or do not make a pair); nothing was stored or sent. `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["push_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/payouts":{"get":{"operationId":"profile.selling.get","tags":["profile"],"summary":"Payouts and who may charge","description":"Profile's Payouts (B-AUTH-180): the Stripe Connect Express set-up state, the plan, the creator terms, whether a price may be set and what is missing, this month's statement and the fee schedule. `?balance=true` adds the balance and the next payout from Stripe once payouts are complete. Read with the session cookie, or with an agent token holding `profile:read`; setting up payouts, accepting the terms and opening Stripe are the person's own (no token or tool does them, B-API-181).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"balance","in":"query"}],"responses":{"200":{"description":"The person's payouts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payouts"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:read","x-mcp-tool":"profile_selling_get"}},"/me/payouts/onboarding":{"post":{"operationId":"profile.payouts.onboard","tags":["profile"],"summary":"Set up payouts (Stripe's hosted onboarding)","description":"Set up payouts (B-PUBLISH-166): makes the person's Stripe Express account once and answers a fresh onboarding link; open `url`, and Stripe returns to `return_path` with `payouts=return` (or `payouts=refresh` when the link expired: ask again). Needs a paid plan: on Free, 403 `charging_not_allowed` with `reason` `paid_plan`. The session cookie only. 503 `payouts_unavailable` while creator selling is not switched on here (R631, checked first), where Stripe is not set up here, refuses our key (401 or 403), or did not answer (try again); 502 `payouts_refused` when Stripe refused the request (asking again gets the same answer until the cause is fixed at Stripe; the reason is logged).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutsOnboard"}}}},"responses":{"200":{"description":"Stripe's onboarding page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutsOnboarding"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `charging_not_allowed`: Setting a price needs a paid plan, payouts set up and the creator terms accepted; `reason` names the first missing and `missing` lists them all. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","charging_not_allowed","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"502":{"description":"`payouts_refused`: Stripe refused the payouts request, so it made nothing. Asking again gets the same answer until the cause is fixed at Stripe; the reason is logged for the operator.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["payouts_refused"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`payouts_unavailable`: Stripe is not configured here (no test-mode key), refused our key (401 or 403), or did not answer; `detail` says which. Nothing was changed at Stripe. `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["payouts_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/payouts/refresh":{"post":{"operationId":"profile.payouts.refresh","tags":["profile"],"summary":"Read the payouts state from Stripe now","description":"Back from Stripe's onboarding: the account's state read from Stripe at once, without waiting for its event. The session cookie only. 503 `payouts_unavailable` while creator selling is not switched on here (R631).","responses":{"200":{"description":"The state now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutsRefreshed"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"502":{"description":"`payouts_refused`: Stripe refused the payouts request, so it made nothing. Asking again gets the same answer until the cause is fixed at Stripe; the reason is logged for the operator.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["payouts_refused"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`payouts_unavailable`: Stripe is not configured here (no test-mode key), refused our key (401 or 403), or did not answer; `detail` says which. Nothing was changed at Stripe. `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["payouts_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/payouts/dashboard":{"post":{"operationId":"profile.payouts.dashboard","tags":["profile"],"summary":"Open your Stripe dashboard","description":"A one-time link to the person's Stripe Express dashboard (B-AUTH-180): payouts, tax details and statements live there. 409 `payouts_not_set_up` before onboarding is done. The session cookie only.","responses":{"200":{"description":"The dashboard link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutsLink"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`payouts_not_set_up`: The Stripe dashboard opens only once payouts onboarding is done.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["payouts_not_set_up"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"502":{"description":"`payouts_refused`: Stripe refused the payouts request, so it made nothing. Asking again gets the same answer until the cause is fixed at Stripe; the reason is logged for the operator.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["payouts_refused"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`payouts_unavailable`: Stripe is not configured here (no test-mode key), refused our key (401 or 403), or did not answer; `detail` says which. Nothing was changed at Stripe. `server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["payouts_unavailable","server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/me/creator-terms":{"post":{"operationId":"profile.creator_terms.accept","tags":["profile"],"summary":"Accept the creator terms","description":"The one-time checkbox before the first price (B-PUBLISH-166, B-AUTH-181): \"what I sell is mine to sell, buyers keep access, and refunds follow the 14-day rule\". `version` must be the version in force (`creator_terms.version` of `profile.selling.get`, now 2026-11-13); accepting again answers the first acceptance. The session cookie only: an agent cannot accept terms for the person.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatorTermsAccept"}}}},"responses":{"200":{"description":"Accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatorTermsAccepted"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/discovery/browse":{"get":{"operationId":"collections.browse","tags":["collections"],"summary":"Browse the public catalogue by row","description":"The Public tab's rows (D-045, B-PUBLISH-175): `trending`, `channels`, `browse`, and for an account `following`, `liked`, `mine` and `for_you` (P3-42, B-PUBLISH-173, 174: paid plans only, the empty row on Free; public collections ranked by the decision model from an embeddings shortlist, each item with its `relevance`; made on the first read of the day or with `refresh`, never an error but `refresh` past the daily decision budget). The catalogue is exactly the collections that are published, Public, listed in Discovery, not in Trash, not archived, not suspended and top-level (B-PUBLISH-052): a private, unlisted or suspended collection and a sub-collection are never in it, whoever asks. Open to a caller with no account for `trending`, `channels` and `browse` (B-PUBLISH-056); the others are `session_required`. The server's order is the only order (B-PUBLISH-178). Adult collections are left out altogether for a viewer who hides them: Settings › Content's Hide adult content, on by default and for every caller with no account (B-PUBLISH-184, 190), your own included (B-COLL-089). Limited per address, 200 a minute.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","enum":["trending","channels","browse","following","liked","mine","for_you"],"description":"Which row: `trending` (by the trending score), `channels` (publishers by followers), `browse` (every collection in the public feed, in the chosen sort), `following` (the newest from channels you follow; needs an account), `liked` (what you liked that is still in Discovery; needs an account), `mine` (your own published collections; needs an account), `for_you` (paid plans: public collections ranked for you from your own tags, titles and likes, refreshed daily; on Free the empty row; needs an account)."},"required":true,"description":"Which row: `trending` (by the trending score), `channels` (publishers by followers), `browse` (every collection in the public feed, in the chosen sort), `following` (the newest from channels you follow; needs an account), `liked` (what you liked that is still in Discovery; needs an account), `mine` (your own published collections; needs an account), `for_you` (paid plans: public collections ranked for you from your own tags, titles and likes, refreshed daily; on Free the empty row; needs an account).","name":"row","in":"query"},{"schema":{"type":"string","enum":["recent","liked","viewed"],"description":"For `browse` and `liked`: `recent` (default; publication time), `liked` or `viewed`; ties newest first. The other rows have their own order."},"required":false,"description":"For `browse` and `liked`: `recent` (default; publication time), `liked` or `viewed`; ties newest first. The other rows have their own order.","name":"sort","in":"query"},{"schema":{"type":"string","maxLength":1000,"description":"Tags, comma-separated, at most 10; a collection with any of them (B-PUBLISH-053)."},"required":false,"description":"Tags, comma-separated, at most 10; a collection with any of them (B-PUBLISH-053).","name":"tag","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"`browse` only: `true` keeps the collections of channels you follow (the Following chip, B-PUBLISH-177). With `liked` both is their union. Needs an account."},"required":false,"description":"`browse` only: `true` keeps the collections of channels you follow (the Following chip, B-PUBLISH-177). With `liked` both is their union. Needs an account.","name":"following","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"`browse` only: `true` keeps the collections you liked (the Liked chip)."},"required":false,"description":"`browse` only: `true` keeps the collections you liked (the Liked chip).","name":"liked","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"`for_you` only: `true` makes a new ranking now instead of the day's. It spends one decision of your daily budget; past it the answer is 429 `decision_budget_exceeded` with `retry_after_seconds`."},"required":false,"description":"`for_you` only: `true` makes a new ranking now instead of the day's. It spends one decision of your daily budget; past it the answer is 429 `decision_budget_exceeded` with `retry_after_seconds`.","name":"refresh","in":"query"},{"schema":{"type":"integer","description":"Page size. Clamped to 1–100; 50 when absent."},"required":false,"description":"Page size. Clamped to 1–100; 50 when absent.","name":"limit","in":"query"},{"schema":{"type":"integer","description":"Rows to skip. Floored at 0."},"required":false,"description":"Rows to skip. Floored at 0.","name":"offset","in":"query"}],"responses":{"200":{"description":"One page of a row.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryBrowse"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `decision_budget_exceeded`: The account's daily decision budget is spent (B-API-164).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","decision_budget_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_browse"}},"/discovery/search":{"get":{"operationId":"collections.search","tags":["collections"],"summary":"Search the public catalogue","description":"Words from 3 characters over names, descriptions, tags and publishers across the public catalogue (B-PUBLISH-057, 179), ranked by trending, then text rank, name similarity and id. An all-digit query is also looked up as a collection number: a readable hit is the first item with `id_match` true (B-PUBLISH-061); a number that is not in the catalogue looks exactly like one that does not exist. Open to a caller with no account. The catalogue and the adult setting are as `collections.browse`'s; `hidden` says how many the setting kept out. Limited per address, 200 a minute.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","maxLength":2000,"description":"Words to find in names, descriptions, tags and publishers; 3 characters at least (shorter answers nothing). An all-digit query is also looked up as a collection number and a hit pinned first (B-PUBLISH-061).","example":"field notes"},"required":true,"description":"Words to find in names, descriptions, tags and publishers; 3 characters at least (shorter answers nothing). An all-digit query is also looked up as a collection number and a hit pinned first (B-PUBLISH-061).","name":"q","in":"query"},{"schema":{"type":"integer","description":"Page size. Clamped to 1–50; 20 when absent."},"required":false,"description":"Page size. Clamped to 1–50; 20 when absent.","name":"limit","in":"query"},{"schema":{"type":"integer","description":"Results to skip. Floored at 0."},"required":false,"description":"Results to skip. Floored at 0.","name":"offset","in":"query"}],"responses":{"200":{"description":"One page of results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverySearch"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_search"}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"oauth.metadata.protected_resource","tags":["oauth"],"summary":"Protected-resource metadata (RFC 9728): the MCP endpoint on the MCP host, the REST API on the api host","description":"No credential. Names this environment's own hosts only (B-API-167). docs/ops/OAUTH.md.","responses":{"200":{"description":"The metadata.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"oauth.metadata.protected_resource_mcp","tags":["oauth"],"summary":"Protected-resource metadata (RFC 9728) of this host's MCP endpoint","description":"No credential. Names this environment's own hosts only (B-API-167). docs/ops/OAUTH.md.","responses":{"200":{"description":"The metadata.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/.well-known/oauth-authorization-server":{"get":{"operationId":"oauth.metadata.authorization_server","tags":["oauth"],"summary":"Authorisation-server metadata (RFC 8414)","description":"No credential. Names this environment's own hosts only (B-API-167). docs/ops/OAUTH.md.","responses":{"200":{"description":"The metadata.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/oauth/register":{"post":{"operationId":"oauth.register","tags":["oauth"],"summary":"Register a client (RFC 7591)","description":"No credential, no client header. Redirect URIs only from the allowlist (docs/ops/OAUTH.md); a repeat registration of a public client (`none`) with the same metadata answers the existing client (B-API-043); a confidential client's registration always makes a new client, whose secret is in that answer only and stored as its SHA-256. 60 an hour per address (an IPv6 client by its /64), and at most 500 new clients an hour in all. `token_endpoint_auth_method` defaults to `none` (a public client: PKCE is required of every client either way).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientMetadata"}}}},"responses":{"201":{"description":"Registered, or the existing public client with the same metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthClientInformation"}}}},"400":{"description":"`invalid_redirect_uri`: OAuth registration: a redirect URI is outside the allowlist (docs/ops/OAUTH.md). `invalid_client_metadata`: OAuth registration: a metadata field is missing, malformed or not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_redirect_uri","invalid_client_metadata"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/oauth/authorize":{"get":{"operationId":"oauth.authorize","tags":["oauth"],"summary":"Start an authorisation (RFC 6749 §4.1.1, PKCE S256 only)","description":"A browser navigation. Needs `response_type=code`, `client_id`, `redirect_uri` (exactly a registered one; a loopback one on any port), `code_challenge` with `code_challenge_method=S256`, and takes `state`, `scope` (space-separated; none asked is every scope but `settings:*`, R233) and `resource` (RFC 8707: the MCP resource or the API). An unknown client or a bad redirect shows the Invalid OAuth request page and a missing or non-S256 challenge the Unsupported OAuth request page (400, never a redirect); other faults return to the client with `error`, `state` and `iss`. A valid request is stored as a 10-minute flow and the browser is sent to Studio's `/oauth/consent?flow=…`, through `/sign-in?next=` when signed out.","parameters":[{"schema":{"type":"string","enum":["code"]},"required":true,"name":"response_type","in":"query"},{"schema":{"type":"string"},"required":true,"name":"client_id","in":"query"},{"schema":{"type":"string"},"required":true,"name":"redirect_uri","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"required":true,"name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256"]},"required":true,"name":"code_challenge_method","in":"query"},{"schema":{"type":"string"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string"},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string"},"required":false,"name":"resource","in":"query"}],"responses":{"302":{"description":"To Studio's consent (or the door), or back to the client with an error."},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/oauth/token":{"post":{"operationId":"oauth.token","tags":["oauth"],"summary":"Exchange a code or rotate a refresh token (RFC 6749 §4.1.3, §6)","description":"No cookie, no client header. `grant_type=authorization_code` with `code`, `redirect_uri` and `code_verifier`, or `grant_type=refresh_token` with `refresh_token` (and optionally a narrower `scope`); either may carry `resource`. The client authenticates with `client_id` alone (public), or its secret by HTTP Basic or `client_secret`. A code is spent once; a rotated refresh token is honoured for 5 minutes, then refused. 45 a minute per address.","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"code":{"type":"string"},"redirect_uri":{"type":"string"},"code_verifier":{"type":"string"},"refresh_token":{"type":"string"},"scope":{"type":"string"},"resource":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"}},"required":["grant_type"]}}}},"responses":{"200":{"description":"Tokens. Never cached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokens"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_grant`: OAuth: the code or refresh token is unknown, expired, used, revoked or issued to another client, or the PKCE verifier or redirect URI does not match. `unauthorized_client`: OAuth: this client is not registered for the grant type it asked for. `unsupported_grant_type`: OAuth: the token endpoint serves authorization_code and refresh_token only. `invalid_scope`: OAuth: the requested scope names nothing this client may be granted. `invalid_target`: OAuth (RFC 8707): the resource is not one this server issues tokens for.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_grant","unauthorized_client","unsupported_grant_type","invalid_scope","invalid_target"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`invalid_client`: OAuth: client authentication failed (an unknown client, or a wrong or missing secret).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_client"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/oauth/revoke":{"post":{"operationId":"oauth.revoke","tags":["oauth"],"summary":"Revoke a refresh or access token (RFC 7009)","description":"No cookie, no client header; the client authenticates as at the token endpoint. A refresh token revokes its whole connection (its access tokens with it); an access token, itself. 200 whether or not the token was known (RFC 7009 §2.2). 45 a minute per address.","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"},"token_type_hint":{"type":"string","enum":["access_token","refresh_token"]},"client_id":{"type":"string"},"client_secret":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"Revoked, or nothing to revoke."},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`invalid_client`: OAuth: client authentication failed (an unknown client, or a wrong or missing secret).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_client"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/oauth/consent":{"get":{"operationId":"oauth.consent.get","tags":["oauth"],"summary":"Read a pending authorisation for the consent page","description":"Studio's consent page (P3-02, R231) renders from this: the client, the redirect host, the scopes Allow would grant and the resource. A session route. 404 `not_found` for a flow that is unknown, used or past its 10 minutes.","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"The `flow` of Studio's `/oauth/consent?flow=` address."},"required":true,"description":"The `flow` of Studio's `/oauth/consent?flow=` address.","name":"flow","in":"query"}],"responses":{"200":{"description":"The pending authorisation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentFlow"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"oauth"},"post":{"operationId":"oauth.consent.decide","tags":["oauth"],"summary":"Allow or deny a pending authorisation","description":"A session route with the client header (R106); a request whose `Origin` is neither Studio nor the apex is 403 `forbidden`, and a suspended or deleted person is `session_ended`. Allow wants a session signed in within 24 hours (ZEG-1401): an older one is 403 `reauthentication_required` with `reason` `sign_in_again`, the flow kept; Deny works at any age. Allow issues a 10-minute single-use code bound to the person, the client, the redirect URI, the PKCE challenge, the scopes and the resource; Deny answers `error=access_denied`. Either way the flow is spent, and `redirect_to` is where Studio sends the browser (the client's redirect URI with `code` or `error`, `state` and `iss`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentDecision"}}}},"responses":{"200":{"description":"Decided.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentRedirect"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `reauthentication_required`: A sensitive action wants a recent sign-in. Changing the password on a session over 24 hours old (R108): the identity provider wants the code it emails; `address` shows where it goes. Send it with `POST /auth/password/code`, then repeat the change with `code`. Minting a personal agent token (`POST /tokens`, ZEG-1401) wants proof within 10 minutes: `reason` `password_required`, repeat it with `current_password`; `sign_in_again`, sign in again, then repeat it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","forbidden","reauthentication_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"oauth"}},"/agent/ping":{"get":{"operationId":"profile.ping","tags":["profile"],"summary":"Check an agent connection","description":"Answers for any live agent token, needs no scope and is never counted against the monthly allowance (B-API-012). Burst limits apply.","security":[{"agentToken":[]}],"responses":{"200":{"description":"The token is live; who it acts for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPing"}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-mcp-tool":"profile_ping"}},"/usage":{"get":{"operationId":"profile.usage.get","tags":["profile"],"summary":"This month's agent operations against the plan's allowance","description":"A person reads it with the session cookie; an agent with a bearer token holding `profile:read`, and its call is counted.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The month's usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUsage"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type","session_required","session_ended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `insufficient_scope`: The token lacks a scope; `need` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","insufficient_scope"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"profile:read","x-mcp-tool":"profile_usage_get"}},"/boot":{"get":{"operationId":"player.boot","tags":["player"],"summary":"Everything the player needs to start","description":"The signed-in person with their verification state, their library, their UI state (re-checked, B-API-091) and the first page of the collection they last had open, with its byte URLs. One round trip (ARCHITECTURE §4.5).","responses":{"200":{"description":"The boot payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Boot"}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/ui-state":{"get":{"operationId":"player.ui_state.get","tags":["player"],"summary":"The person's UI state","description":"Where the person was (the collection and item), the view mode, the playback position and the library tab used last (B-API-211, B-COLL-168). The stored selection is re-checked first: what the person can no longer read is dropped, saved and named in `cleared` (B-API-091). With no row yet, the defaults. An agent needs `settings:read`.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The UI state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiState"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"settings:read","x-mcp-tool":"ui_state_get"},"patch":{"operationId":"player.ui_state.set","tags":["player"],"summary":"Change the person's UI state","description":"A partial update (B-API-092): omitted fields keep their values. Published on the person's own live channel so their other tabs and devices follow. Moving the person to a surface is `player.navigate`. An agent needs `settings:write`, and a connection the person stopped from the driving strip is refused 403 with `rejected: \"stopped by the person\"` (B-API-208); `source` defaults to `agent` for an agent and `user` for a person.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiStateUpdate"}}}},"responses":{"200":{"description":"The UI state as written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiState"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"settings:write","x-mcp-tool":"ui_state_set"}},"/player/navigate":{"post":{"operationId":"player.navigate","tags":["player"],"summary":"Move the person's open Studio","description":"Opens a surface of Studio in the person's open session (the one in front), or starts or stops Play or fullscreen there, and waits up to two seconds for a tab to say it heard (B-API-094). Give an `address` or a `destination` from the address list, or only `play` / `fullscreen` for the stage on screen. It opens a sheet that needs the person's own hand (Delete's step, OAuth consent) and never completes it (B-API-205); an admin surface is not in the list (400 with the allowed destinations), and another person's private collection or item is 404 (B-API-206). Not a write: nothing in the library or settings changes and it is not in Recent agent activity (B-API-209), though the stored place moves when a collection or item is named. 10 commands a minute per account (B-API-207). Needs `player:control`; a connection the person stopped from the strip answers 403 with `rejected: \"stopped by the person\"` until they allow it again (B-API-208).","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerNavigate"}}}},"responses":{"200":{"description":"The command, and whether a tab heard it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerNavigateAnswer"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"player:control","x-mcp-tool":"player_navigate"}},"/player/command-ack":{"post":{"operationId":"player.command.acknowledge","tags":["player"],"summary":"A Studio tab heard a Player command","description":"Studio's own call, with the session cookie: the tab that obeyed a `player.command` message says so, so the agent's `player.navigate` can answer (B-API-094). The first tab's answer is the agent's; the rest change nothing. Never an agent's: a token is refused.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerCommandAck"}}}},"responses":{"200":{"description":"Whether this was the first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerCommandAckAnswer"}}}},"400":{"description":"`invalid_json`: The body is not JSON. `invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_json","invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/settings":{"get":{"operationId":"settings.get","tags":["settings"],"summary":"The account's preferences","description":"The theme, the playback defaults new collections copy, and the library display (B-API-210), every key present. An agent needs `settings:read`.","security":[{"agentToken":[]},{}],"responses":{"200":{"description":"The preferences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"settings:read","x-mcp-tool":"settings_get"},"patch":{"operationId":"settings.set","tags":["settings"],"summary":"Change the account's preferences","description":"A partial change: name only what changes, and omitted keys keep their values. Changing the playback defaults alters no existing collection (B-COLL-153). Profile values are `profile.update`'s and are refused here (R51). An agent needs `settings:write`, and its change appears in Recent agent activity as \"<client> updated settings\" (B-API-220).","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsUpdate"}}}},"responses":{"200":{"description":"The preferences as now stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"settings:write","x-mcp-tool":"settings_set"}},"/collections/{id}/webhook":{"put":{"operationId":"collections.webhook_set","tags":["webhooks"],"summary":"Set a collection's webhook","description":"Creates or replaces the collection's one webhook, owner only (B-API-097). It is enabled with a failure count of 0, and a new signing secret comes back once (`secret_shown_once`); setting it again ends the old secret. The address is checked now (https, no credentials, not Zegazone's, only public addresses; `webhook_url_not_https`, `webhook_url_has_credentials`, `webhook_url_zegazone_host`, `webhook_url_blocked_host`) and again before every send. A change to the collection (items added, removed, moved or edited; its name, description, tags, cover, share level, publication, archive or deletion) is sent as `collection.updated` once its 30-second window closes: a POST of `{event, collection_id, collection:{id, name, slug, is_published, updated_at}, changed:[item ids], changed_truncated, delivered_at}`, with headers `X-Zegazone-Signature: sha256=<hex HMAC-SHA256 of the exact body, keyed with the secret text>`, `X-Zegazone-Event`, `X-Zegazone-Delivery`, `X-Zegazone-Attempt` and `X-Zegazone-Timestamp`. A 2xx within 10 s delivers; anything else, a redirect included, is retried after 30 s, 2 min and 10 min; 20 deliveries in a row that fail all four attempts disable the webhook. Delivery is at least once: `X-Zegazone-Delivery` is the dedupe key.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSetRequest"}}}},"responses":{"200":{"description":"The webhook, and its secret this once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSet"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `webhook_url_not_https`: A webhook URL must use https. `webhook_url_has_credentials`: A webhook URL must not carry credentials. `webhook_url_zegazone_host`: A webhook URL must not point at Zegazone. `webhook_url_blocked_host`: A webhook URL points at a blocked host.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","webhook_url_not_https","webhook_url_has_credentials","webhook_url_zegazone_host","webhook_url_blocked_host"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_webhook_set"},"get":{"operationId":"collections.webhook_get","tags":["webhooks"],"summary":"Read a collection's webhook and its health","description":"Owner only: the address, whether it is enabled, the failure count, the last status and error, why it was disabled, the last five attempts and how many deliveries are waiting. Never the secret. `not_found` when the collection has no webhook (collections_webhook_set makes one).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"The webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDetail"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_webhook_get"}},"/collections/{id}/webhook/remove":{"post":{"operationId":"collections.webhook_remove","tags":["webhooks"],"summary":"Remove a collection's webhook","description":"Owner only. Deletes the webhook and the deliveries still queued for it; a second call answers `removed: false`. The finished deliveries go with it.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookActionRequest"}}}},"responses":{"200":{"description":"Whether there was one to remove.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRemoval"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_webhook_remove"}},"/collections/{id}/webhook/test":{"post":{"operationId":"collections.webhook_test","tags":["webhooks"],"summary":"Send a test ping to a collection's webhook","description":"Owner only. Sends a signed `ping` now, through the same sender, and says whether it was delivered, the receiver's status, how long it took, any error, the signature and the exact body. Works on an unpublished collection and on a disabled webhook; it is logged as a test and never counts towards the failure streak. At most 10 a minute (`rate_limited`); `webhook_secret_unreadable` when the stored secret no longer opens.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookActionRequest"}}}},"responses":{"200":{"description":"What came back.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTest"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `webhook_secret_unreadable`: The stored webhook secret cannot be decrypted; the webhook is disabled. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","webhook_secret_unreadable","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:write","x-mcp-tool":"collections_webhook_test"}},"/search/items":{"get":{"operationId":"items.search","tags":["items"],"summary":"Search items by their words","description":"Finds items whose name, description, note text or tags contain every word of `q`, in one collection (`collection_id`) or across your library, best matches first (a word in the name counts most), with the exact total. Only items you may read are ever searched or returned. Live items only: Trash, archived items and pending uploads are left out. Pages with `limit` and `offset`; `next_offset` is where the next page starts, or null at the end.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"The words to find (at most 8, 200 characters): an item must contain every one, anywhere in its name, description, note text or tags (a skill's own name and description included), in any case.","example":"course outline"},"required":true,"description":"The words to find (at most 8, 200 characters): an item must contain every one, anywhere in its name, description, note text or tags (a skill's own name and description included), in any case.","name":"q","in":"query"},{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"Search inside this collection only (any collection you may read). Without it: every collection of your library, yours and those you are a member of.","example":"b4kq7xz2m9np"},"required":false,"description":"Search inside this collection only (any collection you may read). Without it: every collection of your library, yours and those you are a member of.","name":"collection_id","in":"query"},{"schema":{"type":"string","description":"Comma-separated tags: only items with any of them.","example":"lesson,draft"},"required":false,"description":"Comma-separated tags: only items with any of them.","name":"tags","in":"query"},{"schema":{"type":"string","enum":["file","note","link","skill"],"description":"Only this kind of item."},"required":false,"description":"Only this kind of item.","name":"kind","in":"query"},{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"One page of hits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSearchResult"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"items_search"}},"/items/{id}/download":{"get":{"operationId":"items.download","tags":["items"],"summary":"Read a file's bytes in chunks, through the call","description":"A skill (ZEG-1271) as a zip: with format=zip the body is the zip itself, a bundle as it was uploaded and a single skill zipped as exactly <name>/SKILL.md; without it, the same bytes come in the chunks below. For a client whose only link to Zegazone is its connection: a file (or a note's UTF-8 text) in chunks of 98304 bytes, base64, each under the tool-result budget. Call with no index for chunk 0, which also says the file's size and how many chunks there are, then each `next_index` until `last`; the chunks joined are the file exactly (each carries its SHA-256). A file over 10 MB is `file_too_large`; `items.get` has its byte addresses for a client that can fetch from the web. A link has no file. A gated item is read only by its collection's owner.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"description":"Which chunk, from 0 (the default). The answer of chunk 0 says how many there are.","example":0},"required":false,"description":"Which chunk, from 0 (the default). The answer of chunk 0 says how many there are.","name":"index","in":"query"},{"schema":{"type":"string","enum":["chunks","zip"],"description":"chunks (the default): the JSON chunks above. zip, for a skill item (ZEG-1271): the whole skill as one `application/zip` body, a valid zip with the skill's folder at its root (a single skill is exactly `<name>/SKILL.md`), served as an attachment named `<name>.zip`; any other kind is 400."},"required":false,"description":"chunks (the default): the JSON chunks above. zip, for a skill item (ZEG-1271): the whole skill as one `application/zip` body, a valid zip with the skill's folder at its root (a single skill is exactly `<name>/SKILL.md`), served as an attachment named `<name>.zip`; any other kind is 400.","name":"format","in":"query"}],"responses":{"200":{"description":"One chunk, or with format=zip the skill as a zip.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDownloadChunk"}},"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"items_download"}},"/items/{id}/discard":{"post":{"operationId":"items.discard","tags":["items"],"summary":"Take back a clone just made (a clone's Undo)","description":"Only with the `undo_token` the clone's `items.copy` answered, within 120 seconds of the clone, while it is still in a collection of yours that nobody else can see. For good, not to Trash: its bytes stop counting against your storage at once (`discarded: true`); when that cannot be done at once it goes to Trash, as Delete does (`discarded: false`). Anything else is forbidden, one answer. The Player's Undo of Clone; not an agent operation and not an MCP tool: a bearer token is refused.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDiscardRequest"}}}},"responses":{"200":{"description":"Taken back for good, or in Trash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDiscard"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/items/{id}/copy":{"post":{"operationId":"items.copy","tags":["items"],"summary":"Copy an item into a collection","description":"A new item at the end of the collection `to`, made from an item of yours (in a collection you own; anything else, someone else's public or bought item included, is `not_found`, one answer: ZEG-1431): a note with the same text, display mode, description and tags; a link to the same address with the same page metadata (its picture is not fetched again); a file with its own copy of the bytes, at most 100 MB, charged to the target's owner as an upload is (so the original and the copy never share a file); an agent skill whole (a single SKILL.md as a new skill, a bundle with its own copy of the zip and so of every bundled file), for someone entitled to its bytes. A sub-collection's tile cannot be copied. Needs the right to add in `to`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false."},"required":false,"description":"Whether a note in the answer carries its whole text (ZEG-1531). false answers it with text_length, version and text_excerpt (its first 200 characters) instead: the text was just sent, so a writer rarely needs it back. Over REST the default is true; over MCP (the tools) the default is false.","name":"include_text","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemCopyRequest"}}}},"responses":{"201":{"description":"The copy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemCopy"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size. `storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large","storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_copy"}},"/collections/import":{"post":{"operationId":"collections.import","tags":["collections"],"summary":"Import a collection and its sub-collections from an export","description":"Rebuilds what `collections.export` answered (possibly on another Zegazone) as new collections and items of yours, private and unpublished whatever the source was: the collection, its sub-collections in their places, and every item that needs no file: notes with their text and display mode, single-file skills, links (without their page's preview), names, descriptions, tags, order, tile labels and chosen artwork, and each collection's playback settings. Needs `items:write`, and `collections:write` as `collections.create` does for each collection made (the precedent of `items.move_to_new_subcollection`). At most 500 items (lowered from 2,000 until a timed run exists), 50 collections and 100 pages. Refused before anything is written: a page that is not an export, a stray page, a link url that is not http(s) or is longer than 2,048 characters, a collection whose pages hold fewer items than its export's `total` (unless `partial` is true), and a collection name that clashes with one of yours or with another in the import (`duplicate_collection_name`, `names`). `parent_id` follows `collections.create` rules. The answer maps each old id to the new one (`collections`, `items`) and lists in `left`, with its old id, what was not made or not made whole: `file` and `skill_files` (by the upload path), `note_text` (cut notes), `link_url`, `link_snapshot` (`items.refresh_snapshot`), `cover`, `subcollection` (its export not given, or a second tile to a collection already made, a tile back to the root included), `playback_settings` (not valid ones; the collection keeps its defaults), `viewer` (an unknown viewer; made with its kind's default) and `artwork` (an unknown chosen kind or platform; made without it), `thumbnail` (a custom thumbnail, for `items.set_thumbnail` with source `url`), and `reference` (a `zz://item/{id}` reference in a made note's or skill's text that still names an old id, `target_from`: one outside the import is left as written; one inside it, `target_in_import`, is pointed at its new id with `items.update`: from `items` when the import made it, else the item is itself left and, if you make it, point the reference at the new id). References between items the import makes are rewritten to the new ids; references inside an uploaded file (an HTML page) are not: rename them by the `items` map before uploading it. Each entry to make carries its `place` in the new order; a `file` or `skill_files` entry carries `upload` (`items.upload`'s arguments) and `finalise` (`items.finalise`'s `position` and `thumbnail_label`), and a `cover` its item's new id (`item_to`). The tool's description gives the sequence. Limits: `items.download` reads at most 10 MB (`file_too_large` above), so a bigger file is made only by a client that fetches it from `items.get`'s byte addresses and uploads it itself; a link's preview is fetched again only for a social post, any other link keeps none; a file whose name ends .md that the source kept as a file comes back as a note (`converted_to_note` true) unless your Markdown-as-note setting (`uploads.markdown_as_notes`) is off, and such a note cannot be turned back into a file; a custom thumbnail or an uploaded cover arrives as its 1280 rendition, not the original. A refusal part-way, of any kind, names the root already made in `imported_collection_id` and every collection made in `imported_collection_ids` (the last made first); a busy database or store is still 503 `server_busy`. An import is not resumed: to discard the part-made copy, delete each of `imported_collection_ids` with `collections.delete` (`confirm` and `cascade_media` true; deleting the root alone leaves its sub-collections at the top level, and their names refuse the next import), then import again: a collection in Trash does not block a name.","security":[{"agentToken":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionImportRequest"}}}},"responses":{"201":{"description":"What was made, and what is left.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionImport"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `duplicate_collection_name`: A collection beside it (the same parent, or the owner's top level) already has this name; `conflict` names it. `nesting_too_deep`: Collections nest at most 64 levels deep; this would put one deeper. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","duplicate_collection_name","nesting_too_deep","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"collections_import"}},"/batch/collections":{"get":{"operationId":"collections.batch_get","tags":["collections"],"summary":"Get several collections at once","description":"The collections of `ids` (at most 50) that you may read, as `collections.get` answers each, in the order named; the ids that are not one you may read are in `not_found`. A page that would pass the result size is cut and `next_offset` is the first id left out: ask for those again.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The collections' ids, comma-separated: at most 50, each once.","example":"b4kq7xz2m9np,q7rt2bx9kz4m"},"required":true,"description":"The collections' ids, comma-separated: at most 50, each once.","name":"ids","in":"query"}],"responses":{"200":{"description":"The collections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionBatch"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_batch_get"}},"/batch/items":{"get":{"operationId":"items.batch_get","tags":["items"],"summary":"Get several items at once","description":"The items of `ids` (at most 25) that you may read, as `items.get` answers each, in the order named; a note's text is cut to 2000 characters (`text_truncated`, `text_length`; items.get has the rest). The ids that are not an item you may read are in `not_found`.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"description":"The items' ids, comma-separated: at most 25, each once.","example":"b4kq7xz2m9np,q7rt2bx9kz4m"},"required":true,"description":"The items' ids, comma-separated: at most 25, each once.","name":"ids","in":"query"}],"responses":{"200":{"description":"The items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemBatch"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"items_batch_get"}},"/items/{id}/description":{"get":{"operationId":"items.get_description","tags":["items"],"summary":"Read an item's description","description":"Just the item's name, kind, description (and how it is written) and tags, and whether it has a description, for an agent that is describing items. The description is written with `items.update`: Zegazone writes none itself (B-API-163).","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"The description.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemDescription"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"items_get_description"}},"/collections/{id}/tree":{"get":{"operationId":"collections.tree","tags":["collections"],"summary":"Get a collection and every sub-collection below it","description":"The collection and all its sub-collections, at every depth, in one flat breadth-first list: each node's id, name, parent, depth, tile position, counts, cover, published, share level and archived. The root answers as `collections.get` does (an unknown or unreadable one is `not_found` or its gate). A sub-collection you may not read is left out with everything below it; archived ones only with `include=archived`; Trash never. At most the platform setting `tree_max_nodes` nodes you may read, counted only over those (default 2000): past it the answer says `truncated` with the `cap`, the deepest levels cut.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"},{"schema":{"type":"integer","description":"How many levels below the root to walk (0: the root alone). At most and by default 64."},"required":false,"description":"How many levels below the root to walk (0: the root alone). At most and by default 64.","name":"max_depth","in":"query"},{"schema":{"type":"string","enum":["archived"],"description":"archived: archived sub-collections (and theirs) too. Sub-collections in Trash are never in the tree."},"required":false,"description":"archived: archived sub-collections (and theirs) too. Sub-collections in Trash are never in the tree.","name":"include","in":"query"}],"responses":{"200":{"description":"The tree.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionTree"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"collections:read","x-mcp-tool":"collections_tree"}},"/collections/{id}/export":{"get":{"operationId":"collections.export","tags":["collections"],"summary":"Export a collection and its items","description":"The collection and a page of its items in an exportable form: names, descriptions, tags, order, a link's address, a note's text (cut to 20000 characters), a file's size (items.download reads the bytes), in the collection's order. Needs `items:read` and the right to read the collection's items. Pages with `limit` and `offset`; follow `next_offset` to the end.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"},{"schema":{"type":"integer","example":100,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008)."},"required":false,"description":"Page size. Clamped to 1–500; 100 when absent (B-API-008).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"One page of the export.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionExport"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"collections_export"}},"/agent/bug-reports":{"post":{"operationId":"bug.report","tags":["profile"],"summary":"Report a problem with Zegazone","description":"Any agent may report a problem, with no scope and without using the monthly allowance. It goes to people who triage it and nowhere else: it makes no ticket, sends no email and changes no collection, and no operation reads it back. Reports that match an open one (same operation, category, error code and title) are counted under it (`duplicate`). A report that holds a token, a key or a `secret=` value is refused whole (`secret_material_detected`) and not stored. At most 5 an hour about one operation and 30 a day (`rate_limited`).","security":[{"agentToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BugReportRequest"}}}},"responses":{"201":{"description":"Filed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BugReport"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `secret_material_detected`: The text contains token-shaped material; nothing was stored.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","secret_material_detected"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one. `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","invalid_token","token_expired","token_revoked","wrong_token_type"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`account_suspended`: The account is suspended. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["account_suspended","missing_client_header"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-mcp-tool":"bug_report"}},"/items/{id}/contents":{"get":{"operationId":"items.contents","tags":["items"],"summary":"What an archive or a skill holds","description":"Says what a stored archive (zip, tar, gzip, bzip2, xz, 7z, rar) or a skill item is and holds, without unpacking it: its format and label, its size, and for a zip the number of entries, files and folders, the unpacked total and the first names, read from the zip's directory alone. A Zip64 archive is large (its size only), an encrypted one password_protected, a damaged one unreadable. A zip that holds one folder with a SKILL.md but was kept as a file says why it is not a skill (skill_check). Any other item is invalid_request. Who may download the item may read it; signed out on a published Public collection, rate-limited per address.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"What the item holds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemContents"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"items_contents"}},"/collections/{id}/skills":{"post":{"operationId":"skills.add","tags":["items"],"summary":"Save a skill into a collection","description":"Adds an agent skill (kind skill) at the end of a collection, from text alone, so an agent that holds nothing but its connection can save one. `markdown` is a skill that is one SKILL.md; `files` is a skill with a SKILL.md and other text files (references, scripts, templates), which the server packs into the zip a skill is distributed as and ingests as an upload, so every check of a skill upload applies (the frontmatter, the name, the file and size caps, the paths). A refusal is `invalid_skill` with a `reason`. Returns the item. A script is stored and listed, never run. Binary files are not taken here.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillAdd"}}}},"responses":{"201":{"description":"The new skill item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `invalid_skill`: A skill is refused; `reason` names why: skill_md_missing, frontmatter_missing, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, markdown_missing, markdown_too_long, not_a_zip, zip_unsupported, unsafe_path, too_many_files, skill_too_large, not_single_folder, bundle_not_editable, binary_file (a file handed over MCP as text holds bytes that are not text) or path_conflict (a file where the bundle has a folder, or inside one of its files). `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","invalid_skill","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance. `quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded","quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"skills_add"}},"/items/{id}/skill":{"get":{"operationId":"skills.get","tags":["items"],"summary":"Read a skill: its frontmatter, instructions and file list","description":"Returns a skill item's name and description first, then its other frontmatter fields, the SKILL.md instructions (text) and the list of files with their sizes. The instructions are what an agent reads when it uses the skill; skills.get_file reads any other file of a bundle. An item that is not a skill is invalid_request. A skill of a published Public collection is also read without signing in, as a note's text is (the same limit per address); that reader gets no byte addresses, and a skill the gate withholds is forbidden.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"}],"responses":{"200":{"description":"The skill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRead"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"skills_get"}},"/items/{id}/skill/files":{"get":{"operationId":"skills.get_file","tags":["items"],"summary":"Read one file of a skill","description":"Returns one file of a skill by its path (as skills.get lists it): a text file inline as encoding utf8 with its text, anything else (an image, a PDF, a script that is not UTF-8) in base64 chunks of 98304 bytes through this call alone (encoding base64: data, chunk_sha256, next_index; call again with index until last), as items.download serves a file. A file over 10 MB is file_too_large. Only a path the skill lists is read.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"q7rt2bx9kz4m"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"The file's path as skills.get lists it, e.g. references/guide.md.","example":"references/guide.md"},"required":true,"description":"The file's path as skills.get lists it, e.g. references/guide.md.","name":"path","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"description":"For a file read in chunks: the chunk, from 0; the answer's next_index says the next. A text file needs none; anything else comes in chunks of 98304 bytes as base64."},"required":false,"description":"For a file read in chunks: the chunk, from 0; the answer's next_index says the next. A text file needs none; anything else comes in chunks of 98304 bytes as base64.","name":"index","in":"query"}],"responses":{"200":{"description":"The file.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillFile"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"skills_get_file"}},"/items/{id}/skill/files/{path}":{"put":{"operationId":"skills.put_file","tags":["items"],"summary":"Write one file of a skill","description":"Writes one file of a skill item (adds it, or replaces it), for anyone who may edit the item. The server rewrites the skill whole: the file paths are checked again (relative paths only; no .., no absolute or drive path, no file where the skill has a folder: invalid_skill unsafe_path or path_conflict), the caps (200 files, 10 MB a file, 20 MB in all) and SKILL.md is validated again whatever changed. A skill that was one SKILL.md becomes a skill with several files when a file is added; its id, address and card stay. Editing SKILL.md changes the skill's name and description as its frontmatter says. Text goes as content, or as a partial change of an existing text file (edits, prepend, append: the same implementation as a note's, ZEG-1574); a binary file is uploaded first (items.upload into the skill's collection) and attached with upload_id. Returns the item, the new version and the file list. A script is stored and listed, never run.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"b4kq7xz2m9np"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"The file's path inside the skill's folder, as skills.get lists it (SKILL.md, references/guide.md), percent-encoded as one segment (references%2Fguide.md).","example":"references%2Fguide.md"},"required":true,"description":"The file's path inside the skill's folder, as skills.get lists it (SKILL.md, references/guide.md), percent-encoded as one segment (references%2Fguide.md).","name":"path","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillFilePut"}}}},"responses":{"200":{"description":"The skill as stored now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillFileWrite"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `invalid_skill`: A skill is refused; `reason` names why: skill_md_missing, frontmatter_missing, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, markdown_missing, markdown_too_long, not_a_zip, zip_unsupported, unsafe_path, too_many_files, skill_too_large, not_single_folder, bundle_not_editable, binary_file (a file handed over MCP as text holds bytes that are not text) or path_conflict (a file where the bundle has a folder, or inside one of its files).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","invalid_skill"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `skill_changed`: The skill changed since the version this edit was based on; nothing was written. Read it again (`current_version`) and redo the edit. `upload_not_found`: Finalise found no uploaded bytes for this item yet; PUT them, then finalise again. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","skill_changed","upload_not_found","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`storage_quota_exceeded`: The owner's storage is full. `file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["storage_quota_exceeded","file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"skills_put_file"},"delete":{"operationId":"skills.delete_file","tags":["items"],"summary":"Remove one file of a skill","description":"Removes one file of a skill item, for anyone who may edit the item; SKILL.md cannot be removed (invalid_skill skill_md_missing: delete the item to remove the skill). The server rewrites the skill whole and validates SKILL.md again. When only SKILL.md is left, the skill is stored as one SKILL.md again; its id, address and card stay. A path the skill does not list is not_found. Returns the item, the new version and the file list.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":120,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","example":"b4kq7xz2m9np"},"required":true,"description":"The item. Its 12-character id, its number (2397815 or #2397815) or its word name (generated or chosen, in any case and spacing: \"amber falcon\").","name":"id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":255,"description":"The file's path inside the skill's folder, as skills.get lists it (SKILL.md, references/guide.md), percent-encoded as one segment (references%2Fguide.md).","example":"references%2Fguide.md"},"required":true,"description":"The file's path inside the skill's folder, as skills.get lists it (SKILL.md, references/guide.md), percent-encoded as one segment (references%2Fguide.md).","name":"path","in":"path"},{"schema":{"type":"integer","minimum":1,"description":""},"required":false,"name":"base_version","in":"query"}],"responses":{"200":{"description":"The skill as stored now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillFileWrite"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `invalid_skill`: A skill is refused; `reason` names why: skill_md_missing, frontmatter_missing, name_missing, name_invalid, name_mismatch, description_missing, description_too_long, markdown_missing, markdown_too_long, not_a_zip, zip_unsupported, unsafe_path, too_many_files, skill_too_large, not_single_folder, bundle_not_editable, binary_file (a file handed over MCP as text holds bytes that are not text) or path_conflict (a file where the bundle has a folder, or inside one of its files).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","invalid_skill"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_permission`: A collaborator lacks a permission; `permission` names it.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden","missing_client_header","insufficient_permission"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id. `idempotency_conflict`: The idempotency key was used for another operation. `skill_changed`: The skill changed since the version this edit was based on; nothing was written. Read it again (`current_version`) and redo the edit. `upload_not_found`: Finalise found no uploaded bytes for this item yet; PUT them, then finalise again. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference","idempotency_conflict","skill_changed","upload_not_found","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`storage_quota_exceeded`: The owner's storage is full. `file_too_large`: The file is over the plan's per-file size.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["storage_quota_exceeded","file_too_large"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"skills_delete_file"}},"/collections/{id}/open":{"get":{"operationId":"collections.open","tags":["collections"],"summary":"Open a collection: it and its first page of items","description":"One read of a collection and the first page of its items in their order (50 unless `limit` says otherwise, at most 100; `items.list` continues from `next_offset`), what the Player inside Claude opens with (B-API-213). Exactly what `collections.get` and `items.list` answer for the same caller: an item gated against the caller is only its blurred rendition and label (B-API-216), and private byte URLs are the caller's own, for at most 15 minutes. An agent needs both `items:read` and `collections:read`. Signed out, rate-limited per address.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"},{"schema":{"type":"integer","example":50,"description":"Page size: 50 when absent, at most 100 (B-API-213)."},"required":false,"description":"Page size: 50 when absent, at most 100 (B-API-213).","name":"limit","in":"query"},{"schema":{"type":"integer","example":0,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008)."},"required":false,"description":"Rows to skip. Floored at 0; past the end the page is empty and `total` still exact (B-API-008).","name":"offset","in":"query"}],"responses":{"200":{"description":"The collection and its first page of items.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionOpen"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`ambiguous_reference`: The name given is held by more than one item you may read; nothing was done. `candidates` lists each (id, title, collection); ask the person which one and call again with its id.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["ambiguous_reference"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read","x-mcp-tool":"collections_open"}},"/collections/{id}/drop-links":{"post":{"operationId":"items.drop_link","tags":["items"],"summary":"Make a link a person opens to drop files into a collection","description":"For a file only the person can reach. Makes a link, `drop_url`, that works for 15 minutes and takes up to `expected_count` files (default 10, at most 25) into this one collection. The person opens it on any device, signed out, chooses the files and they arrive in the collection as if you had added them; nothing is installed or configured. `expected_filenames` and `note` are shown on the page (a checklist that ticks as each arrives, a line for the person) and never enforced. Needs the right to add to the collection (the owner, or a member who can upload); any other collection, unknown ones included, is 403. At most 10 links an hour and 30 in 24 hours per account (429): one link takes many files, so give the person the one you have. Give them the link now, then check with items_list. The token is in `drop_url` only here and is stored only as a hash. Revoke a link with items_drop_link_revoke.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropLinkRequest"}}}},"responses":{"201":{"description":"The link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropLink"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","account_suspended","forbidden","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_drop_link"},"get":{"operationId":"items.drop_links","tags":["items"],"summary":"List a collection's open drop links","description":"The links of this collection that are still open (not turned off, not expired, not used up) and that the caller may turn off: the owner sees every one, anyone else their own. This is what the add sheet's owner control shows. The token is not here; `token_prefix` tells links apart.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^\\s*(#?\\s*[0-9]{1,16}|[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12})\\s*$","description":"The collection. Its 12-character id or its number (4821 or #4821).","example":"b4kq7xz2m9np"},"required":true,"description":"The collection. Its 12-character id or its number (4821 or #4821).","name":"id","in":"path"}],"responses":{"200":{"description":"The open links, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenDropLinks"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["insufficient_scope","account_suspended"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:read"}},"/drop-links/{id}/revoke":{"post":{"operationId":"items.drop_link_revoke","tags":["items"],"summary":"Turn a drop link off","description":"Turns a live drop link off at once; it takes no further file (a file already on its way finishes). The link's maker, their agents and the collection's owner may; to anyone else the link does not exist. Revoking again answers `changed: false`. Rows of links are kept 7 days after they expire.","security":[{"agentToken":[]},{}],"parameters":[{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","example":"d7rt2bx9kz4m","description":"The drop link's id (not its token)."},"required":true,"description":"The drop link's id (not its token).","name":"id","in":"path"}],"responses":{"200":{"description":"The link is off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropLinkRevoked"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"401":{"description":"`session_required`: This route needs a signed-in session. `session_ended`: The session was ended; sign in again (the only answer that signs a client out). `wrong_token_type`: The wrong kind of credential: a session cookie sent to an agent route, or a bearer token to a session route. `unauthorized`: Missing, invalid or expired agent token. `invalid_token`: The bearer token is not an agent token this API issued (unknown or malformed). `token_expired`: The agent token has passed its expiry; mint a new one. `token_revoked`: The agent token was revoked; mint a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["session_required","session_ended","wrong_token_type","unauthorized","invalid_token","token_expired","token_revoked"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `insufficient_scope`: The token lacks a scope; `need` names it. `account_suspended`: The account is suspended. `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","insufficient_scope","account_suspended","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"404":{"description":"`not_found`: Absent or not visible; also hides that a private thing exists (B-API-090).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`idempotency_conflict`: The idempotency key was used for another operation. `idempotency_in_flight`: A request with this idempotency key is still running; ask again shortly. The server may hold a same-key request up to about 15 s before answering this (a key held after a 503 `server_busy`, at most 12 s, then one 2 s wait for the request that took it over). `idempotency_done_unreplayable`: This request already went through, but its answer was not kept; read the result instead.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["idempotency_conflict","idempotency_in_flight","idempotency_done_unreplayable"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again. `mcp_quota_exceeded`: The plan's monthly agent-operation allowance.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited","mcp_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"agent","x-zegazone-scope":"items:write","x-mcp-tool":"items_drop_link_revoke"}},"/drop/{token}":{"get":{"operationId":"items.drop_info","tags":["drop"],"summary":"What a drop page opens with","description":"Read by `/drop/<token>`, with no credential. Always 200 with the same fields: a token that is not one and a token that was never a link both answer `state: invalid` with nothing else, so the answer never says whether a link exists (B-UPLOAD-041). A closed link says only `expired`, `used_up` or `revoked`.","parameters":[{"schema":{"type":"string","maxLength":200,"description":"The link's token: the last part of its address."},"required":true,"description":"The link's token: the last part of its address.","name":"token","in":"path"}],"responses":{"200":{"description":"The link, or why it is closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropInfo"}}}},"429":{"description":"`rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/drop/{token}/uploads":{"post":{"operationId":"items.drop_upload","tags":["drop"],"summary":"Start a file's upload through a drop link","description":"The first of three steps for one file, as items.upload is for an add: a pending item in the collection the link names (no collection id is read) and where to PUT its bytes. Needs no credential but the token. Checked against the owner's plan as any upload is: over the per-file cap 413 `file_too_large`, over the owner's storage 413 `storage_quota_exceeded`; the link maker's account must have confirmed its email once its window has passed (403 `email_verification_required`). A slot of the link is taken now and kept even if the bytes never arrive. A link that cannot take the call answers 403 `forbidden` with `state` (expired, used_up, revoked, invalid) beside the detail. Then PUT the bytes (a presigned URL valid 15 minutes) and call items.drop_finalise.","parameters":[{"schema":{"type":"string","maxLength":200,"description":"The link's token: the last part of its address."},"required":true,"description":"The link's token: the last part of its address.","name":"token","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropUploadRequest"}}}},"responses":{"201":{"description":"The pending item and its PUT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropUploadStarted"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only. `email_verification_required`: Confirm the account's email first: publishing and sharing wait for it, and past the 48-hour deadline so does adding; `remedy` says how.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","forbidden","email_verification_required"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size. `storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large","storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens). `rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded","rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/drop/{token}/uploads/{item_id}/renew":{"post":{"operationId":"items.drop_renew","tags":["drop"],"summary":"Fresh PUT URLs for a file of a drop link","description":"As items.renew, for an upload this link started. A link that cannot take the call answers 403 `forbidden` with `state` (expired, used_up, revoked, invalid) beside the detail.","parameters":[{"schema":{"type":"string","maxLength":200,"description":"The link's token: the last part of its address."},"required":true,"description":"The link's token: the last part of its address.","name":"token","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The item_id items.drop_upload answered."},"required":true,"description":"The item_id items.drop_upload answered.","name":"item_id","in":"path"}],"responses":{"200":{"description":"The PUT, signed again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropRenewed"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size. `storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large","storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens). `rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded","rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/drop/{token}/uploads/{item_id}/finalise":{"post":{"operationId":"items.drop_finalise","tags":["drop"],"summary":"Finish a file of a drop link","description":"As items.finalise, for an upload this link started: the item joins the end of the collection, the owner is charged, and an open Studio announces it. An expired or used-up link still finishes what it began (B-UPLOAD-048); a turned-off one does not. The answer says nothing of the item beyond its size and type, and the state of the link now. A link that cannot take the call answers 403 `forbidden` with `state` (expired, used_up, revoked, invalid) beside the detail.","parameters":[{"schema":{"type":"string","maxLength":200,"description":"The link's token: the last part of its address."},"required":true,"description":"The link's token: the last part of its address.","name":"token","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The item_id items.drop_upload answered."},"required":true,"description":"The item_id items.drop_upload answered.","name":"item_id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropFinaliseRequest"}}}},"responses":{"200":{"description":"The file is in.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropFinalised"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON. `integrity_mismatch`: The declared length or SHA-256 does not match the bytes received.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json","integrity_mismatch"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"409":{"description":"`upload_not_found`: Finalise found no uploaded bytes for this item yet; PUT them, then finalise again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_not_found"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"410":{"description":"`upload_expired`: The upload window has passed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["upload_expired"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size. `storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large","storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens). `rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded","rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}},"/drop/{token}/uploads/{item_id}/abort":{"post":{"operationId":"items.drop_abort","tags":["drop"],"summary":"Cancel a file of a drop link","description":"As items.abort, for an upload this link started. The link's slot stays spent. A link that cannot take the call answers 403 `forbidden` with `state` (expired, used_up, revoked, invalid) beside the detail.","parameters":[{"schema":{"type":"string","maxLength":200,"description":"The link's token: the last part of its address."},"required":true,"description":"The link's token: the last part of its address.","name":"token","in":"path"},{"schema":{"type":"string","pattern":"^[023456789bcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ]{12}$","description":"The item_id items.drop_upload answered."},"required":true,"description":"The item_id items.drop_upload answered.","name":"item_id","in":"path"}],"responses":{"200":{"description":"The upload is gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropAborted"}}}},"400":{"description":"`invalid_request`: A missing, invalid or unknown field; `field` names it and `detail` says why. `invalid_json`: The body is not JSON.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_json"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"403":{"description":"`missing_client_header`: A state-changing request without the X-Zegazone-Client header (B-AUTH-130). `forbidden`: No access, not the owner, or admin only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["missing_client_header","forbidden"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"413":{"description":"`file_too_large`: The file is over the plan's per-file size. `storage_quota_exceeded`: The owner's storage is full.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["file_too_large","storage_quota_exceeded"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"429":{"description":"`quota_exceeded`: A resource cap (collections, items, bookmarks, live agent tokens). `rate_limited`: A burst limit was hit; `retry_after_seconds` says when to try again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["quota_exceeded","rate_limited"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (rate_limited)."}},"required":["error"]}}}},"500":{"description":"`server_error`: An unhandled failure; no detail is given. Safe to retry with backoff.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_error"]},"detail":{"type":"string"},"field":{"type":"string"}},"required":["error"]}}}},"503":{"description":"`server_busy`: The database did not answer within its budget; retry after `retry_after` seconds.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["server_busy"]},"detail":{"type":"string"},"field":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds to wait before retrying (server_busy)."}},"required":["error"]}}}}},"x-zegazone-access":"session"}}},"webhooks":{},"x-error-model":{"invalid_json":400,"invalid_request":400,"unknown_op":400,"invalid_skill":400,"not_a_text_note":400,"collection_not_empty":400,"integrity_mismatch":400,"secret_material_detected":400,"webhook_url_not_https":400,"webhook_url_has_credentials":400,"webhook_url_zegazone_host":400,"webhook_url_blocked_host":400,"unauthorized":401,"wrong_token_type":401,"session_required":401,"session_ended":401,"insufficient_scope":403,"forbidden":403,"insufficient_permission":403,"permission_denied":403,"media_locked":403,"account_suspended":403,"email_verification_required":403,"alias_limit_reached":403,"waitlist_only":403,"service_paused":403,"publish_limit_reached":403,"missing_client_header":403,"not_found":404,"method_not_allowed":405,"duplicate_collection_name":409,"duplicate_library_name":409,"library_follows_collection":409,"library_not_empty":409,"cycle_detected":409,"nesting_too_deep":409,"publish_handle_locked":409,"alias_frozen":409,"alias_has_subscribers":409,"slug_taken":409,"publish_held":409,"handle_taken":409,"name_reserved":409,"name_screen_rejected":409,"skill_changed":409,"note_changed":409,"ambiguous_reference":409,"word_name_taken":409,"idempotency_conflict":409,"idempotency_done_unreplayable":409,"idempotency_in_flight":409,"webhook_secret_unreadable":409,"export_in_progress":409,"not_capturable":409,"restore_window_expired":410,"upload_expired":410,"download_expired":410,"moved":410,"payload_too_large":413,"file_too_large":413,"storage_quota_exceeded":413,"rate_limited":429,"quota_exceeded":429,"mcp_quota_exceeded":429,"decision_budget_exceeded":429,"suggestion_allowance_exceeded":429,"server_error":500,"server_busy":503,"invalid_token":401,"token_expired":401,"token_revoked":401,"live_updates_unavailable":503,"payouts_unavailable":503,"payouts_refused":502,"charging_not_allowed":403,"payouts_not_set_up":409,"push_unavailable":503,"photo_search_unavailable":503,"billing_unavailable":503,"no_billing_account":404,"selling_unavailable":503,"seller_not_ready":403,"adult_mark_held_above":409,"not_for_sale":409,"already_entitled":409,"paid_subscribers":409,"not_refundable":409,"has_buyers":409,"has_subscribers":409,"upload_not_found":409,"url_token_invalid":401,"url_token_expired":401,"variant_not_ready":404,"range_not_satisfiable":416,"render_failed":502,"third_party_url_unavailable":503,"reset_link_expired":410,"reauthentication_required":403,"invalid_client":401,"invalid_grant":400,"unauthorized_client":400,"unsupported_grant_type":400,"invalid_scope":400,"invalid_target":400,"invalid_redirect_uri":400,"invalid_client_metadata":400,"unsupported_response_type":400,"access_denied":403},"servers":[{"url":"https://api.zegazone.app","description":"This environment's API"}],"x-zegazone-hosts":{"app":"https://zegazone.app","studio":"https://studio.zegazone.app","api":"https://api.zegazone.app","mcp":"https://mcp.zegazone.app/mcp","oauth_issuer":"https://mcp.zegazone.app","media":"https://zegazone.net"}}