{"openapi":"3.1.0","servers":[{"url":"https://api.synq.build"}],"info":{"title":"Synq Management API","version":"1.222.0","description":"Manage a Synq tenant's orgs, brands, apps, APIs and users."},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An org API key (`sk_live_…`, `sk_test_…`), or an access token from the Synq issuer (the `synq` brand, on the accounts host) for this API."}},"schemas":{"WebhookEvent":{"type":"object","properties":{"type":{"type":"string","example":"org.updated"},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"id":{"type":"string","description":"The audit row the event is","example":"aud_01h455vb4pex5vsknk084sn02q"},"org_id":{"type":"string"},"brand_id":{"type":["string","null"]},"actor":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":["string","null"]}},"required":["type","id"]},"act_client_id":{"type":["string","null"]},"resource":{"type":["object","null"],"properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"]},"metadata":{"type":"object","additionalProperties":{}}},"required":["id","org_id","brand_id","actor","act_client_id","resource","metadata"]}},"required":["type","timestamp","data"]},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok"],"description":"`ok` while the API answers"},"version":{"type":"string","description":"The release the build is","example":"api/2026.10.14"},"sha":{"type":"string","description":"The commit the build is from","example":"3025f9c"},"brand_changes":{"type":"string","x-extensible-enum":["listening","reconnecting","off"],"description":"Whether this instance hears changes to brands' keys, apps and settings: `listening`; `reconnecting` while it can't, when it reads each brand's again at least every 30 seconds instead; `off` without a database.","example":"listening"}},"required":["status","version","sha","brand_changes"]},"ManagementResourceMetadata":{"type":"object","properties":{"resource":{"type":"string","format":"uri","description":"The configured canonical API origin and existing management resource identifier."},"authorization_servers":{"type":"array","items":{"type":"string","format":"uri"},"description":"Configured authorization server issuer identifiers; existing app and resource eligibility rules still apply."},"bearer_methods_supported":{"type":"array","items":{"type":"string","enum":["header"]},"description":"Bearer credentials are accepted in the Authorization header only."},"resource_name":{"type":"string","enum":["Synq Management API"],"description":"The public display name of the management resource."}},"required":["resource","authorization_servers","bearer_methods_supported","resource_name"]},"PlanPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Plan"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Plan":{"type":"object","properties":{"code":{"type":"string","description":"The plan's code, which the billing routes take","example":"pro"},"name":{"type":"string","description":"The plan's name, for people","example":"Pro"},"features":{"type":"array","items":{"$ref":"#/components/schemas/PlanFeature"},"description":"What it includes"},"quotas":{"$ref":"#/components/schemas/PlanQuotas"},"price":{"type":["object","null"],"properties":{"currency":{"type":"string","description":"The prices' currency, ISO 4217, lowercase","example":"usd"},"monthly_cents":{"type":"string","pattern":"^\\d+$","description":"The price of a month, in cents of `currency`, as an integer string","example":"2500"},"annual_cents":{"type":["string","null"],"pattern":"^\\d+$","description":"The price of a year, in cents of `currency`, as an integer string, or null when it is sold monthly only","example":"25000"},"mau_overage_micros":{"type":["string","null"],"pattern":"^\\d+$","description":"Each monthly active user above the allowance, in micros of `currency` (millionths of its main unit), as an integer string: `5000` is half a cent. Null: users above the allowance are not billed","example":"5000"},"trial_days":{"type":"integer","description":"Days a new subscription is free, with no card asked for (`POST /v1/orgs/{org}/billing/trial`); 0: none, and the plan starts at checkout","example":14}},"required":["currency","monthly_cents","annual_cents","mau_overage_micros","trial_days"],"description":"Null: by contract (`contact_sales`)"},"contact_sales":{"type":"boolean","description":"Whether the plan is bought through sales rather than checkout","example":false}},"required":["code","name","features","quotas","price","contact_sales"]},"PlanFeature":{"type":"object","properties":{"feature":{"type":"string","description":"The feature's code. More are added over time: skip one you don't know","x-extensible-enum":["auth.byo_connections","auth.custom_providers","integration.webhooks","branding.advanced_theme","branding.remove_powered_by","branding.default_avatars","auth.token_gating","branding.custom_email_domain","branding.custom_domain","integration.own_bots","team.brand_roles","team.sso","integration.audit_log_streams"],"example":"integration.webhooks"},"status":{"type":"string","x-extensible-enum":["available","coming"],"description":"`available`: the plan gives it today. `coming`: Synq is still building it, and the plan will include it","example":"available"}},"required":["feature","status"]},"PlanQuotas":{"type":"object","properties":{"apps":{"type":["integer","null"],"description":"Apps the org makes itself, across its brands, beside its development apps (`development_apps`); null: no limit","example":10},"development_apps":{"type":"integer","description":"Development apps the org has beside `apps`, which don't count toward it: an app whose redirect URIs are all on localhost, 127.0.0.1 or [::1], as onboarding's is. Any more count as apps, and so does one given a redirect URI anywhere else","example":1},"brands":{"type":["integer","null"],"description":"How many brands an org on it may have, or null for no limit","example":3},"monthly_active_users":{"type":["integer","null"],"description":"In the price. Above it nobody is refused, and each one is billed at `price.mau_overage_micros` on a plan that has one; on one with none (free Starter) nothing is billed. Null: no limit","example":50000},"audit_retention_days":{"type":["integer","null"],"description":"Null: kept for ever","example":30}},"required":["apps","development_apps","brands","monthly_active_users","audit_retention_days"]},"Problem":{"type":"object","properties":{"type":{"type":"string","example":"https://docs.synq.build/errors/insufficient_permissions"},"title":{"type":"string","example":"Insufficient permissions"},"status":{"type":"integer","example":403},"code":{"type":"string","example":"insufficient_permissions"},"request_id":{"type":"string","pattern":"^req_[0-9a-f]{32}$","description":"Identifies this API-origin request in support logs. Edge-cache hits may share the original response ID."},"retry_after":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Known wait in seconds for a 429 problem, copied from its numeric Retry-After header; absent when unknown."},"detail":{"type":"string","example":"This key lacks org.brands.edit."},"missing_permission":{"type":"string","example":"org.brands.edit"},"reason":{"type":"string","description":"Why, for code to read, where a code has several causes","example":"public_mailbox"},"errors":{"type":"array","items":{"type":"object","properties":{"pointer":{"type":"string","description":"The RFC 6901 JSON Pointer to the body's field (a missing one included, `''` for the whole body); absent for a path or query parameter or a header, which `detail` names","example":"/redirect_uris/0"},"code":{"type":"string","description":"The rule it broke, one of `invalid_type`, `too_small`, `too_big`, `invalid_format`, `invalid_value` (a value the field doesn't take, a check of the route's own included) and `unrecognized_keys` (a field the object doesn't take, at its own `pointer`): the docs' `validation_failed` page says what each means","example":"invalid_format"},"detail":{"type":"string","description":"What is wrong with it, and so how to fix it","example":"Not an https URL."}},"required":["code","detail"]},"description":"What was wrong with the request, field by field"}},"required":["type","title","status","code"]},"ProviderScopePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderScope"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"ProviderScope":{"type":"object","properties":{"provider":{"type":"string","x-extensible-enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"description":"The provider. More are added over time: skip one you don’t know.","example":"telegram"},"scope":{"type":"string","description":"A scope, as the provider names it","example":"telegram:bot_access"},"description":{"type":"string","description":"What the person shares, in plain words, as the hosted pages say it: `{brand}` stands for the brand’s name","example":"Let {brand}’s Telegram bot send you messages"},"needs_own_app":{"type":"boolean","description":"Whether it rides only on your own app at the provider (at GitHub, an OAuth App), never Synq’s shared one: a provider review or paid tier, a grant the provider records against the app, or a permission that goes to whoever’s app ran the sign-in"},"delivery":{"type":"string","x-extensible-enum":["claims","grant","read","token"],"description":"How what it grants reaches you: `claims`, in the provider’s ID token, kept on the identity and in `linked_accounts`; `grant`, a permission held at the provider that you use with your own credentials (a bot’s token); `read`, Synq would read it at sign-in; `token`, it needs the person’s provider token","example":"grant"},"status":{"type":"string","x-extensible-enum":["available","coming"],"description":"`available`: a brand may ask for it today. `coming`: on the list, but refused (`scope_unavailable`) until Synq reads it at sign-in or keeps provider tokens","example":"available"},"account_types":{"type":["string","null"],"x-extensible-enum":["work"],"description":"Microsoft: `work` for a permission only work or school accounts have; null where every account the brand admits has it","example":null},"source_url":{"type":"string","format":"uri","description":"The provider’s own documentation of it","example":"https://core.telegram.org/bots/telegram-login"}},"required":["provider","scope","description","needs_own_app","delivery","status","account_types","source_url"]},"OrgPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Org"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Org":{"type":"object","properties":{"id":{"type":"string","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"slug":{"type":"string","description":"The org's handle in the dashboard","example":"acme"},"name":{"type":"string","description":"The org's name","example":"Acme"},"default_brand_id":{"type":["string","null"],"description":"Its default brand: the one made with the org, or the first to arrive in an org made empty (`first_brand: false`). Null while it has no brand: make one (`POST /v1/orgs/{org}/brands`) or move one in, and that one becomes its default.","example":"brd_01h455vb4pex5vsknk084sn02q"},"plan":{"type":"string","description":"Its plan, from `GET /v1/plans`: what it may make and use","example":"starter"},"created_at":{"type":"string","format":"date-time","description":"When the org was made","example":"2026-10-01T12:00:00.000Z"},"disabled_at":{"type":["string","null"],"format":"date-time","description":"When Synq disabled it, or null. A disabled org can only be read: its keys, its brands' issuers and its webhooks stop until Synq enables it again, and nothing is deleted.","example":null},"disabled_reason":{"type":["string","null"],"description":"Why Synq disabled it, or null.","example":null}},"required":["id","slug","name","default_brand_id","plan","created_at","disabled_at","disabled_reason"]},"OrgCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"example":"Acme","description":"The org's name"},"slug":{"type":"string","minLength":3,"maxLength":63,"example":"acme","description":"A lowercase DNS label. Well-known service names and their hyphen-prefixed variants require verified ownership approved by Synq staff."},"issuer_slug":{"type":"string","minLength":3,"maxLength":63,"example":"acme","description":"The default brand's issuer slug, `https://<issuer_slug>.auth.synq.build`, for good: the org's slug when not given."},"first_brand":{"type":"boolean","description":"Whether the org starts with its first brand, named as the org (the default, `true`). `false` makes it empty, for a brand you'll move here from another org: it has no brand, so `default_brand_id` is null and it takes no `issuer_slug`, until the first brand made there or moved in becomes its default.","example":true}},"required":["name","slug"],"additionalProperties":false},"OrgAllowance":{"type":"object","properties":{"can_create":{"type":"boolean","description":"Whether `POST /v1/orgs` would make the caller an org now, a free slug given","example":false},"refusal":{"type":["string","null"],"description":"Why it would refuse, as its error code: `org_quota_exceeded`, the caller owns as many free orgs as one person may (orgs on a paid plan don't count); `org_creation_closed`, Synq takes no orgs from this account here, or its address is a temporary one; `email_unverified`, the account's email address isn't verified. Null when it would not","example":"org_quota_exceeded","x-extensible-enum":["org_quota_exceeded","org_creation_closed","email_unverified"]},"limit":{"type":["integer","null"],"description":"How many free orgs one person may own, counting free orgs deleted in the last 30 days. Orgs on a paid plan or one Synq set don't count; an org on a trial does until it's paid. Null: no limit","example":3},"owned":{"type":"integer","description":"The free orgs counted against it: those the caller owns, and those they owned that were deleted in the last 30 days while free. Orgs owned through another verified account with the same email address count too","example":3},"next_slot_at":{"type":["string","null"],"format":"date-time","description":"At the limit: when enough deleted orgs stop counting for one more, 30 days after each was deleted. Null below the limit, or when only live orgs count, which an owner deletes or hands over to free a slot","example":"2026-11-29T12:00:00.000Z"},"counted_orgs":{"type":"array","items":{"$ref":"#/components/schemas/CountedOrg"},"description":"The free orgs `owned` counts, one each: live ones first, then deleted ones, the soonest to stop counting first. For a page that offers a way forward at the limit (upgrading one, or deleting one) without ever offering an org on a paid plan, which never counts. `owned` is how many there are"}},"required":["can_create","refusal","limit","owned","next_slot_at","counted_orgs"]},"CountedOrg":{"type":"object","properties":{"id":{"type":"string","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"The org's name","example":"Acme"},"slug":{"type":"string","description":"The org's slug, its handle in the dashboard","example":"acme"},"plan":{"type":"string","description":"Its plan, by code (`GET /v1/plans`): a free plan, or a paid one on a trial","example":"starter"},"on_trial":{"type":"boolean","description":"Whether it is on a trial, which counts until it's paid","example":false},"yours":{"type":"boolean","description":"Whether the caller's own account owns it. False: another verified account with the same email address does, so only that account can upgrade or delete it","example":true},"deleted_at":{"type":["string","null"],"format":"date-time","description":"When its owner deleted it; null while it is live","example":null},"counts_until":{"type":["string","null"],"format":"date-time","description":"A deleted org: when it stops counting, 30 days after it was deleted. Null while it is live, which counts until it is upgraded, deleted or handed over","example":null}},"required":["id","name","slug","plan","on_trial","yours","deleted_at","counts_until"],"description":"A free org the cap on the orgs one person owns counts: one the caller owns, or owned and deleted in the last 30 days while free"},"OrgUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"example":"Acme","description":"The org's name"},"slug":{"type":"string","minLength":3,"maxLength":63,"example":"acme","description":"The org's handle in the dashboard. Its brands' issuer slugs don't change."},"default_brand_id":{"type":"string","description":"Another of the org's live brands (`brd_…`) to make its default. The old default becomes a brand like the others, which can then be deleted on its own; nothing about either brand's issuer, users or apps changes.","example":"brd_01JXA9K1Q2W3E4R5T6Y7U8I9O0"}},"additionalProperties":false},"SlugAvailability":{"type":"object","properties":{"slug":{"type":"string","description":"The slug checked"},"org":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether it could"},"reason":{"type":["string","null"],"x-extensible-enum":["format","reserved","protected","taken"],"description":"Why it is not available, or null when it is: `format`; `reserved`, a name only Synq may take; `protected`, a well-known service's name, held for its verified owner; `taken`"}},"required":["available","reason"],"description":"Whether an org could take it as its slug"},"issuer":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether it could"},"reason":{"type":["string","null"],"x-extensible-enum":["format","reserved","protected","taken"],"description":"Why it is not available, or null when it is: `format`; `reserved`, a name only Synq may take; `protected`, a well-known service's name, held for its verified owner; `taken`"}},"required":["available","reason"],"description":"Whether a brand could take it as its issuer slug"}},"required":["slug","org","issuer"]},"ClaimableOrgMade":{"type":"object","properties":{"org":{"type":"object","properties":{"id":{"type":"string","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"slug":{"type":"string","description":"The org's slug","example":"dev-k3v9q2m7xa"},"name":{"type":"string","description":"The org's name","example":"acme-web"}},"required":["id","slug","name"],"description":"The org"},"issuer":{"type":"string","description":"The brand's issuer: `SYNQ_ISSUER`.","example":"https://dev-k3v9q2m7xa.auth.synq.build"},"app":{"type":"object","properties":{"client_id":{"type":"string","description":"The app's client_id: `SYNQ_CLIENT_ID`"},"client_secret":{"type":["string","null"],"description":"A web app's secret, shown once: here, and never again."},"app_type":{"type":"string","x-extensible-enum":["web","spa"],"description":"The app's type: `web` or `spa`"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"The app's redirect URIs"}},"required":["client_id","client_secret","app_type","redirect_uris"],"description":"Its development app"},"claim":{"type":"object","properties":{"token":{"type":"string","description":"Whoever has it can claim the org, once. Shown once, here: keep it where the project keeps its other secrets.","example":"synq_claim_…"},"url":{"type":["string","null"],"description":"The dashboard page that claims it, with the token in it: the developer opens it, signs up or in, and owns the org. Null where this stage has no dashboard."},"expires_at":{"type":"string","format":"date-time","description":"When it stops being claimable, 7 days after it was made, and Synq deletes the org."}},"required":["token","url","expires_at"],"description":"How someone makes it theirs"},"limits":{"type":"object","properties":{"users":{"type":"integer","description":"How many people its brand takes until someone claims it.","example":25}},"required":["users"],"description":"What it allows until someone claims it"}},"required":["org","issuer","app","claim","limits"]},"ClaimableOrgCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"What the developer's project is called, such as its package.json's name: the org's, its brand's and its app's name until someone claims it.","example":"acme-web"},"app_type":{"type":"string","enum":["web","spa"],"default":"web","description":"A web app with a server, which keeps a secret (Next.js with `@synqauth/nextjs`), or a single-page app."},"redirect_uris":{"type":"array","items":{"type":"string","format":"uri","example":"https://localhost:3000/api/auth/callback"},"minItems":1,"maxItems":5,"description":"https on a loopback address only (`localhost`, `127.0.0.1`, `[::1]`), with its port: a claimable org serves an app on a laptop, never a public site."},"post_logout_redirect_uris":{"type":"array","items":{"type":"string","format":"uri","example":"https://localhost:3000/api/auth/callback"},"maxItems":5,"default":[],"description":"https on a loopback address only, as `redirect_uris`."}},"required":["name","redirect_uris"],"additionalProperties":false},"ClaimableOrgView":{"type":"object","properties":{"org":{"type":"object","properties":{"id":{"type":"string","description":"The org's id"},"slug":{"type":"string","description":"The org's slug"},"name":{"type":"string","description":"The org's name"}},"required":["id","slug","name"],"description":"The org"},"issuer":{"type":"string","description":"Its brand's issuer"},"apps":{"type":"integer","description":"How many apps it has"},"users":{"type":"integer","description":"How many users its brand has"},"expires_at":{"type":"string","format":"date-time","description":"When it stops being claimable, and Synq deletes it"},"into_orgs":{"type":"array","items":{"$ref":"#/components/schemas/ClaimTarget"},"description":"The orgs the caller may claim it into instead, as a new brand (`POST /v1/claimable-orgs/claim-into`): those they own or are an admin of, live and enabled, by name. Empty: claim it as an org of its own (`POST /v1/claimable-orgs/claim`)"}},"required":["org","issuer","apps","users","expires_at","into_orgs"]},"ClaimTarget":{"type":"object","properties":{"id":{"type":"string","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"The org's name","example":"Acme"},"slug":{"type":"string","description":"The org's slug","example":"acme"},"role":{"type":"string","x-extensible-enum":["owner","admin"],"description":"The caller's role in it: `owner` or `admin`"},"plan":{"type":"string","description":"Its plan, by code (`GET /v1/plans`)","example":"pro"},"brands":{"type":"integer","description":"The brands it holds: live ones, and those deleted in the last 30 days","example":2},"brand_limit":{"type":["integer","null"],"description":"How many brands its plan allows. Null: no limit","example":3},"refusal":{"type":["string","null"],"description":"Why claiming into it would be refused now, as its error code: `plan_quota_exceeded`, its plan has no room for another brand (upgrade it, or remove a brand). Null when it would not","example":null,"x-extensible-enum":["plan_quota_exceeded"]}},"required":["id","name","slug","role","plan","brands","brand_limit","refusal"],"description":"An org the caller may claim a development org into, as a new brand: one they own or are an admin of"},"ClaimToken":{"type":"object","properties":{"claim_token":{"type":"string","minLength":1,"maxLength":200,"description":"The claim token `POST /v1/claimable-orgs` answered with","example":"synq_claim_…"}},"required":["claim_token"],"additionalProperties":false},"ClaimedIntoOrg":{"type":"object","properties":{"org":{"type":"object","properties":{"id":{"type":"string","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"slug":{"type":"string","description":"The org's slug","example":"acme"},"name":{"type":"string","description":"The org's name","example":"Acme"}},"required":["id","slug","name"],"description":"The org it joined: yours"},"brand":{"type":"object","properties":{"id":{"type":"string","description":"The brand's id, the same as before","example":"brd_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"The brand's name","example":"acme-web"},"issuer_slug":{"type":"string","description":"Its issuer slug, the same as before","example":"dev-k3v9q2m7xa"},"issuer":{"type":"string","description":"Its issuer, `SYNQ_ISSUER`: the same as before","example":"https://dev-k3v9q2m7xa.auth.synq.build"},"is_default":{"type":"boolean","description":"Whether it is the org's default brand: only when the org had none","example":false}},"required":["id","name","issuer_slug","issuer","is_default"],"description":"The brand it became: the development org's own, with the same id, issuer, apps, client ids, secrets, signing keys and users, so the `.env.local` that `npx synqauth init` wrote keeps working"},"development_org":{"type":"object","properties":{"id":{"type":"string","description":"The development org's id","example":"org_01h455vb4pex5vsknk084sn02r"},"slug":{"type":"string","description":"The development org's slug","example":"dev-k3v9q2m7xa"}},"required":["id","slug"],"description":"The development org `npx synqauth init` made, closed now that its brand is gone: deleted, and purged 30 days on"}},"required":["org","brand","development_org"]},"PlanProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"plan":{"type":"string","description":"The org's plan, when its plan refused","example":"starter"},"required_plan":{"type":"string","description":"The cheapest plan that would allow it; absent when none does","example":"pro"},"feature":{"type":"string","description":"The feature the org's plan lacks","example":"integration.webhooks"},"quota":{"type":"string","description":"The quota the org's plan has used up","example":"apps"},"limit":{"type":"integer","description":"How many the org's plan allows","example":1},"held_by":{"type":"array","items":{"$ref":"#/components/schemas/PlanQuotaApp"},"description":"With `quota: apps`: the apps that count toward the plan, newest first. Change one into the app you want (`PATCH /v1/orgs/{org}/brands/{brand}/apps/{app}`) or delete it (`DELETE`, the same path) to make room. The org's development app isn't one of them"}}}]},"PlanQuotaApp":{"type":"object","properties":{"id":{"type":"string","description":"The app's id (its client_id)","example":"app_01h455vb4pex5vsknk084sn02q"},"brand_id":{"type":"string","description":"The brand it belongs to","example":"brd_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"The app's name","example":"Acme web"}},"required":["id","brand_id","name"]},"ClaimIntoOrg":{"type":"object","properties":{"claim_token":{"type":"string","minLength":1,"maxLength":200,"description":"The claim token `POST /v1/claimable-orgs` answered with","example":"synq_claim_…"},"org":{"type":"string","description":"The org its brand joins, `org_…`: one you own or are an admin of, as `into_orgs` lists them","example":"org_01h455vb4pex5vsknk084sn02q"}},"required":["claim_token","org"],"additionalProperties":false},"BrandPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Brand"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Brand":{"type":"object","properties":{"id":{"type":"string","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"org_id":{"type":"string","description":"The org the brand belongs to","example":"org_01h455vb4pex5vsknk084sn02q"},"issuer_slug":{"type":"string","description":"The first label of its issuer's host. It never changes","example":"acme"},"issuer":{"type":"string","description":"The brand's issuer: its OpenID Connect issuer identifier, where its apps sign people in","example":"https://acme.auth.synq.build"},"custom_domain_issuer":{"type":["string","null"],"description":"The brand's second issuer, on its custom domain (`/v1/orgs/{org}/brands/{brand}/custom-domain`), while that answers; null otherwise. The same users, apps and keys as `issuer`, with its own `iss`.","example":"https://login.acme.com"},"name":{"type":"string","description":"The brand's name, which its sign-in pages and email show","example":"Acme"},"is_default":{"type":"boolean","description":"Whether it is the org's default brand, made with the org"},"sign_up_enabled":{"type":"boolean","description":"Whether someone new may sign up by signing in. On by default."},"sign_in_cancels_deletion":{"type":"boolean","description":"Whether a user who asked to be deleted cancels it by signing in again within the 30 days. Off by default: the sign-in is refused."},"breached_password_check":{"type":"boolean","description":"Whether a new password that appears in a known data breach is refused. On by default. The check asks Have I Been Pwned's range API about the first five characters of the password's SHA-1 only, so the password never leaves Synq. The audit log names this setting `breach_check`."},"show_last_used":{"type":"boolean","description":"Whether the sign-in page marks the way a browser last signed in at this brand, \"Last used\". On by default. It is remembered in a cookie on that device (only the method, and a wallet's name), never per account, so it reveals nothing about who has an account. Anyone using the same browser sees it, so turn it off for a brand used on shared devices."},"link_conflicts":{"type":"string","x-extensible-enum":["move","refuse"],"description":"What happens when someone adds a way to sign in (an account at a provider, or a wallet) that another user of this brand signs in with, where `move_proved_identities` (on by default) or `merge_empty_accounts` doesn't settle it. `refuse` (the default, for every brand until you change it): they can only sign in to that account instead. `move`, which you opt in to: once they confirm it's them on their own account (a code emailed to an address it proved, or a signature with one of its wallets), it moves there when the other account keeps another way in; when it is that account's only way in, they can sign in to that account instead, or merge that account into theirs, after a page that shows what comes over (its ways in, its name and username where theirs has none, its Discord and Telegram standing), which then deletes it as the user's own deletion does (`user.deleted` after 30 days). Users are never merged across brands."},"merge_empty_accounts":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with merges that user into the one adding it, at once, when that user is empty: the way being added is its only one, and it has nothing else (no email address, password, passkey, metadata, API key, Discord or Telegram standing, or org). On by default; turn it off to have `link_conflicts` decide for empty users too. The person's proof of that way in (the wallet's signature, the provider's sign-in) proves that user is theirs, so no emailed code is asked; the way in joins their account, and that user is deleted at once, recorded as `user.merged` (`metadata.from` and `metadata.into`, its `sub` and theirs) and then `user.deleted` for its `sub`, so your server can move what it keeps under the old `sub`. A user with anything more is never merged by this: `link_conflicts` decides, as when this is off. Users are never merged across brands."},"move_proved_identities":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with moves it to the person adding it, on the proof they just made of it (the wallet's signature, the provider's sign-in), when that user keeps another way to sign in. On by default. Whoever just proved it could sign in to that user with it anyway, so moving it gives nothing new away, and no emailed code is asked: the hosted page offers \"Move this wallet to this account\", and the account API's `POST /me/v1/wallets` answers a `move_ticket` for `POST /me/v1/wallet-moves`. Only that way in moves: the other user keeps everything else, its sessions signed in with it end, it is emailed at its verified address, and both users' Discord roles and Telegram groups are checked again at once. Both users record it (`user.identity_unlinked` and `user.identity_linked`, `by: moved`, `on_own_proof: true`). A user whose only way in it is never loses it this way: `merge_empty_accounts` merges an empty one, and `link_conflicts` decides the rest. Turn it off to have `link_conflicts` decide every move. Never across brands."},"link_reauth_window":{"type":"integer","minimum":0,"maximum":86400,"description":"How recent a sign-in on the same device, in seconds, lets someone add a way to sign in (an account at a provider, a wallet, an email address) without confirming it's them first: the brand's hosted pages go straight to the way being added when the browser's session at the brand is that person's, signed in on that device within this long, whichever way they signed in (Discord, X and Telegram, which don't say when the person signed in there, count too), and the account API's `POST /me/v1/wallets` takes a token from such a sign-in. 7200 (2 hours, as GitHub's sudo mode) by default, at most 86400 (a day); 0 always asks. Outside it, the person confirms in one tap with the way they signed in, and a provider that vouches for the account's own verified email address (Google, Apple, Microsoft) confirms it by itself, with no emailed code. A request's own shorter `max_age` or step-up still wants a sign-in made now. Every way in added emails the person's verified address, and its audit row says how it was confirmed (`confirmed_by`) and whether it came from a new device or address (`new_device`, `new_ip`). Removing a way in, and every other change that wants a fresh sign-in, still wants one from the last 5 minutes.","example":7200},"existing_account_prompt":{"type":"boolean","description":"Whether someone who signs in with a provider account this brand hasn't seen, whose email address one of its users proved, is asked to sign in to that user to add it (\"You already have an account with this email\"), instead of getting a second user. On by default. It applies where the address doesn't join that user by itself (a provider that doesn't vouch for it, or `link_by_email` off). The page never says how that user signs in, but it does tell anyone who can set that address at a provider that the brand has a user with it: turn it off where that matters more."},"wallet_name_usernames":{"type":"boolean","description":"Whether a person's wallets' on-chain names (a Seeker ID such as `ana.skr`, or a `.sol` name) are offered first when they pick a username, never set for them"},"logo_url":{"type":["string","null"],"description":"The brand's logo on Synq's media host, or null"},"icon_url":{"type":["string","null"],"description":"The brand's icon on Synq's media host, or null: a square, circle-safe mark beside the logo's wordmark (upload one with purpose `brand_icon`), which its bots' Discord embeds and its pages' tab and home-screen icon show. Without one, they show the logo only where it is square, never a wide wordmark cut down to fit"},"primary_color":{"type":["string","null"],"description":"The sign-in page's buttons and links, `#rrggbb`, or null for the default","example":"#4f46e5"},"background_color":{"type":["string","null"],"description":"The sign-in page's background, `#rrggbb`, or null for the default","example":"#ffffff"},"support_email":{"type":["string","null"],"description":"Where its users can ask for help, shown on its pages and email, or null","example":"help@acme.example"},"privacy_policy_url":{"type":["string","null"],"description":"Its privacy policy, linked from its sign-in pages, or null"},"terms_of_service_url":{"type":["string","null"],"description":"Its terms of service, linked from its sign-in pages, or null"},"created_at":{"type":"string","format":"date-time","description":"When the brand was made"}},"required":["id","org_id","issuer_slug","issuer","custom_domain_issuer","name","is_default","sign_up_enabled","sign_in_cancels_deletion","breached_password_check","show_last_used","link_conflicts","merge_empty_accounts","move_proved_identities","link_reauth_window","existing_account_prompt","wallet_name_usernames","logo_url","icon_url","primary_color","background_color","support_email","privacy_policy_url","terms_of_service_url","created_at"]},"BrandCreated":{"type":"object","properties":{"id":{"type":"string","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"org_id":{"type":"string","description":"The org the brand belongs to","example":"org_01h455vb4pex5vsknk084sn02q"},"issuer_slug":{"type":"string","description":"The first label of its issuer's host. It never changes","example":"acme"},"issuer":{"type":"string","description":"The brand's issuer: its OpenID Connect issuer identifier, where its apps sign people in","example":"https://acme.auth.synq.build"},"custom_domain_issuer":{"type":["string","null"],"description":"The brand's second issuer, on its custom domain (`/v1/orgs/{org}/brands/{brand}/custom-domain`), while that answers; null otherwise. The same users, apps and keys as `issuer`, with its own `iss`.","example":"https://login.acme.com"},"name":{"type":"string","description":"The brand's name, which its sign-in pages and email show","example":"Acme"},"is_default":{"type":"boolean","description":"Whether it is the org's default brand, made with the org"},"sign_up_enabled":{"type":"boolean","description":"Whether someone new may sign up by signing in. On by default."},"sign_in_cancels_deletion":{"type":"boolean","description":"Whether a user who asked to be deleted cancels it by signing in again within the 30 days. Off by default: the sign-in is refused."},"breached_password_check":{"type":"boolean","description":"Whether a new password that appears in a known data breach is refused. On by default. The check asks Have I Been Pwned's range API about the first five characters of the password's SHA-1 only, so the password never leaves Synq. The audit log names this setting `breach_check`."},"show_last_used":{"type":"boolean","description":"Whether the sign-in page marks the way a browser last signed in at this brand, \"Last used\". On by default. It is remembered in a cookie on that device (only the method, and a wallet's name), never per account, so it reveals nothing about who has an account. Anyone using the same browser sees it, so turn it off for a brand used on shared devices."},"link_conflicts":{"type":"string","x-extensible-enum":["move","refuse"],"description":"What happens when someone adds a way to sign in (an account at a provider, or a wallet) that another user of this brand signs in with, where `move_proved_identities` (on by default) or `merge_empty_accounts` doesn't settle it. `refuse` (the default, for every brand until you change it): they can only sign in to that account instead. `move`, which you opt in to: once they confirm it's them on their own account (a code emailed to an address it proved, or a signature with one of its wallets), it moves there when the other account keeps another way in; when it is that account's only way in, they can sign in to that account instead, or merge that account into theirs, after a page that shows what comes over (its ways in, its name and username where theirs has none, its Discord and Telegram standing), which then deletes it as the user's own deletion does (`user.deleted` after 30 days). Users are never merged across brands."},"merge_empty_accounts":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with merges that user into the one adding it, at once, when that user is empty: the way being added is its only one, and it has nothing else (no email address, password, passkey, metadata, API key, Discord or Telegram standing, or org). On by default; turn it off to have `link_conflicts` decide for empty users too. The person's proof of that way in (the wallet's signature, the provider's sign-in) proves that user is theirs, so no emailed code is asked; the way in joins their account, and that user is deleted at once, recorded as `user.merged` (`metadata.from` and `metadata.into`, its `sub` and theirs) and then `user.deleted` for its `sub`, so your server can move what it keeps under the old `sub`. A user with anything more is never merged by this: `link_conflicts` decides, as when this is off. Users are never merged across brands."},"move_proved_identities":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with moves it to the person adding it, on the proof they just made of it (the wallet's signature, the provider's sign-in), when that user keeps another way to sign in. On by default. Whoever just proved it could sign in to that user with it anyway, so moving it gives nothing new away, and no emailed code is asked: the hosted page offers \"Move this wallet to this account\", and the account API's `POST /me/v1/wallets` answers a `move_ticket` for `POST /me/v1/wallet-moves`. Only that way in moves: the other user keeps everything else, its sessions signed in with it end, it is emailed at its verified address, and both users' Discord roles and Telegram groups are checked again at once. Both users record it (`user.identity_unlinked` and `user.identity_linked`, `by: moved`, `on_own_proof: true`). A user whose only way in it is never loses it this way: `merge_empty_accounts` merges an empty one, and `link_conflicts` decides the rest. Turn it off to have `link_conflicts` decide every move. Never across brands."},"link_reauth_window":{"type":"integer","minimum":0,"maximum":86400,"description":"How recent a sign-in on the same device, in seconds, lets someone add a way to sign in (an account at a provider, a wallet, an email address) without confirming it's them first: the brand's hosted pages go straight to the way being added when the browser's session at the brand is that person's, signed in on that device within this long, whichever way they signed in (Discord, X and Telegram, which don't say when the person signed in there, count too), and the account API's `POST /me/v1/wallets` takes a token from such a sign-in. 7200 (2 hours, as GitHub's sudo mode) by default, at most 86400 (a day); 0 always asks. Outside it, the person confirms in one tap with the way they signed in, and a provider that vouches for the account's own verified email address (Google, Apple, Microsoft) confirms it by itself, with no emailed code. A request's own shorter `max_age` or step-up still wants a sign-in made now. Every way in added emails the person's verified address, and its audit row says how it was confirmed (`confirmed_by`) and whether it came from a new device or address (`new_device`, `new_ip`). Removing a way in, and every other change that wants a fresh sign-in, still wants one from the last 5 minutes.","example":7200},"existing_account_prompt":{"type":"boolean","description":"Whether someone who signs in with a provider account this brand hasn't seen, whose email address one of its users proved, is asked to sign in to that user to add it (\"You already have an account with this email\"), instead of getting a second user. On by default. It applies where the address doesn't join that user by itself (a provider that doesn't vouch for it, or `link_by_email` off). The page never says how that user signs in, but it does tell anyone who can set that address at a provider that the brand has a user with it: turn it off where that matters more."},"wallet_name_usernames":{"type":"boolean","description":"Whether a person's wallets' on-chain names (a Seeker ID such as `ana.skr`, or a `.sol` name) are offered first when they pick a username, never set for them"},"logo_url":{"type":["string","null"],"description":"The brand's logo on Synq's media host, or null"},"icon_url":{"type":["string","null"],"description":"The brand's icon on Synq's media host, or null: a square, circle-safe mark beside the logo's wordmark (upload one with purpose `brand_icon`), which its bots' Discord embeds and its pages' tab and home-screen icon show. Without one, they show the logo only where it is square, never a wide wordmark cut down to fit"},"primary_color":{"type":["string","null"],"description":"The sign-in page's buttons and links, `#rrggbb`, or null for the default","example":"#4f46e5"},"background_color":{"type":["string","null"],"description":"The sign-in page's background, `#rrggbb`, or null for the default","example":"#ffffff"},"support_email":{"type":["string","null"],"description":"Where its users can ask for help, shown on its pages and email, or null","example":"help@acme.example"},"privacy_policy_url":{"type":["string","null"],"description":"Its privacy policy, linked from its sign-in pages, or null"},"terms_of_service_url":{"type":["string","null"],"description":"Its terms of service, linked from its sign-in pages, or null"},"created_at":{"type":"string","format":"date-time","description":"When the brand was made"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/BrandWarning"},"description":"What needs doing now that the brand is made, though Synq made it: empty when nothing does"}},"required":["id","org_id","issuer_slug","issuer","custom_domain_issuer","name","is_default","sign_up_enabled","sign_in_cancels_deletion","breached_password_check","show_last_used","link_conflicts","merge_empty_accounts","move_proved_identities","link_reauth_window","existing_account_prompt","wallet_name_usernames","logo_url","icon_url","primary_color","background_color","support_email","privacy_policy_url","terms_of_service_url","created_at","warnings"]},"BrandWarning":{"type":"object","properties":{"code":{"type":"string","description":"What it is about, for code to read. `org_provider_apps_need_redirect_uri`: the org’s own apps at sign-in providers sign the new brand in too, and each must register the brand’s own callback, on its issuer’s host, before they can (the org’s list of its apps, `GET …/sign-in-providers`, names every redirect URI each registers)","example":"org_provider_apps_need_redirect_uri"},"message":{"type":"string","description":"The same, for a person to read"}},"required":["code","message"]},"BrandCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The brand's name, which its sign-in pages and email show","example":"Acme"},"sign_up_enabled":{"type":"boolean","description":"Whether someone new may sign up by signing in. On by default."},"sign_in_cancels_deletion":{"type":"boolean","description":"Whether a user who asked to be deleted cancels it by signing in again within the 30 days. Off by default: the sign-in is refused."},"breached_password_check":{"type":"boolean","description":"Whether a new password that appears in a known data breach is refused. On by default. The check asks Have I Been Pwned's range API about the first five characters of the password's SHA-1 only, so the password never leaves Synq. The audit log names this setting `breach_check`."},"show_last_used":{"type":"boolean","description":"Whether the sign-in page marks the way a browser last signed in at this brand, \"Last used\". On by default. It is remembered in a cookie on that device (only the method, and a wallet's name), never per account, so it reveals nothing about who has an account. Anyone using the same browser sees it, so turn it off for a brand used on shared devices."},"link_conflicts":{"type":"string","enum":["move","refuse"],"description":"What happens when someone adds a way to sign in (an account at a provider, or a wallet) that another user of this brand signs in with, where `move_proved_identities` (on by default) or `merge_empty_accounts` doesn't settle it. `refuse` (the default, for every brand until you change it): they can only sign in to that account instead. `move`, which you opt in to: once they confirm it's them on their own account (a code emailed to an address it proved, or a signature with one of its wallets), it moves there when the other account keeps another way in; when it is that account's only way in, they can sign in to that account instead, or merge that account into theirs, after a page that shows what comes over (its ways in, its name and username where theirs has none, its Discord and Telegram standing), which then deletes it as the user's own deletion does (`user.deleted` after 30 days). Users are never merged across brands."},"merge_empty_accounts":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with merges that user into the one adding it, at once, when that user is empty: the way being added is its only one, and it has nothing else (no email address, password, passkey, metadata, API key, Discord or Telegram standing, or org). On by default; turn it off to have `link_conflicts` decide for empty users too. The person's proof of that way in (the wallet's signature, the provider's sign-in) proves that user is theirs, so no emailed code is asked; the way in joins their account, and that user is deleted at once, recorded as `user.merged` (`metadata.from` and `metadata.into`, its `sub` and theirs) and then `user.deleted` for its `sub`, so your server can move what it keeps under the old `sub`. A user with anything more is never merged by this: `link_conflicts` decides, as when this is off. Users are never merged across brands."},"move_proved_identities":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with moves it to the person adding it, on the proof they just made of it (the wallet's signature, the provider's sign-in), when that user keeps another way to sign in. On by default. Whoever just proved it could sign in to that user with it anyway, so moving it gives nothing new away, and no emailed code is asked: the hosted page offers \"Move this wallet to this account\", and the account API's `POST /me/v1/wallets` answers a `move_ticket` for `POST /me/v1/wallet-moves`. Only that way in moves: the other user keeps everything else, its sessions signed in with it end, it is emailed at its verified address, and both users' Discord roles and Telegram groups are checked again at once. Both users record it (`user.identity_unlinked` and `user.identity_linked`, `by: moved`, `on_own_proof: true`). A user whose only way in it is never loses it this way: `merge_empty_accounts` merges an empty one, and `link_conflicts` decides the rest. Turn it off to have `link_conflicts` decide every move. Never across brands."},"link_reauth_window":{"type":"integer","minimum":0,"maximum":86400,"description":"How recent a sign-in on the same device, in seconds, lets someone add a way to sign in (an account at a provider, a wallet, an email address) without confirming it's them first: the brand's hosted pages go straight to the way being added when the browser's session at the brand is that person's, signed in on that device within this long, whichever way they signed in (Discord, X and Telegram, which don't say when the person signed in there, count too), and the account API's `POST /me/v1/wallets` takes a token from such a sign-in. 7200 (2 hours, as GitHub's sudo mode) by default, at most 86400 (a day); 0 always asks. Outside it, the person confirms in one tap with the way they signed in, and a provider that vouches for the account's own verified email address (Google, Apple, Microsoft) confirms it by itself, with no emailed code. A request's own shorter `max_age` or step-up still wants a sign-in made now. Every way in added emails the person's verified address, and its audit row says how it was confirmed (`confirmed_by`) and whether it came from a new device or address (`new_device`, `new_ip`). Removing a way in, and every other change that wants a fresh sign-in, still wants one from the last 5 minutes.","example":7200},"existing_account_prompt":{"type":"boolean","description":"Whether someone who signs in with a provider account this brand hasn't seen, whose email address one of its users proved, is asked to sign in to that user to add it (\"You already have an account with this email\"), instead of getting a second user. On by default. It applies where the address doesn't join that user by itself (a provider that doesn't vouch for it, or `link_by_email` off). The page never says how that user signs in, but it does tell anyone who can set that address at a provider that the brand has a user with it: turn it off where that matters more."},"wallet_name_usernames":{"type":"boolean","description":"Whether a person's wallets' on-chain names (a Seeker ID such as `ana.skr`, or a `.sol` name) are offered first when they pick a username (`GET /me/v1/username-suggestions`): only names that fit the username rules and nobody at the brand has, and never set for them. On by default"},"primary_color":{"type":["string","null"],"example":"#4f46e5","description":"The sign-in page's buttons and links, `#rrggbb`, or null for the default"},"background_color":{"type":["string","null"],"example":"#4f46e5","description":"The sign-in page's background, `#rrggbb`, or null for the default"},"support_email":{"type":["string","null"],"maxLength":254,"format":"email","description":"Where its users can ask for help, shown on its pages and email"},"privacy_policy_url":{"type":["string","null"],"maxLength":2048,"format":"uri","example":"https://acme.example/privacy","description":"Its privacy policy, linked from its sign-in pages"},"terms_of_service_url":{"type":["string","null"],"maxLength":2048,"format":"uri","example":"https://acme.example/privacy","description":"Its terms of service, linked from its sign-in pages"},"issuer_slug":{"type":"string","minLength":3,"maxLength":63,"description":"Its issuer is `https://<issuer_slug>.auth.synq.build`, for good: it never changes, and is never used again after the brand is gone. Well-known service names and their hyphen-prefixed variants require verified ownership approved by Synq staff.","example":"acme-games"}},"required":["name","issuer_slug"],"additionalProperties":false},"BrandUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The brand's name, which its sign-in pages and email show","example":"Acme"},"sign_up_enabled":{"type":"boolean","description":"Whether someone new may sign up by signing in. On by default."},"sign_in_cancels_deletion":{"type":"boolean","description":"Whether a user who asked to be deleted cancels it by signing in again within the 30 days. Off by default: the sign-in is refused."},"breached_password_check":{"type":"boolean","description":"Whether a new password that appears in a known data breach is refused. On by default. The check asks Have I Been Pwned's range API about the first five characters of the password's SHA-1 only, so the password never leaves Synq. The audit log names this setting `breach_check`."},"show_last_used":{"type":"boolean","description":"Whether the sign-in page marks the way a browser last signed in at this brand, \"Last used\". On by default. It is remembered in a cookie on that device (only the method, and a wallet's name), never per account, so it reveals nothing about who has an account. Anyone using the same browser sees it, so turn it off for a brand used on shared devices."},"link_conflicts":{"type":"string","enum":["move","refuse"],"description":"What happens when someone adds a way to sign in (an account at a provider, or a wallet) that another user of this brand signs in with, where `move_proved_identities` (on by default) or `merge_empty_accounts` doesn't settle it. `refuse` (the default, for every brand until you change it): they can only sign in to that account instead. `move`, which you opt in to: once they confirm it's them on their own account (a code emailed to an address it proved, or a signature with one of its wallets), it moves there when the other account keeps another way in; when it is that account's only way in, they can sign in to that account instead, or merge that account into theirs, after a page that shows what comes over (its ways in, its name and username where theirs has none, its Discord and Telegram standing), which then deletes it as the user's own deletion does (`user.deleted` after 30 days). Users are never merged across brands."},"merge_empty_accounts":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with merges that user into the one adding it, at once, when that user is empty: the way being added is its only one, and it has nothing else (no email address, password, passkey, metadata, API key, Discord or Telegram standing, or org). On by default; turn it off to have `link_conflicts` decide for empty users too. The person's proof of that way in (the wallet's signature, the provider's sign-in) proves that user is theirs, so no emailed code is asked; the way in joins their account, and that user is deleted at once, recorded as `user.merged` (`metadata.from` and `metadata.into`, its `sub` and theirs) and then `user.deleted` for its `sub`, so your server can move what it keeps under the old `sub`. A user with anything more is never merged by this: `link_conflicts` decides, as when this is off. Users are never merged across brands."},"move_proved_identities":{"type":"boolean","description":"Whether adding a way to sign in (a wallet, or an account at a provider) that another user of this brand signs in with moves it to the person adding it, on the proof they just made of it (the wallet's signature, the provider's sign-in), when that user keeps another way to sign in. On by default. Whoever just proved it could sign in to that user with it anyway, so moving it gives nothing new away, and no emailed code is asked: the hosted page offers \"Move this wallet to this account\", and the account API's `POST /me/v1/wallets` answers a `move_ticket` for `POST /me/v1/wallet-moves`. Only that way in moves: the other user keeps everything else, its sessions signed in with it end, it is emailed at its verified address, and both users' Discord roles and Telegram groups are checked again at once. Both users record it (`user.identity_unlinked` and `user.identity_linked`, `by: moved`, `on_own_proof: true`). A user whose only way in it is never loses it this way: `merge_empty_accounts` merges an empty one, and `link_conflicts` decides the rest. Turn it off to have `link_conflicts` decide every move. Never across brands."},"link_reauth_window":{"type":"integer","minimum":0,"maximum":86400,"description":"How recent a sign-in on the same device, in seconds, lets someone add a way to sign in (an account at a provider, a wallet, an email address) without confirming it's them first: the brand's hosted pages go straight to the way being added when the browser's session at the brand is that person's, signed in on that device within this long, whichever way they signed in (Discord, X and Telegram, which don't say when the person signed in there, count too), and the account API's `POST /me/v1/wallets` takes a token from such a sign-in. 7200 (2 hours, as GitHub's sudo mode) by default, at most 86400 (a day); 0 always asks. Outside it, the person confirms in one tap with the way they signed in, and a provider that vouches for the account's own verified email address (Google, Apple, Microsoft) confirms it by itself, with no emailed code. A request's own shorter `max_age` or step-up still wants a sign-in made now. Every way in added emails the person's verified address, and its audit row says how it was confirmed (`confirmed_by`) and whether it came from a new device or address (`new_device`, `new_ip`). Removing a way in, and every other change that wants a fresh sign-in, still wants one from the last 5 minutes.","example":7200},"existing_account_prompt":{"type":"boolean","description":"Whether someone who signs in with a provider account this brand hasn't seen, whose email address one of its users proved, is asked to sign in to that user to add it (\"You already have an account with this email\"), instead of getting a second user. On by default. It applies where the address doesn't join that user by itself (a provider that doesn't vouch for it, or `link_by_email` off). The page never says how that user signs in, but it does tell anyone who can set that address at a provider that the brand has a user with it: turn it off where that matters more."},"wallet_name_usernames":{"type":"boolean","description":"Whether a person's wallets' on-chain names (a Seeker ID such as `ana.skr`, or a `.sol` name) are offered first when they pick a username (`GET /me/v1/username-suggestions`): only names that fit the username rules and nobody at the brand has, and never set for them. On by default"},"primary_color":{"type":["string","null"],"example":"#4f46e5","description":"The sign-in page's buttons and links, `#rrggbb`, or null for the default"},"background_color":{"type":["string","null"],"example":"#4f46e5","description":"The sign-in page's background, `#rrggbb`, or null for the default"},"support_email":{"type":["string","null"],"maxLength":254,"format":"email","description":"Where its users can ask for help, shown on its pages and email, or null for none"},"privacy_policy_url":{"type":["string","null"],"maxLength":2048,"format":"uri","example":"https://acme.example/privacy","description":"Its privacy policy, linked from its sign-in pages, or null for none"},"terms_of_service_url":{"type":["string","null"],"maxLength":2048,"format":"uri","example":"https://acme.example/privacy","description":"Its terms of service, linked from its sign-in pages, or null for none"},"issuer_slug":{"type":"string","description":"Never changes: sending it is refused with `issuer_slug_immutable`."}},"additionalProperties":false},"BrandTransferOwnPreview":{"allOf":[{"$ref":"#/components/schemas/BrandTransferPreview"},{"type":"object","properties":{"to_org":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The org, `org_…`"},"name":{"type":"string","description":"Its name"}},"required":["id","name"],"description":"The org `to_org` named, when its side is in this answer: you own it too, so you can move the brand now. Null without `to_org`, or for an org you don't own"},"preview_hash":{"type":["string","null"],"description":"The SHA-256 of the target's side of this preview, which `move_now` names on `POST …/transfers`, as accepting names a request's: the brand moves only if what moves and what changes is still what this showed. Null when `to_org` is null"}},"required":["to_org","preview_hash"]}],"description":"What moving the brand carries and changes, from its own org's side, and, for an org you own too, from the target's"},"BrandTransferBlocker":{"type":"object","properties":{"reason":{"type":"string","x-extensible-enum":["transfer_pending","org_unclaimed","brand_is_default","brand_is_last","own_bot_shared","own_bot_conflict","protected_name_unverified","brand_quota","token_gate_quota"],"description":"What it is, for code to read: `transfer_pending`, `org_unclaimed`, `brand_is_default`, `brand_is_last`, `own_bot_shared`, `own_bot_conflict`, `protected_name_unverified`, `brand_quota` or `token_gate_quota`"},"detail":{"type":"string","description":"What blocks it, why, and how to clear it, in plain words"}},"required":["reason","detail"]},"BrandTransferPreview":{"type":"object","properties":{"users":{"type":"integer","description":"The brand's users: they move with it, signed in"},"monthly_active_users":{"type":"integer","description":"The brand's users active this month, who count toward the new org from the move"},"apps":{"type":"array","items":{"type":"object","properties":{"client_id":{"type":"string","description":"Its client_id, which stays the same"},"name":{"type":"string","description":"Its name"}},"required":["client_id","name"]},"description":"The first 100 of its apps, with the same client ids, secrets and redirect URIs after the move"},"apps_total":{"type":"integer","description":"How many apps it has in all"},"issuer":{"type":"string","description":"Its issuer, which stays the same"},"custom_domains":{"type":"array","items":{"type":"string"},"description":"Its custom sign-in domains, which move with it"},"sending_domain":{"type":["string","null"],"description":"The sending domain its email is set to come from, which moves with it as all its sending domains do; null: none"},"sending_domains":{"type":"array","items":{"type":"string"},"description":"Every sending domain of the brand's, which all move with it","example":["mail.acme.com"]},"discord_servers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The server, `dsv_…`"},"name":{"type":"string","description":"Its name, as Discord last said"}},"required":["id","name"]},"description":"Its Discord servers, which move with it"},"telegram_groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The group, `tgg_…`"},"title":{"type":"string","description":"Its title, as Telegram last said"}},"required":["id","title"]},"description":"Its Telegram groups, which move with it"},"own_bots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The bot, `bot_…`"},"platform":{"type":"string","x-extensible-enum":["discord","telegram"],"description":"`discord` or `telegram`"},"name":{"type":"string","description":"What members see it called"}},"required":["id","platform","name"]},"description":"The org's own bots serving its communities, which move with it"},"sign_in_providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","x-extensible-enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"description":"The upstream provider the brand offers"},"app_now":{"type":"string","x-extensible-enum":["brand","org","synq","none"],"description":"Whose app it signs in through now: `brand` (its own, which moves with it), `org` (its org's own), `synq` (Synq's) or `none`"},"app_after":{"type":["string","null"],"x-extensible-enum":["brand","org","synq","none"],"description":"Whose app it signs in through after the move: `org` is the new org's own; `none` turns it off. Null on the brand's own org's side, which doesn't see the target's apps"}},"required":["provider","app_now","app_after"]},"description":"The upstream providers it offers, and whose app each uses"},"stays_as_set":{"type":"object","properties":{"terms_of_service_url":{"type":["string","null"],"description":"Its terms link, as set"},"privacy_policy_url":{"type":["string","null"],"description":"Its privacy link, as set"}},"required":["terms_of_service_url","privacy_policy_url"],"description":"What stays as the brand set it: the new org can change these after the move"},"blockers":{"type":"array","items":{"$ref":"#/components/schemas/BrandTransferBlocker"},"description":"What keeps it from moving now, each with how to clear it; empty when nothing does"},"roles_ending":{"type":["object","null"],"properties":{"members":{"type":"integer","description":"How many of the brand's org's members hold a role in the brand itself (not All brands'): it ends at the move, and moving the brand back doesn't bring it back"},"invitations":{"type":"integer","description":"How many of its pending invitations give a role in the brand itself: that role ends at the move, and the invitation gives only the rest when accepted"}},"required":["members","invitations"],"description":"The brand's own org's side alone (null on the target's, which sees nothing of the other org): the roles in the brand that end at the move. The new org's members reach it through their roles on All brands"},"plan_changes":{"type":["array","null"],"items":{"type":"object","properties":{"feature":{"type":"string","description":"The plan feature the brand uses that the new org's plan lacks"},"effect":{"type":"string","description":"What that does after the move, in plain words"}},"required":["feature","effect"]},"description":"The target's side alone (null on the other): what turns off on its plan"},"apps_over_quota":{"type":["object","null"],"properties":{"apps":{"type":"integer","description":"The target's apps after the move that count toward its plan: all but one development app (every redirect URI on localhost, 127.0.0.1 or [::1]) between them"},"limit":{"type":"integer","description":"How many its plan allows"}},"required":["apps","limit"],"description":"The target's side alone: when its apps would be over its plan's quota after the move, which is allowed, as after a downgrade, but it can't make more; null otherwise"}},"required":["users","monthly_active_users","apps","apps_total","issuer","custom_domains","sending_domain","sending_domains","discord_servers","telegram_groups","own_bots","sign_in_providers","stays_as_set","blockers","roles_ending","plan_changes","apps_over_quota"],"description":"What moves with a brand to another org, and what changes, as one side sees it"},"BrandTransfer":{"type":"object","properties":{"id":{"type":"string","description":"The request, `btr_…`"},"brand":{"type":"object","properties":{"id":{"type":"string","description":"The brand, `brd_…`, the same in either org"},"name":{"type":"string","description":"Its name"}},"required":["id","name"],"description":"The brand that moves"},"from_org":{"type":"object","properties":{"id":{"type":"string","description":"The org, `org_…`"},"name":{"type":"string","description":"Its name"}},"required":["id","name"],"description":"The org it leaves"},"to_org":{"type":"object","properties":{"id":{"type":"string","description":"The org, `org_…`"},"name":{"type":"string","description":"Its name"}},"required":["id","name"],"description":"The org it goes to"},"direction":{"type":"string","x-extensible-enum":["outgoing","incoming"],"description":"`outgoing` from the org in the path, the brand's own; `incoming` to it"},"status":{"type":"string","x-extensible-enum":["pending","accepted","declined","cancelled","expired"],"description":"`pending` (waiting for the target), `accepted` (moved), `declined`, `cancelled` or `expired` (7 days passed)"},"requested_by":{"type":"string","description":"Who asked: their `usr_…`, or `staff`"},"requested_at":{"type":"string","format":"date-time","description":"When it was asked"},"expires_at":{"type":"string","format":"date-time","description":"When it expires unless decided"},"decided_at":{"type":["string","null"],"format":"date-time","description":"When it was declined, cancelled or accepted; null while it waits"},"cancelled_by":{"type":["string","null"],"x-extensible-enum":["from","to","staff"],"description":"Who cancelled it: `from` (the brand's org), `to` (the target) or `staff` (Synq's, with a reason both orgs' audit logs show); null otherwise"},"new_default_brand_id":{"type":["string","null"],"description":"The brand of the old org that becomes its default at the move, when this one is its default; null otherwise, and always on the target's side"},"close_from_org":{"type":["boolean","null"],"description":"Whether the old org closes with the move, as its owner chose for its last brand: deleted as `DELETE /v1/orgs/{org}` deletes it; null on the target's side"},"data_responsibility_statement":{"type":"string","description":"The line both owners confirm: the new org becomes responsible for its users' data"},"preview":{"anyOf":[{"$ref":"#/components/schemas/BrandTransferPreview"},{"type":"null"}],"description":"What moves and what changes, as this org sees it now, while it waits; null once it ended"},"preview_hash":{"type":["string","null"],"description":"The SHA-256 of the target's preview, which accepting names, so it covers exactly what the target was shown (all of it but the user counts, which grow with every sign-in); null on the brand's own org's side and once it ended"},"reason":{"type":["string","null"],"description":"Why it ended, when Synq ended it: Synq's staff's reason for cancelling it or moving the brand, or the move of another brand that ended it (one it named as the org's new default); null otherwise"},"from_org_empty":{"type":["boolean","null"],"description":"On the brand's own org's side, once accepted: whether the move took the org's last brand and closed the org, as its owner chose (`close_from_org`): deleted as `DELETE /v1/orgs/{org}` deletes it, and purged 30 days later. Null on the target's side, and until it is accepted"},"notice":{"type":["object","null"],"properties":{"requested_at":{"type":"string","format":"date-time","description":"When the owner asked Synq to send it"},"sent_at":{"type":["string","null"],"format":"date-time","description":"When the last of it went; null while it is still going out"},"recipients":{"type":["integer","null"],"description":"How many of the brand’s users it reached; null while it is still going out"}},"required":["requested_at","sent_at","recipients"],"description":"The target's side, once accepted: the email its owner had Synq send the brand's users that it moved (`POST …/notice`); null until asked, and on the brand's old org's side"}},"required":["id","brand","from_org","to_org","direction","status","requested_by","requested_at","expires_at","decided_at","cancelled_by","new_default_brand_id","close_from_org","data_responsibility_statement","preview","preview_hash","reason","from_org_empty","notice"],"description":"A request to move a brand to another org"},"BrandTransferCreate":{"type":"object","properties":{"to_org":{"type":"string","description":"The org the brand goes to, `org_…`: its owner gives you the id"},"confirm_data_responsibility":{"type":"boolean","enum":[true],"description":"`true`: you confirm the line `data_responsibility_statement` says, that the target becomes responsible for the brand's users' data and will tell them as its privacy terms require"},"new_default_brand":{"type":"string","description":"When the brand is the org's default and not its last: the org's brand that becomes its default at the move, `brd_…`"},"close_from_org":{"type":"boolean","description":"When the brand is the org's last: `true` closes the org with the move, as deleting it does (`DELETE /v1/orgs/{org}`: its API keys, webhooks and members go, and it's purged after 30 days), since an org always has a brand. Nothing closes until the target's owner accepts, and nothing closes an org without this choice"},"move_now":{"type":"boolean","description":"`true` when you own the target org too: the request is made and accepted at once, as you, and the brand moves now, with `preview_hash`. You confirm the data-responsibility line for both orgs. Only the owner of both, as a person, may; anyone else gets 403 `forbidden`, and the target's owner accepts the request as usual"},"preview_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"With `move_now`: the `preview_hash` of `GET …/transfer-preview?to_org=…`, with the same `new_default_brand` and `close_from_org`. If what moves or changes isn't what it showed any more, nothing moves (`transfer_preview_changed`, 409) and no request is left","example":"9f2c6a8e1b7d4c3a5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5"}},"required":["to_org","confirm_data_responsibility"],"additionalProperties":false},"BrandTransferPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BrandTransfer"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"BrandTransferAccept":{"type":"object","properties":{"confirm_data_responsibility":{"type":"boolean","enum":[true],"description":"`true`: you confirm the line `data_responsibility_statement` says, that your org becomes responsible for the brand's users' data and will tell them as its privacy terms require"},"preview_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The request's `preview_hash`, as you read it with its preview: the move happens only if what moves and what changes is still what you were shown","example":"9f2c6a8e1b7d4c3a5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5"}},"required":["confirm_data_responsibility","preview_hash"],"additionalProperties":false},"BrandTheme":{"type":"object","properties":{"font":{"type":["string","null"],"x-extensible-enum":["system","humanist","geometric","rounded","serif","mono","source-sans"],"description":"The font, or null for the default. More are added over time.","example":"humanist"},"surface_color":{"type":["string","null"],"description":"The card's color. Its text, edges and errors follow from it so they stay readable. Unset: made from the background color. Needs a plan with the advanced theme (`branding.advanced_theme`).","example":"#ffffff"},"glow_color":{"type":["string","null"],"description":"Soft pools of light in this color behind the card, with a faint one in the primary color, drawn by the page itself (no image). Unset: none. Needs a plan with the advanced theme (`branding.advanced_theme`).","example":"#3c1253"},"button_style":{"type":["string","null"],"description":"Buttons' corners, which fields follow. Unset: `pill`. Needs a plan with the advanced theme (`branding.advanced_theme`).","x-extensible-enum":["pill","rounded","square"]},"card_radius":{"type":["integer","null"],"description":"The card's corner radius in pixels. Unset: 16. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"card_shadow":{"type":["string","null"],"description":"The card's shadow. Unset: `none`. Needs a plan with the advanced theme (`branding.advanced_theme`).","x-extensible-enum":["none","soft","strong"]},"heading":{"type":["string","null"],"description":"The sign-in page's heading, in place of \"Sign in to <brand>\". Text only. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"heading_font":{"type":["string","null"],"x-extensible-enum":["system","humanist","geometric","rounded","serif","mono","source-sans","rubik","bricolage-grotesque","archivo","fraunces"],"description":"The headings' font, or null for the pages' own. More are added over time. Needs a plan with the advanced theme (`branding.advanced_theme`).","example":"rubik"},"heading_case":{"type":["string","null"],"description":"`upper` sets the headings in capitals, `lower` in small letters. Unset: as written. Needs a plan with the advanced theme (`branding.advanced_theme`).","x-extensible-enum":["upper","lower"]},"muted_color":{"type":["string","null"],"description":"Secondary text's color where it reads at 4.5:1, or null for one made from the colors. Needs a plan with the advanced theme (`branding.advanced_theme`).","example":"#b8a5c9"},"background_image_url":{"type":["string","null"],"description":"On Synq’s media host: upload a `theme_background` file to set it (`POST …/files`)."},"background_blur":{"type":["integer","null"],"description":"How much the background image is blurred, in pixels. Unset: 0. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"powered_by":{"type":"boolean","description":"Whether the pages say \"Powered by Synq\" at their foot: the brand's choice (`powered_by_choice`), or the plan's default (`powered_by_default`) where it made none. False holds only on a plan with `branding.remove_powered_by`; on any other the pages show the line, and `not_shown` names `powered_by`."},"powered_by_choice":{"type":["boolean","null"],"description":"The brand's own choice, as `powered_by` sets it: true keeps \"Powered by Synq\", false hides it, null follows the plan. Unchosen, it follows the plan: hidden on a plan with `branding.remove_powered_by` (Scale and Enterprise), shown on every other. A plan without that feature always shows the line, whatever the brand chose.","example":null},"powered_by_default":{"type":"boolean","description":"Whether the pages say \"Powered by Synq\" on the org's plan while the brand hasn't chosen: false on a plan with `branding.remove_powered_by` (Scale and Enterprise), true on every other."},"default_avatar_style":{"type":"string","description":"How the hosted pages draw Synq's own default avatar for someone with no picture, where the brand shows no `default_avatars` of its own (it has none, or its plan doesn't include them): `aura` (the default), a soft gradient, or `monogram`, the person's initials on a darker one. Match it to what your apps draw (`@synqauth/react`'s `fallback`). On any plan.","x-extensible-enum":["aura","monogram"]},"default_avatars":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","description":"The image's file: remove it with `DELETE …/theme/default-avatars/{file}`","example":"fil_01h455vb4pex5vsknk084sn02q"},"url":{"type":"string","description":"Where it is read, on Synq's media host"}},"required":["file_id","url"]},"description":"The brand's own default avatars, at most 24, on a plan with `branding.default_avatars` (Pro and up): for someone who chose no picture, its hosted pages show the one their avatar seed picks, and their tokens and profile name it (`default_picture`). Upload one as a `default_avatar` file (`POST …/files`), which needs that plan. Each person keeps theirs as the set changes: adding one to a set of n gives it to about one person in n + 1, and removing one moves only the people who had it. Empty, the pages draw Synq's own, in `default_avatar_style`. On a plan without it the set is kept, `not_shown` names `default_avatars`, and the pages draw Synq's own until the plan has it."},"not_shown":{"type":"array","items":{"type":"string"},"description":"Settings the brand has that its pages don't show, because the org's plan doesn't include them (after moving to a smaller plan, say). They show again on a plan that does.","example":[]}},"required":["font","surface_color","glow_color","button_style","card_radius","card_shadow","heading","heading_font","heading_case","muted_color","background_image_url","background_blur","powered_by","powered_by_choice","powered_by_default","default_avatar_style","default_avatars","not_shown"]},"BrandThemeUpdate":{"type":"object","properties":{"font":{"type":["string","null"],"enum":["system","humanist","geometric","rounded","serif","mono","source-sans",null],"description":"The pages' font. `source-sans` is Source Sans Pro (SIL Open Font License), which Synq serves from the brand's own issuer host; the rest are stacks of fonts devices already have, so the page downloads none. Unset: `system`. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"surface_color":{"type":["string","null"],"example":"#ffffff","description":"The card's color. Its text, edges and errors follow from it so they stay readable. Unset: made from the background color. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"glow_color":{"type":["string","null"],"example":"#ffffff","description":"Soft pools of light in this color behind the card, with a faint one in the primary color, drawn by the page itself (no image). Unset: none. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"button_style":{"type":["string","null"],"enum":["pill","rounded","square",null],"description":"Buttons' corners, which fields follow. Unset: `pill`. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"card_radius":{"type":["integer","null"],"minimum":0,"maximum":32,"description":"The card's corner radius in pixels. Unset: 16. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"card_shadow":{"type":["string","null"],"enum":["none","soft","strong",null],"description":"The card's shadow. Unset: `none`. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"heading":{"type":["string","null"],"minLength":1,"maxLength":80,"description":"The sign-in page's heading, in place of \"Sign in to <brand>\". Text only. Needs a plan with the advanced theme (`branding.advanced_theme`).","example":"Welcome back"},"heading_font":{"type":["string","null"],"enum":["system","humanist","geometric","rounded","serif","mono","source-sans","rubik","bricolage-grotesque","archivo","fraunces",null],"description":"The headings' font, and the brand's name where it has no logo: any of `font`'s, or a display face Synq serves from the brand's issuer host under the SIL Open Font License (`rubik`, `bricolage-grotesque`, `archivo`, `fraunces`). Unset: the pages' font. Needs a plan with the advanced theme (`branding.advanced_theme`).","example":"rubik"},"heading_case":{"type":["string","null"],"enum":["upper","lower",null],"description":"`upper` sets the headings in capitals, `lower` in small letters. Unset: as written. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"muted_color":{"type":["string","null"],"example":"#ffffff","description":"Secondary text's color, on the card and on the page behind it, wherever it reads at 4.5:1 there. Elsewhere, and unset, the pages make it from the text and background colors, in the background's hue. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"background_blur":{"type":["integer","null"],"minimum":0,"maximum":24,"description":"How much the background image is blurred, in pixels. Unset: 0. Needs a plan with the advanced theme (`branding.advanced_theme`)."},"default_avatar_style":{"type":["string","null"],"enum":["aura","monogram",null],"description":"How the hosted pages draw Synq's own default avatar for someone with no picture, where the brand shows no `default_avatars` of its own (it has none, or its plan doesn't include them): `aura` (the default), a soft gradient, or `monogram`, the person's initials on a darker one. Match it to what your apps draw (`@synqauth/react`'s `fallback`). On any plan."},"powered_by":{"type":["boolean","null"],"description":"\"Powered by Synq\" at the foot of the pages: true keeps it, on any plan; false hides it, which needs a plan that allows it (`branding.remove_powered_by`); null goes back to the plan's default. Unchosen, it follows the plan: hidden on a plan with `branding.remove_powered_by` (Scale and Enterprise), shown on every other. A plan without that feature always shows the line, whatever the brand chose."}},"additionalProperties":false},"BrandThemePreview":{"type":"object","properties":{"look":{"$ref":"#/components/schemas/HostedPageLook"},"needs":{"type":"array","items":{"type":"string","x-extensible-enum":["auth.byo_connections","auth.custom_providers","integration.webhooks","branding.advanced_theme","branding.remove_powered_by","branding.default_avatars","auth.token_gating","branding.custom_email_domain","branding.custom_domain","integration.own_bots","team.brand_roles","team.sso","integration.audit_log_streams"]},"description":"The plan features the theme needs that the org's plan lacks: saving it is refused until it has them.","example":[]}},"required":["look","needs"],"description":"The brand's pages' look in the theme, as values (the sign-in page draws in it, `…/sign-in-page/preview`), and what saving it needs"},"HostedPageLook":{"type":"object","properties":{"brand":{"$ref":"#/components/schemas/HostedPageBrand"},"primary_color":{"type":["string","null"],"description":"The brand's primary `#rrggbb`, or null for Synq's"},"background_color":{"type":["string","null"],"description":"The brand's background `#rrggbb`, or null for Synq's"},"theme":{"$ref":"#/components/schemas/HostedPageTheme"},"logo":{"anyOf":[{"$ref":"#/components/schemas/HostedPageLogo"},{"type":"null"}],"description":"The brand's logo, with its size where known, so a page holds its box before it loads; null where the pages show the brand's name"},"phone_background_url":{"type":["string","null"],"description":"The background image’s phone-sized copy, which a phone’s screen shows in its place, while the theme’s image is the file it was made from"},"icon":{"type":["string","null"],"description":"The pages' tab and home-screen icon, where the brand has its own: its icon, or its logo when that is square"},"powered_by":{"type":"boolean","description":"Whether the foot says \"Powered by Synq\": as the brand chose where its plan lets it, and never on Synq’s own brands"}},"required":["brand","primary_color","background_color","theme","logo","phone_background_url","icon","powered_by"],"description":"How the brand's hosted pages look, as values: its links, colors, theme, logo and icon, exactly as the pages visitors get are drawn in"},"HostedPageBrand":{"type":"object","properties":{"name":{"type":"string","description":"The brand's name: its wordmark where it has no logo"},"support_email":{"type":["string","null"],"description":"The brand's support address: the foot's Help, as a `mailto:` link"},"privacy_policy_url":{"type":["string","null"],"description":"The brand's privacy policy, an https URL: the foot's Privacy"},"terms_of_service_url":{"type":["string","null"],"description":"The brand's terms, an https URL: the foot's Terms"},"unclaimed":{"type":"boolean","description":"A claimable org nobody claimed yet (`npx synqauth init`): every page says above it that it is a development sign-in"}},"required":["name","support_email","privacy_policy_url","terms_of_service_url","unclaimed"],"description":"What the pages show of the brand"},"HostedPageTheme":{"type":"object","properties":{"font":{"type":["string","null"],"x-extensible-enum":["system","humanist","geometric","rounded","serif","mono","source-sans"],"description":"The pages’ font, or null for the default. More are added over time"},"heading_font":{"type":["string","null"],"x-extensible-enum":["system","humanist","geometric","rounded","serif","mono","source-sans","rubik","bricolage-grotesque","archivo","fraunces"],"description":"The headings’ font, or null for the pages’ own. More are added over time"},"heading_case":{"type":["string","null"],"x-extensible-enum":["upper","lower"],"description":"Headings in capitals or in small letters, or null for as written"},"surface_color":{"type":["string","null"],"description":"The card's `#rrggbb`, or null for one made from the background"},"muted_color":{"type":["string","null"],"description":"Secondary text's `#rrggbb` where it reads at 4.5:1, or null for one made from the colors"},"glow_color":{"type":["string","null"],"description":"The glow behind the card, `#rrggbb`, or null for none"},"button_style":{"type":["string","null"],"x-extensible-enum":["pill","rounded","square"],"description":"Buttons' corners, which fields follow, or null for `pill`"},"card_radius":{"type":["integer","null"],"description":"The card's corner radius in pixels, or null for 16"},"card_shadow":{"type":["string","null"],"x-extensible-enum":["none","soft","strong"],"description":"The card's shadow, or null for none"},"background_image_url":{"type":["string","null"],"description":"The background image, on Synq’s media host, or null for none"},"background_blur":{"type":["integer","null"],"description":"The background image's blur in pixels, or null for none"}},"required":["font","heading_font","heading_case","surface_color","muted_color","glow_color","button_style","card_radius","card_shadow","background_image_url","background_blur"],"description":"The theme as the org’s plan lets the pages show it: settings, never CSS. A client works the page’s colors out of these and `primary_color` and `background_color` as @synq/sign-in-ui’s look does"},"HostedPageLogo":{"type":"object","properties":{"url":{"type":"string","description":"The logo, on Synq’s media host"},"width":{"type":["number","null"],"description":"Its width in pixels, where known"},"height":{"type":["number","null"],"description":"Its height in pixels, where known"}},"required":["url","width","height"]},"MemberProfile":{"type":"object","properties":{"brand_id":{"type":"string","description":"The brand","example":"brd_01h455vb4pex5vsknk084sn02q"},"urls":{"type":"array","items":{"type":"string"},"description":"Where it is: `/me` on the brand’s issuer host, then on its custom domain while that serves. Bots link to the custom domain where there is one","example":["https://acme.auth.synq.build/me"]},"sections":{"$ref":"#/components/schemas/MemberProfileSections"},"copy":{"$ref":"#/components/schemas/MemberProfileCopy"},"copy_defaults":{"$ref":"#/components/schemas/MemberProfileCopyDefaults"},"communities":{"type":"array","items":{"$ref":"#/components/schemas/MemberProfileCommunity"},"description":"The brand’s connected servers and groups, Discord’s first, each in the order connected, with whether the profile lists it"}},"required":["brand_id","urls","sections","copy","copy_defaults","communities"],"description":"A brand's member profile, as it shows"},"MemberProfileSections":{"type":"object","properties":{"wallets":{"type":"boolean","description":"Wallets: people add as many as they like, see what each counts toward, remove one"},"communities":{"type":"boolean","description":"Communities: every listed server and group, with where the person stands in each"},"linked_accounts":{"type":"boolean","description":"Linked accounts: the brand's ways to sign in, and Discord and Telegram where it has a server or group, to link and unlink"}},"required":["wallets","communities","linked_accounts"],"description":"Which sections the member profile shows. The finish button and Gates always show: they are how people finish"},"MemberProfileCopy":{"type":"object","properties":{"sign_in_line":{"type":["string","null"],"description":"The line above the brand’s sign-in when a link brings someone, `{goal}` (what the link is for: “get Holder in the Mollyverse Discord”) and `{brand}` filled in; null: Synq’s","example":"To {goal}, sign in to your {brand} account."},"finish_button":{"type":["string","null"],"description":"The finish button’s heading, `{platform}` (Discord or Telegram) and `{brand}` filled in; null: Synq’s","example":"Finish verification with {platform}"}},"required":["sign_in_line","finish_button"]},"MemberProfileCopyDefaults":{"type":"object","properties":{"sign_in_line":{"type":"string","description":"Synq’s line above the sign-in","example":"To {goal}, sign in to your {brand} account."},"finish_button":{"type":"string","description":"Synq’s finish button heading","example":"Finish verification with {platform}"}},"required":["sign_in_line","finish_button"],"description":"What Synq says where the brand set nothing"},"MemberProfileCommunity":{"type":"object","properties":{"id":{"type":"string","description":"The server (`dsv_…`) or group (`tgg_…`)","example":"dsv_01h455vb4pex5vsknk084sn02q"},"type":{"type":"string","x-extensible-enum":["discord_server","telegram_group"],"description":"A Discord server or a Telegram group"},"name":{"type":"string","description":"Its name, as the platform last said","example":"Mollyverse"},"public":{"type":"boolean","description":"Whether it has a public way in: a Discord invite link the brand gave; a Telegram username, or join requests because a gate lets people in"},"gated":{"type":"boolean","description":"Whether a token gate gives a role there or lets people in"},"listed":{"type":"boolean","description":"Whether the brand's member profile lists it under Communities, with where each member stands and the way in: never without a public way in (an invite link, a public username or join requests)"},"listed_by":{"type":"string","x-extensible-enum":["brand","default"],"description":"`brand`: the brand chose; `default`: listed once it has a public way in. Either way, one with no way in is never listed"}},"required":["id","type","name","public","gated","listed","listed_by"]},"MemberProfilePreview":{"type":"object","properties":{"look":{"$ref":"#/components/schemas/HostedPageLook"},"view":{"$ref":"#/components/schemas/MemberProfilePreviewView"}},"required":["look","view"],"description":"The member profile for a made-up member, as values: the brand’s look and the view, which @synq/member-ui draws exactly as members get it"},"MemberProfilePreviewView":{"type":"object","properties":{"brand_name":{"type":"string","description":"The brand's name"},"members_called":{"type":"object","properties":{"plural":{"type":"string","description":"`members`, or the brand’s word"},"singular":{"type":"string","description":"`member`, or the brand’s word"}},"required":["plural","singular"],"description":"What the brand calls its members"},"person":{"type":"object","properties":{"name":{"type":"string","description":"Their name"},"initials":{"type":"string","description":"Up to two letters, for an avatar without a picture"},"signed_in_with":{"type":["string","null"],"description":"The way they signed in, as a method id (`google`, `wallet`, `email`)"},"avatar":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewImageAvatar"},{"$ref":"#/components/schemas/MemberProfilePreviewDrawnAvatar"},{"type":"null"}],"description":"Their avatar: their picture, or Synq’s default drawn from their seed; null for their initials"}},"required":["name","initials","signed_in_with","avatar"],"description":"Who the profile is"},"purpose":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewPurpose"},{"type":"null"}],"description":"The finish button, when a link brought the member: what it is for, and where it stands; null without a link"},"gates":{"type":"array","items":{"$ref":"#/components/schemas/MemberProfilePreviewGate"},"description":"Every gate behind a listed community; Gates always shows"},"wallets":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MemberProfilePreviewWallet"},"description":"Wallets, or null where the brand hides the section"},"communities":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MemberProfilePreviewCommunity"},"description":"Communities, or null where the brand hides the section"},"links":{"type":["array","null"],"items":{"$ref":"#/components/schemas/MemberProfilePreviewLink"},"description":"Linked accounts, or null where the brand hides the section"},"wallet_count":{"type":"integer","description":"How many wallets are on their account"}},"required":["brand_name","members_called","person","purpose","gates","wallets","communities","links","wallet_count"],"description":"The member profile as apps/sign-in draws it (its `member.profile` view), for a made-up member: draw it with @synq/member-ui in `look`. A member's own forms' token, notices and sheets aren't in a preview"},"MemberProfilePreviewImageAvatar":{"type":"object","properties":{"kind":{"type":"string","enum":["image"],"description":"Their picture"},"url":{"type":"string","description":"On Synq’s media host"}},"required":["kind","url"]},"MemberProfilePreviewDrawnAvatar":{"type":"object","properties":{"kind":{"type":"string","enum":["drawn"],"description":"Synq's own default, drawn from their seed"},"from":{"type":"string","description":"The gradient's first color, `#rrggbb`"},"to":{"type":"string","description":"The gradient's last color, `#rrggbb`"},"angle":{"type":"number","description":"The gradient's angle, in degrees"},"highlight":{"type":"object","properties":{"x":{"type":"number","description":"Across, on a 64 × 64 box"},"y":{"type":"number","description":"Down, on a 64 × 64 box"}},"required":["x","y"],"description":"The highlight's center"},"text":{"type":["string","null"],"description":"A monogram's initials, at most two letters"}},"required":["kind","from","to","angle","highlight","text"]},"MemberProfilePreviewPurpose":{"type":"object","properties":{"platform":{"type":"string","x-extensible-enum":["discord","telegram"],"description":"Discord or Telegram"},"place":{"type":"string","description":"The server's name, or the group's title"},"labels":{"type":"array","items":{"type":"string"},"description":"What it gives: role names, or the group’s title"},"external_name":{"type":["string","null"],"description":"The platform's account the link was made for"},"other_account":{"type":["string","null"],"description":"Their account on that platform, when it’s another one"},"linked":{"type":"boolean","description":"Whether the account the link was made for is on their account"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/MemberProfilePreviewCondition"},"description":"The conditions of the gate the card leads with"},"heading":{"type":"string","description":"The card's heading: the brand's finish button copy, filled in, or Synq's"},"state":{"type":"string","x-extensible-enum":["done","lost","regaining","rejoin","unmet","connect","ready","ended","unavailable","banned"],"description":"Where the finish button stands"},"missing":{"type":"array","items":{"$ref":"#/components/schemas/MemberProfilePreviewCondition"},"description":"The gates' conditions not met yet, the first first"},"alternatives":{"type":"boolean","description":"Whether more than one way would get it"},"until":{"type":["string","null"],"description":"Met for a while only: when it lapses, in the gate’s words"},"window":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewWindow"},{"type":"null"}],"description":"Telegram: the group's announced window, while it runs; null without one"},"given":{"type":"array","items":{"type":"string"},"description":"Done: what was given"},"pending":{"type":"boolean","description":"Done: whether the bot is still at it"},"now":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewRole"},{"type":"null"}],"description":"Finished before: where they stand now"},"back_url":{"type":["string","null"],"description":"The server's own page in Discord, or a public group's link"}},"required":["platform","place","labels","external_name","other_account","linked","conditions","heading","state","missing","alternatives","until","window","given","pending","now","back_url"],"description":"The finish button, when a link brought the member: what it is for, and where it stands"},"MemberProfilePreviewCondition":{"type":"object","properties":{"text":{"type":"string","description":"What it asks, in the gate’s words: `At least 1,000,000 RODAI`"},"status":{"type":"string","x-extensible-enum":["met","not_met","unknown"],"description":"Where it stands: `unknown` where it couldn’t be read"},"skipped":{"type":"boolean","description":"Not needed: the gate passes on another of its conditions already"},"ratio":{"type":["number","null"],"description":"How far along, 0 to 1, where it counts something"},"have":{"type":["object","null"],"properties":{"held":{"type":"string","description":"What they have, a decimal"},"need":{"type":"string","description":"What it asks, a decimal"},"symbol":{"type":["string","null"],"description":"The token's symbol, where the gate names one"}},"required":["held","need","symbol"],"description":"What they have against what it asks"},"shortfall":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewTokenShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewNftsShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewTransactionsShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewNftShortfall"},{"type":"null"}],"description":"What's missing, while it isn't met and something countable is"},"period":{"type":["string","null"],"description":"An activity window, in the gate’s words"},"until":{"type":["string","null"],"description":"While met for a while: when it lapses, in the gate’s words"}},"required":["text","status","skipped","ratio","have","shortfall","period","until"],"description":"One condition of a gate, with where the member stands"},"MemberProfilePreviewTokenShortfall":{"type":"object","properties":{"kind":{"type":"string","enum":["token"],"description":"Tokens"},"amount":{"type":"string","description":"How many more, a decimal","example":"580000"},"symbol":{"type":["string","null"],"description":"The token's symbol or name, where the gate names one"}},"required":["kind","amount","symbol"]},"MemberProfilePreviewNftsShortfall":{"type":"object","properties":{"kind":{"type":"string","enum":["nfts"],"description":"NFTs of a collection"},"count":{"type":"integer","description":"How many more"},"collection":{"type":["string","null"],"description":"The collection's name, where the gate names one"}},"required":["kind","count","collection"]},"MemberProfilePreviewTransactionsShortfall":{"type":"object","properties":{"kind":{"type":"string","enum":["transactions"],"description":"Transactions in an activity window"},"count":{"type":"integer","description":"How many more"},"period":{"type":"string","description":"The window, in the gate’s words: `in the last 30 days`"}},"required":["kind","count","period"]},"MemberProfilePreviewNftShortfall":{"type":"object","properties":{"kind":{"type":"string","enum":["nft"],"description":"One NFT"},"name":{"type":"string","description":"The name the rule gives it"}},"required":["kind","name"]},"MemberProfilePreviewWindow":{"type":"object","properties":{"ends_at":{"type":"string","format":"date-time","description":"The deadline"},"time_zone":{"type":"string","description":"The group's time zone, whose clock the page says it on first"},"verified":{"type":"boolean","description":"Whether the member verified for the group: they stay after it"},"left":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewDaysLeft"},{"$ref":"#/components/schemas/MemberProfilePreviewHoursLeft"},{"$ref":"#/components/schemas/MemberProfilePreviewLastDay"}],"description":"What's left of the window as the page was drawn"}},"required":["ends_at","time_zone","verified","left"],"description":"Telegram: the group's announced window, while it runs"},"MemberProfilePreviewDaysLeft":{"type":"object","properties":{"kind":{"type":"string","enum":["days"],"description":"Days left"},"days":{"type":"integer","description":"How many"}},"required":["kind","days"]},"MemberProfilePreviewHoursLeft":{"type":"object","properties":{"kind":{"type":"string","enum":["hours"],"description":"Hours left"},"hours":{"type":"integer","description":"How many"}},"required":["kind","hours"]},"MemberProfilePreviewLastDay":{"type":"object","properties":{"kind":{"type":"string","enum":["last_day"],"description":"The last day"}},"required":["kind"]},"MemberProfilePreviewRole":{"type":"object","properties":{"label":{"type":"string","description":"The role's name, or the group's title"},"state":{"type":"string","x-extensible-enum":["yours","grace","lost","muted","removed","regaining","rejoin","requested","qualifies","not_yet","unknown"],"description":"Where they stand with it"},"note":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewNeedsNote"},{"$ref":"#/components/schemas/MemberProfilePreviewStillYoursNote"},{"$ref":"#/components/schemas/MemberProfilePreviewLapsesNote"},{"type":"null"}],"description":"What the role's line adds beside its state"},"at":{"type":["string","null"],"description":"When it was lost, or when grace ends (ISO 8601)"},"lost_reason":{"type":["string","null"],"x-extensible-enum":["stopped_qualifying","not_verified"],"description":"Why it was lost"},"back":{"type":"boolean","description":"Given back on this view, by the check it started"},"qualifies_again":{"type":"boolean","description":"They meet the gate again; the next run moves them"},"admin_muted":{"type":"boolean","description":"Telegram: an admin of the group muted them"}},"required":["label","state","note","at","lost_reason","back","qualifies_again","admin_muted"],"description":"Where they stand with a role or a group"},"MemberProfilePreviewNeedsNote":{"type":"object","properties":{"kind":{"type":"string","enum":["needs"],"description":"What's missing"},"shortfall":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewTokenShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewNftsShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewTransactionsShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewNftShortfall"}],"description":"What's missing"}},"required":["kind","shortfall"]},"MemberProfilePreviewStillYoursNote":{"type":"object","properties":{"kind":{"type":"string","enum":["still_yours"],"description":"Theirs still, though their wallets don't meet it now"},"shortfall":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewTokenShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewNftsShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewTransactionsShortfall"},{"$ref":"#/components/schemas/MemberProfilePreviewNftShortfall"},{"type":"null"}],"description":"What's missing, while it isn't met and something countable is"}},"required":["kind","shortfall"]},"MemberProfilePreviewLapsesNote":{"type":"object","properties":{"kind":{"type":"string","enum":["lapses"],"description":"Met on activity for a while"},"until":{"type":"string","description":"When it lapses, in the gate’s words"}},"required":["kind","until"]},"MemberProfilePreviewGate":{"type":"object","properties":{"id":{"type":"string","description":"The token gate (`tkg_…`)"},"name":{"type":"string","description":"The gate's name"},"status":{"type":"string","x-extensible-enum":["met","not_met","unknown"],"description":"Where the gate stands"},"where":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","x-extensible-enum":["discord","telegram"],"description":"Discord or Telegram"},"label":{"type":"string","description":"A Discord role's name, a Telegram group's title"}},"required":["platform","label"]},"description":"Where it applies"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/MemberProfilePreviewCondition"},"description":"Its conditions, in its order"},"mode":{"type":"string","x-extensible-enum":["all","any"],"description":"Every condition must hold, or one is enough"},"glow":{"type":"boolean","description":"It started passing since the page last showed it: it glows, once"}},"required":["id","name","status","where","conditions","mode","glow"],"description":"A gate one of the listed communities is behind"},"MemberProfilePreviewWallet":{"type":"object","properties":{"id":{"type":"string","description":"The identity (`idn_…`)"},"address":{"type":"string","description":"The wallet's address"},"app":{"type":["string","null"],"description":"The wallet app it signed with"}},"required":["id","address","app"]},"MemberProfilePreviewCommunity":{"type":"object","properties":{"id":{"type":"string","description":"The server (`dsv_…`) or group (`tgg_…`)"},"platform":{"type":"string","x-extensible-enum":["discord","telegram"],"description":"Discord or Telegram"},"name":{"type":"string","description":"Its name, as the platform last said"},"members":{"type":["integer","null"],"description":"A Telegram group's people, as last read"},"join_url":{"type":["string","null"],"description":"Where to go: a Discord invite, a Telegram join link"},"gated":{"type":"boolean","description":"Whether a token gate gives a role there or lets people in"},"purpose":{"type":"boolean","description":"The community the member’s link is for"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/MemberProfilePreviewRole"},"description":"Discord: each gated role. Telegram: the group itself, once"},"in_group":{"type":["string","null"],"x-extensible-enum":["member","muted","requested","none"],"description":"Telegram: where they are in the group, as far as Synq knows"},"window":{"anyOf":[{"$ref":"#/components/schemas/MemberProfilePreviewWindow"},{"type":"null"}],"description":"Telegram: the group's announced window, while it runs; null without one"},"updates_url":{"type":["string","null"],"description":"Telegram: the bot's private chat, where the bot can't write to them yet"}},"required":["id","platform","name","members","join_url","gated","purpose","roles","in_group","window","updates_url"],"description":"One of the listed servers and groups"},"MemberProfilePreviewLink":{"type":"object","properties":{"method":{"type":"string","description":"The way in: `google`, `email`, `discord`, a brand’s own provider’s id"},"icon":{"type":["string","null"],"description":"Its provider's mark, as a `data:` image: the preview is shown off the issuer"},"value":{"type":["string","null"],"description":"The linked account as the member knows it"},"identity_id":{"type":["string","null"],"description":"The identity (`idn_…`) once linked"},"signed_in_with":{"type":"boolean","description":"How they signed in this time"},"community":{"type":"boolean","description":"Whether it's there for a community rather than as a way in"}},"required":["method","icon","value","identity_id","signed_in_with","community"]},"MemberProfilePreviewInput":{"type":"object","properties":{"sections":{"type":"object","properties":{"wallets":{"type":"boolean","description":"Show Wallets"},"communities":{"type":"boolean","description":"Show Communities"},"linked_accounts":{"type":"boolean","description":"Show Linked accounts"}},"additionalProperties":false,"description":"The sections to show or hide; those left out stay as they are"},"copy":{"type":"object","properties":{"sign_in_line":{"type":["string","null"],"description":"The line above the sign-in, at most 160 characters, with `{goal}` and `{brand}`; null: Synq’s","example":"To {goal}, sign in to your {brand} account."},"finish_button":{"type":["string","null"],"description":"The finish button’s heading, at most 60 characters, with `{platform}` and `{brand}`; null: Synq’s","example":"Finish verification with {platform}"}},"additionalProperties":false,"description":"The copy to change; null puts Synq’s back"},"communities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The server (`dsv_…`) or group (`tgg_…`)"},"listed":{"type":"boolean","description":"Whether to list it, as the form has it now"}},"required":["id","listed"],"additionalProperties":false},"maxItems":50,"description":"Listing changes not saved yet; the rest as saved"},"from":{"type":"string","enum":["discord","telegram"],"description":"Where the made-up member comes from: a Verify button, or a join request"}},"additionalProperties":false},"MemberProfileUpdate":{"type":"object","properties":{"sections":{"type":"object","properties":{"wallets":{"type":"boolean","description":"Show Wallets"},"communities":{"type":"boolean","description":"Show Communities"},"linked_accounts":{"type":"boolean","description":"Show Linked accounts"}},"additionalProperties":false,"description":"The sections to show or hide; those left out stay as they are"},"copy":{"type":"object","properties":{"sign_in_line":{"type":["string","null"],"description":"The line above the sign-in, at most 160 characters, with `{goal}` and `{brand}`; null: Synq’s","example":"To {goal}, sign in to your {brand} account."},"finish_button":{"type":["string","null"],"description":"The finish button’s heading, at most 60 characters, with `{platform}` and `{brand}`; null: Synq’s","example":"Finish verification with {platform}"}},"additionalProperties":false,"description":"The copy to change; null puts Synq’s back"}},"additionalProperties":false},"CommunityMessagePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CommunityMessage"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"CommunityMessage":{"type":"object","properties":{"platform":{"type":"string","x-extensible-enum":["telegram","discord"],"description":"Whose bot sends it: `telegram` or `discord`"},"message":{"type":"string","description":"The message, by its name on its platform: `messages.<platform>.<message>` sets it","example":"announcement"},"label":{"type":"string","description":"Its name, as the dashboard shows it"},"description":{"type":"string","description":"When it goes, and what Synq adds around it"},"section":{"type":"string","x-extensible-enum":["window","members","verify"],"description":"What it is about: `window`, a Telegram group's announced window; `members`, someone's place in a group or a role; `verify`, verifying"},"sent":{"type":"string","x-extensible-enum":["group","direct","reply"],"description":"How it goes: `group`, in the group or the server’s channel; `direct`, to one person; `reply`, the answer to a press only they see"},"text":{"type":["string","null"],"description":"The brand’s words; null: Synq’s"},"default":{"type":"string","description":"Synq’s wording, as a template with the same fill-ins: what a reset puts back. Where Synq’s own words change with the case (the month, muted or removed), this is the usual one"},"fill_ins":{"type":"array","items":{"$ref":"#/components/schemas/CommunityMessageFillIn"},"description":"The fill-ins it takes"},"required":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"Each list names fill-ins one of which the text must use: a message about the deadline names it","example":[["deadline"]]},"max_length":{"type":"integer","description":"The most characters the text may have"},"limit":{"type":"integer","description":"The platform’s longest message, which the text with its longest fill-ins must stay within: Telegram’s 4,096, Discord’s 2,000 (4,096 in an embed)"},"buttons":{"type":"array","items":{"type":"string"},"description":"The buttons Synq attaches under it, whatever the text says, as they read: the Verify button as the brand’s plan names it","example":["Verify with Synq","Open my profile"]},"embed":{"type":"boolean","description":"Discord: whether it is an embed in the brand’s look, else a plain message"}},"required":["platform","message","label","description","section","sent","text","default","fill_ins","required","max_length","limit","buttons","embed"]},"CommunityMessageFillIn":{"type":"object","properties":{"name":{"type":"string","description":"Its name, written `{name}` in the text; `{Name}`, with a capital, starts its value with one","example":"group"},"description":{"type":"string","description":"What it says"},"example":{"type":"string","description":"What it would say now, for a preview: the brand’s own names where it has them","example":"Acme Holders"},"optional":{"type":"boolean","description":"Whether it can be missing at times: a message using it then goes in Synq’s words that time"}},"required":["name","description","example","optional"]},"CommunityMessageFrame":{"type":"object","properties":{"brand_id":{"type":"string","description":"The brand","example":"brd_01h455vb4pex5vsknk084sn02q"},"look":{"$ref":"#/components/schemas/CommunityMessageLook"},"verify_button":{"$ref":"#/components/schemas/CommunityVerifyButton"},"members_called":{"$ref":"#/components/schemas/CommunityMembersCalled"}},"required":["brand_id","look","verify_button","members_called"],"description":"What Synq keeps around a brand’s words, whatever they say: its look and the Verify button"},"CommunityMessageLook":{"type":"object","properties":{"name":{"type":"string","description":"The brand’s name, which leads each message"},"logo_url":{"type":["string","null"],"description":"Its logo, where Discord can fetch it for an embed; null: none"},"icon_url":{"type":["string","null"],"description":"What the embed’s small author circle shows: the brand’s icon, square and circle-safe, else its logo where that logo is square, where Discord can fetch it; null otherwise, and the embed shows the name alone"},"accent_color":{"type":["string","null"],"description":"Its primary color, `#rrggbb`, a Discord embed’s; null: Synq’s mint","example":"#7c3aed"},"powered_by":{"type":"boolean","description":"Whether its messages end “Powered by Synq”, as its pages do"}},"required":["name","logo_url","icon_url","accent_color","powered_by"],"description":"How Synq draws the brand around the words"},"CommunityVerifyButton":{"type":"object","properties":{"text":{"type":["string","null"],"description":"The brand’s text for the Verify button, `{brand}` filled in as it goes; null: Synq’s","example":"Verify with {brand}"},"shown":{"type":"string","description":"What the button says now: the brand’s text on a plan that lets it name the button, else Synq’s","example":"Verify with Synq"},"default":{"type":"string","description":"Synq’s text","example":"Verify with Synq"},"renamable":{"type":"boolean","description":"Whether the org's plan lets it name the button (`branding.remove_powered_by`, Scale and Enterprise): on any other, every tap advertises Synq"},"max_length":{"type":"integer","description":"The most characters it may have"}},"required":["text","shown","default","renamable","max_length"]},"CommunityMembersCalled":{"type":"object","properties":{"plural":{"type":"string","description":"For `{members}` and every count but one: “612 comrods verified”","example":"comrods"},"singular":{"type":"string","description":"For `{member}` and a count of one: “1 comrod verified”","example":"comrod"},"default":{"$ref":"#/components/schemas/CommunityMembersWords"},"max_length":{"type":"integer","description":"The most characters either word may have"}},"required":["plural","singular","default","max_length"],"description":"What the brand calls its members, once for every bot message (`{members}`, `{Members}`, `{member}`), its member profile and the dashboard’s counts"},"CommunityMembersWords":{"type":"object","properties":{"plural":{"type":"string","description":"For `{members}` and every count but one: “612 comrods verified”","example":"comrods"},"singular":{"type":"string","description":"For `{member}` and a count of one: “1 comrod verified”","example":"comrod"}},"required":["plural","singular"],"description":"Synq’s words, which a brand that chose none has: members and member"},"CommunityMessagesChanged":{"type":"object","properties":{"brand_id":{"type":"string","description":"The brand","example":"brd_01h455vb4pex5vsknk084sn02q"},"verify_button":{"$ref":"#/components/schemas/CommunityVerifyButton"},"members_called":{"$ref":"#/components/schemas/CommunityMembersCalled"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/CommunityMessage"},"description":"The messages the request named"}},"required":["brand_id","verify_button","members_called","messages"]},"CommunityMessagesUpdate":{"type":"object","properties":{"verify_button":{"type":["string","null"],"description":"The Verify button's text, at most 40 characters, `{brand}` its only fill-in; null: Synq's. Naming it needs a plan with `branding.remove_powered_by` (Scale and Enterprise)","example":"Verify with {brand}"},"members_called":{"anyOf":[{"type":"object","properties":{"plural":{"type":"string","description":"What `{members}` says, and every count but one: at most 24 characters, one line","example":"comrods"},"singular":{"type":"string","description":"What `{member}` says, and a count of one: at most 24 characters, one line. Left out: the plural with one final s off (comrods, comrod), or as it is without one (staff)","example":"comrod"}},"required":["plural"],"additionalProperties":false},{"type":"null"}],"description":"What the brand calls its members, in every bot message, its member profile and the dashboard’s counts; null puts Synq’s back, members and member"},"messages":{"type":"object","properties":{"telegram":{"type":"object","properties":{"announcement":{"type":["string","null"],"description":"Announcement: at most 2000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{notice}`, `{fate}`, `{asks_for}`; null: Synq’s"},"reminder_monthly":{"type":["string","null"],"description":"Monthly reminder: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`, `{months_left}`; null: Synq’s"},"reminder_d60":{"type":["string","null"],"description":"60 days left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d45":{"type":["string","null"],"description":"45 days left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d30":{"type":["string","null"],"description":"30 days left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d21":{"type":["string","null"],"description":"21 days left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d14":{"type":["string","null"],"description":"14 days left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d7":{"type":["string","null"],"description":"7 days left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d3":{"type":["string","null"],"description":"3 days left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d1":{"type":["string","null"],"description":"Last day: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_h3":{"type":["string","null"],"description":"3 hours left: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"names":{"type":["string","null"],"description":"Names of those still to verify: at most 600 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{names}`; null: Synq’s"},"personal":{"type":["string","null"],"description":"Message to each person: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{name}`, `{time_left}`; null: Synq’s"},"extended":{"type":["string","null"],"description":"Deadline moved later: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`; null: Synq’s"},"closing":{"type":["string","null"],"description":"Closing message: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{settled}`; null: Synq’s"},"announcement_closed":{"type":["string","null"],"description":"Announcement, once closed: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`; null: Synq’s"},"announcement_cancelled":{"type":["string","null"],"description":"Announcement, once called off: at most 1000 characters, with `{brand}`, `{group}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`; null: Synq’s"},"join_requested":{"type":["string","null"],"description":"Asked to join: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{name}`, `{asks_for}`, `{members}`, `{member}`; null: Synq’s"},"approved":{"type":["string","null"],"description":"Let in: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"not_yet":{"type":["string","null"],"description":"Not yet: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{until}`, `{asks_for}`, `{members}`, `{member}`; null: Synq’s"},"declined":{"type":["string","null"],"description":"Request declined: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"grace_started":{"type":["string","null"],"description":"About to lose access: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{ends}`, `{asks_for}`, `{members}`, `{member}`; null: Synq’s"},"muted":{"type":["string","null"],"description":"Muted: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"removed":{"type":["string","null"],"description":"Removed: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"unmuted":{"type":["string","null"],"description":"Unmuted: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"qualified_again":{"type":["string","null"],"description":"Qualifies again: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"lapse_soon":{"type":["string","null"],"description":"Activity about to lapse: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{lapses}`, `{keeps}`, `{members}`, `{member}`; null: Synq’s"},"muted_not_verified":{"type":["string","null"],"description":"Muted at the deadline: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"removed_not_verified":{"type":["string","null"],"description":"Removed at the deadline: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"verify_to_join":{"type":["string","null"],"description":"Verify message in the group: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"verify_here":{"type":["string","null"],"description":"Their link, in the bot’s chat: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"verified_here":{"type":["string","null"],"description":"Verified already: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"ask_to_join_first":{"type":["string","null"],"description":"Ask to join first: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{invite_link}`, `{members}`, `{member}`; null: Synq’s"},"not_gated":{"type":["string","null"],"description":"No gate right now: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"banned_here":{"type":["string","null"],"description":"Banned by an admin: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"muted_here":{"type":["string","null"],"description":"Muted by an admin: at most 1000 characters, with `{brand}`, `{group}`, `{button}`, `{members}`, `{member}`; null: Synq’s"}},"additionalProperties":false,"description":"The Telegram messages to change"},"discord":{"type":"object","properties":{"announcement":{"type":["string","null"],"description":"Announcement: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`, `{notice}`; null: Synq’s"},"reminder_monthly":{"type":["string","null"],"description":"Monthly reminder: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`, `{months_left}`; null: Synq’s"},"reminder_d60":{"type":["string","null"],"description":"60 days left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d45":{"type":["string","null"],"description":"45 days left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d30":{"type":["string","null"],"description":"30 days left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d21":{"type":["string","null"],"description":"21 days left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d14":{"type":["string","null"],"description":"14 days left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d7":{"type":["string","null"],"description":"7 days left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d3":{"type":["string","null"],"description":"3 days left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_d1":{"type":["string","null"],"description":"Last day: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"reminder_h3":{"type":["string","null"],"description":"3 hours left: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"names":{"type":["string","null"],"description":"Names of those still to verify: at most 600 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`, `{names}`; null: Synq’s"},"extended":{"type":["string","null"],"description":"Deadline moved later: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"closing":{"type":["string","null"],"description":"Closing message: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`, `{settled}`; null: Synq’s"},"announcement_closed":{"type":["string","null"],"description":"Announcement, once closed: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"announcement_cancelled":{"type":["string","null"],"description":"Announcement, once called off: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{members}`, `{member}`, `{verified}`, `{verified_members}`, `{to_verify}`, `{total}`, `{deadline}`, `{deadline_time}`, `{days_left}`, `{button}`, `{fate}`; null: Synq’s"},"verify_message":{"type":["string","null"],"description":"Verify message: at most 2000 characters, with `{brand}`, `{server}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"link_reply":{"type":["string","null"],"description":"Their link: at most 1000 characters, with `{brand}`, `{server}`, `{button}`, `{members}`, `{member}`; null: Synq’s"},"verified":{"type":["string","null"],"description":"Verified: at most 1000 characters, with `{brand}`, `{button}`, `{roles}`, `{members}`, `{member}`; null: Synq’s"},"not_met":{"type":["string","null"],"description":"Not met yet: at most 600 characters, with `{brand}`, `{button}`, `{missing}`, `{members}`, `{member}`; null: Synq’s"},"recognized":{"type":["string","null"],"description":"Recognized at once: at most 1000 characters, with `{brand}`, `{button}`, `{roles}`, `{members}`, `{member}`; null: Synq’s"},"grace":{"type":["string","null"],"description":"About to lose a role: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{button}`, `{verify_channel}`, `{ends}`, `{members}`, `{member}`; null: Synq’s"},"removed":{"type":["string","null"],"description":"Role removed: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{button}`, `{verify_channel}`, `{members}`, `{member}`; null: Synq’s"},"not_verified":{"type":["string","null"],"description":"Role removed: didn’t verify: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{button}`, `{verify_channel}`, `{members}`, `{member}`; null: Synq’s"},"qualified_again":{"type":["string","null"],"description":"Role given back: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{button}`, `{verify_channel}`, `{members}`, `{member}`; null: Synq’s"},"lapse_soon":{"type":["string","null"],"description":"Activity about to lapse: at most 1500 characters, with `{brand}`, `{server}`, `{role}`, `{button}`, `{verify_channel}`, `{lapses}`, `{keeps}`, `{members}`, `{member}`; null: Synq’s"}},"additionalProperties":false,"description":"The Discord messages to change"}},"additionalProperties":false,"description":"The messages to change; null puts Synq’s back"}},"additionalProperties":false},"SignInPreview":{"type":"object","properties":{"url":{"type":"string","description":"Opens the brand’s hosted sign-in page, once","example":"https://acme.auth.synq.build/sign-in-preview/start/9yG3…"},"expires_at":{"type":"string","format":"date-time","description":"When the link stops working","example":"2026-10-21T12:10:00.000Z"}},"required":["url","expires_at"]},"SignInPreviewRequest":{"type":"object","properties":{"return_path":{"type":"string","maxLength":512,"description":"Where the result page links back to on Synq’s dashboard: `/` by default","example":"/orgs/org_01h455vb4pex5vsknk084sn02q"},"app_id":{"type":"string","description":"The brand's app the preview is for, by its client_id: the page names it as that app's own sign-in does (\"to continue to Acme Web\"), never Synq's preview app. Without it, the page is the brand's alone","example":"app_01h455vb4pex5vsknk084sn02q"}},"additionalProperties":false},"SignInPage":{"type":"object","properties":{"methods":{"type":"array","items":{"$ref":"#/components/schemas/SignInPageMethod"},"description":"Every way to sign in the brand can place, each once, in the brand's order: the page shows the `shown` ones in this order, then the `more` ones in this order. A provider the brand adds of its own joins the end, off"},"max_shown":{"type":"integer","description":"The most ways shown first","example":4},"email":{"$ref":"#/components/schemas/SignInPageEmail"},"returning":{"type":"string","x-extensible-enum":["last_only","badge"],"description":"What someone coming back on a device that signed in here before sees. `last_only` (the default): \"Welcome back\", only the way this device signed in with last, big, with \"Last used on this device\" under it, and every other way that's on under \"Other ways to sign in\". `badge`: the usual page, with that way first and badged \"Last used\". The device remembers it in a cookie on the brand's host, never looked up by account; a brand whose `show_last_used` is off shows every visitor the page for new people","example":"last_only"}},"required":["methods","max_shown","email","returning"]},"SignInPageMethod":{"type":"object","properties":{"method":{"type":"string","maxLength":64,"pattern":"^(?:email|passkey|wallet|google|github|microsoft|apple|facebook|x|discord|telegram|matrica|custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?)$","description":"The way to sign in: `email`, `passkey`, `wallet`, one of Synq's upstream providers (`google`, `github`, `microsoft`, `apple`, `facebook`, `x`, `discord`, `telegram`, `matrica`), or one of the brand's own providers by its `custom-…` id","example":"google"},"name":{"type":"string","description":"What people call it: Synq's name for its own ways and providers, the brand's own provider's name for one of those","example":"Google"},"kind":{"type":"string","x-extensible-enum":["built_in","provider","custom"],"description":"`built_in`: Synq's own (email, a passkey, a Solana wallet). `provider`: one of Synq's upstream providers. `custom`: one of the brand's own OpenID Connect or OAuth 2.0 providers","example":"provider"},"placement":{"type":"string","x-extensible-enum":["shown","more","off"],"description":"`shown`: on the page for everyone, in this order, at most 4. `more`: under \"More ways to sign in (N)\", one tap away and fully on. `off`: not on the page, and refused everywhere for whom `off_for` says.","example":"shown"},"off_for":{"type":["string","null"],"x-extensible-enum":["everyone","new_people"],"description":"Who it's off for, when its placement is `off`; null otherwise. `everyone`: every way into the brand refuses it (the hosted page, sign-up, every app, own-UI and headless sign-in, linking it as a way in); sessions signed in with it already stay valid. `new_people`: only people who already have it as a way in at the brand may sign in with it, it is their last-used way when it is, and it never makes an account, joins one by email or is added to one.","example":null},"available":{"type":"boolean","description":"Whether Synq can sign people in with it here now. An upstream provider needs an app: Synq's (where the stage has one for it) or the brand's or org's own (Providers, on the brand's Sign-in page in the dashboard). One that isn't available is never on the page, whatever its placement, until it is","example":true},"link_only":{"type":"boolean","description":"Whether the provider is set to link only (its `use` under Providers is `link_only`): never on the sign-in page and never a way in; placed `shown` or `more`, people may add it to their account, and placed `off`, not. It counts toward neither the 4 shown nor the one way in that must stay on","example":false},"community_links":{"type":"boolean","description":"Whether members may still link it while it's off, so a token gate gives them roles and groups in the brand's Discord servers or Telegram groups (Discord and Telegram). A link made that way is never a way to sign in while it's off","example":false},"icon_url":{"type":["string","null"],"description":"The brand's own provider's icon on its button, on Synq's media host; null for Synq's own ways and providers, whose icons are Synq's","example":null}},"required":["method","name","kind","placement","off_for","available","link_only","community_links","icon_url"]},"SignInPageEmail":{"type":"object","properties":{"password":{"type":"boolean","description":"Whether people who set a password may sign in with it after the address","example":true},"code":{"type":"boolean","description":"Whether the step after the address offers \"Email me a sign-in code\" (with its link): it works for everyone, so it is how someone new signs up by email","example":true},"lead":{"type":"string","x-extensible-enum":["password","code"],"description":"Which leads the step when both are on: `password` (a password field, then \"No password? Email me a sign-in code\") or `code` (\"Email me a sign-in code\", then \"Use my password instead\"). With one of them on, that one","example":"password"}},"required":["password","code","lead"],"description":"What follows the email address: one step, the same for every address, so the page never says who has an account. The address shows as a chip with Change, then the password or the code (the brand’s `lead` first), \"Use a passkey\" where passkeys are on, and \"Use another way to sign in\". At least one of `password` and `code` is on"},"SignInPageUpdate":{"type":"object","properties":{"methods":{"type":"array","items":{"$ref":"#/components/schemas/SignInPageMethodInput"},"maxItems":64,"description":"Every way to sign in the brand can place (as `GET …/sign-in-page` lists them), each once, in the order the page shows them, each in its place. At most 4 `shown`, and at least one way in `shown` or `more` (a provider set to link only counts toward neither). Leaving one out, naming one twice or naming one the brand has no such provider for is `validation_failed`, at its place in the list"},"place":{"type":"array","items":{"$ref":"#/components/schemas/SignInPagePlaceInput"},"minItems":1,"maxItems":64,"description":"Only the ways that move, on top of the page as it is, each once, in this order: each to its placement and, with `position`, to that place among the ways in the same placement. Every other way keeps its place. The same rules hold for the page that results: at most 4 `shown`, and at least one way in `shown` or `more`. Send `methods` or `place`, not both","example":[{"method":"discord","placement":"shown","position":1}]},"email":{"$ref":"#/components/schemas/SignInPageEmailInput"},"returning":{"type":"string","enum":["last_only","badge"],"description":"`last_only` (the default): \"Welcome back\", only the way this device signed in with last, big, with \"Last used on this device\" under it, and every other way that's on under \"Other ways to sign in\". `badge`: the usual page, with that way first and badged \"Last used\". The device remembers it in a cookie on the brand's host, never looked up by account; a brand whose `show_last_used` is off shows every visitor the page for new people","example":"last_only"}},"additionalProperties":false,"description":"Changes the parts sent and keeps the rest: `methods` replaces the whole list, `place` moves only the ways it names, `email` replaces the whole step after the address, `returning` the page for people coming back"},"SignInPageMethodInput":{"type":"object","properties":{"method":{"type":"string","maxLength":64,"pattern":"^(?:email|passkey|wallet|google|github|microsoft|apple|facebook|x|discord|telegram|matrica|custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?)$","description":"The way to sign in: `email`, `passkey`, `wallet`, one of Synq's upstream providers (`google`, `github`, `microsoft`, `apple`, `facebook`, `x`, `discord`, `telegram`, `matrica`), or one of the brand's own providers by its `custom-…` id","example":"google"},"placement":{"type":"string","enum":["shown","more","off"],"description":"`shown`: on the page for everyone, in this order, at most 4. `more`: under \"More ways to sign in (N)\", one tap away and fully on. `off`: not on the page, and refused everywhere for whom `off_for` says.","example":"shown"},"off_for":{"type":"string","enum":["everyone","new_people"],"description":"Who it's off for, with `off` alone: `everyone` unless given. `everyone`: every way into the brand refuses it (the hosted page, sign-up, every app, own-UI and headless sign-in, linking it as a way in); sessions signed in with it already stay valid. `new_people`: only people who already have it as a way in at the brand may sign in with it, it is their last-used way when it is, and it never makes an account, joins one by email or is added to one.","example":"everyone"}},"required":["method","placement"],"additionalProperties":false},"SignInPagePlaceInput":{"type":"object","properties":{"method":{"type":"string","maxLength":64,"pattern":"^(?:email|passkey|wallet|google|github|microsoft|apple|facebook|x|discord|telegram|matrica|custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?)$","description":"The way to sign in: `email`, `passkey`, `wallet`, one of Synq's upstream providers (`google`, `github`, `microsoft`, `apple`, `facebook`, `x`, `discord`, `telegram`, `matrica`), or one of the brand's own providers by its `custom-…` id","example":"google"},"placement":{"type":"string","enum":["shown","more","off"],"description":"`shown`: on the page for everyone, in this order, at most 4. `more`: under \"More ways to sign in (N)\", one tap away and fully on. `off`: not on the page, and refused everywhere for whom `off_for` says.","example":"shown"},"off_for":{"type":"string","enum":["everyone","new_people"],"description":"Who it's off for, with `off` alone: `everyone` unless given. `everyone`: every way into the brand refuses it (the hosted page, sign-up, every app, own-UI and headless sign-in, linking it as a way in); sessions signed in with it already stay valid. `new_people`: only people who already have it as a way in at the brand may sign in with it, it is their last-used way when it is, and it never makes an account, joins one by email or is added to one.","example":"everyone"},"position":{"type":"integer","minimum":0,"maximum":63,"description":"Its place among the ways in the same placement, from 0: `1` shows it second among the `shown` ones. Past their count, after the last of them. Left out, it keeps its place in the list","example":1}},"required":["method","placement"],"additionalProperties":false},"SignInPageEmailInput":{"type":"object","properties":{"password":{"type":"boolean","description":"Whether people who set a password may sign in with it after the address","example":true},"code":{"type":"boolean","description":"Whether the step after the address offers \"Email me a sign-in code\" (with its link): it works for everyone, so it is how someone new signs up by email","example":true},"lead":{"type":"string","enum":["password","code"],"description":"Which leads the step: `password` or `code`. It must be one that is on: with only `code` on, `code`","example":"password"}},"required":["password","code","lead"],"additionalProperties":false,"description":"What follows the email address. At least one of `password` and `code` is on"},"SignInPageImpact":{"type":"object","properties":{"methods":{"type":"array","items":{"$ref":"#/components/schemas/SignInPageMethodImpact"},"description":"Each way to sign in the brand can place, in the order `GET …/sign-in-page` lists them"}},"required":["methods"]},"SignInPageMethodImpact":{"type":"object","properties":{"method":{"type":"string","maxLength":64,"pattern":"^(?:email|passkey|wallet|google|github|microsoft|apple|facebook|x|discord|telegram|matrica|custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?)$","description":"The way to sign in: `email`, `passkey`, `wallet`, one of Synq's upstream providers (`google`, `github`, `microsoft`, `apple`, `facebook`, `x`, `discord`, `telegram`, `matrica`), or one of the brand's own providers by its `custom-…` id","example":"google"},"people":{"type":"integer","description":"How many of the brand’s people have it as a way in now: they signed in with it, or added it to their account. For `email`, those with an address on their account that signs them in","example":1},"no_other_way_in":{"type":"integer","description":"How many of them have no other way in that stays on for them: turned off for everyone, it locks them out. Off only for new people, they keep signing in with it","example":0}},"required":["method","people","no_other_way_in"]},"SignInPagePreview":{"type":"object","properties":{"look":{"$ref":"#/components/schemas/HostedPageLook"},"view":{"$ref":"#/components/schemas/SignInPagePreviewView"},"needs":{"type":"array","items":{"type":"string","x-extensible-enum":["auth.byo_connections","auth.custom_providers","integration.webhooks","branding.advanced_theme","branding.remove_powered_by","branding.default_avatars","auth.token_gating","branding.custom_email_domain","branding.custom_domain","integration.own_bots","team.brand_roles","team.sso","integration.audit_log_streams"]},"description":"The plan features the draft theme needs that the org's plan lacks: saving it is refused until it has them","example":[]}},"required":["look","view","needs"],"description":"The sign-in page in that state, as values: the brand’s look and the view, which @synq/sign-in-ui draws as visitors get it"},"SignInPagePreviewView":{"type":"object","properties":{"screen":{"type":"string","x-extensible-enum":["sign-in","sign-up"],"description":"Which of the two the page is: signing in, or making an account","example":"sign-in"},"step":{"type":"string","x-extensible-enum":["start","email"],"description":"The first page, or the step after the email address","example":"start"},"heading":{"type":["string","null"],"description":"The brand's own heading for the sign-in screen (its theme's), or null for Synq's"},"methods":{"type":"array","items":{"$ref":"#/components/schemas/SignInPagePreviewMethod"},"description":"Every way the page offers, in the brand's order: on, set up (`available`) and a way in (not link only)"},"email":{"anyOf":[{"$ref":"#/components/schemas/SignInPagePreviewEmail"},{"type":"null"}],"description":"The email way; null where the page has no email way"},"returning":{"type":"string","x-extensible-enum":["last_only","badge"],"description":"What someone coming back sees (the sign-up screen always badges their last way). `last_only` (the default): \"Welcome back\", only the way this device signed in with last, big, with \"Last used on this device\" under it, and every other way that's on under \"Other ways to sign in\". `badge`: the usual page, with that way first and badged \"Last used\". The device remembers it in a cookie on the brand's host, never looked up by account; a brand whose `show_last_used` is off shows every visitor the page for new people","example":"last_only"},"last_used":{"type":["string","null"],"maxLength":64,"pattern":"^(?:email|passkey|wallet|google|github|microsoft|apple|facebook|x|discord|telegram|matrica|custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?)$","description":"The way this device last signed in with, for a returning visitor where the brand shows it (`show_last_used`); null for a new one","example":null}},"required":["screen","step","heading","methods","email","returning","last_used"],"description":"The sign-in page as apps/sign-in draws it (its `signin.page` view), as the drafts settle it: draw it with @synq/sign-in-ui in `look`. What only a sign-in in progress has (where its forms post, the app, a notice) isn't in a preview"},"SignInPagePreviewMethod":{"type":"object","properties":{"method":{"type":"string","maxLength":64,"pattern":"^(?:email|passkey|wallet|google|github|microsoft|apple|facebook|x|discord|telegram|matrica|custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?)$","description":"The way to sign in: `email`, `passkey`, `wallet`, one of Synq's upstream providers (`google`, `github`, `microsoft`, `apple`, `facebook`, `x`, `discord`, `telegram`, `matrica`), or one of the brand's own providers by its `custom-…` id","example":"google"},"name":{"type":"string","description":"What people call it: Synq's name for its own ways and providers, the brand's own provider's name for one of those","example":"Google"},"kind":{"type":"string","x-extensible-enum":["built_in","provider","custom"],"description":"`built_in`, `provider` (one of Synq's upstream providers) or `custom` (the brand's own)","example":"provider"},"placement":{"type":"string","x-extensible-enum":["shown","more","off"],"description":"`shown` first, or `more`, under \"More ways to sign in\". `off` only for a returning visitor's last way that is off for new people, which the page shows them alone","example":"shown"},"off_for":{"type":["string","null"],"x-extensible-enum":["everyone","new_people"],"description":"`new_people` for that last way; null for one that is on","example":null},"icon_url":{"type":["string","null"],"description":"The brand's own provider's icon, on Synq's media host; null for Synq's own","example":null}},"required":["method","name","kind","placement","off_for","icon_url"],"description":"A way to sign in the page offers"},"SignInPagePreviewEmail":{"type":"object","properties":{"address":{"type":["string","null"],"description":"The address the email step's chip shows; null on the first page","example":"you@example.com"},"password":{"type":"boolean","description":"Whether the step takes a password"},"code":{"type":"boolean","description":"Whether the step offers \"Email me a sign-in code\""},"lead":{"type":"string","x-extensible-enum":["password","code"],"description":"Which of the two leads the step","example":"password"}},"required":["address","password","code","lead"],"description":"The email way: its field, and the step after it"},"SignInPagePreviewRequest":{"type":"object","properties":{"theme":{"$ref":"#/components/schemas/BrandThemeUpdate"},"sign_in_page":{"$ref":"#/components/schemas/SignInPageUpdate"},"view":{"$ref":"#/components/schemas/SignInPagePreviewState"}},"additionalProperties":false,"description":"What to draw: `theme`, settings on top of the brand's theme as `PATCH …/theme` takes them; `sign_in_page`, settings on top of the brand's sign-in page as `PATCH …/sign-in-page` takes them, held to the same rules; and `view`, which state of the page"},"SignInPagePreviewState":{"type":"object","properties":{"visitor":{"type":"string","enum":["new","returning"],"description":"`new` (the default): someone this device never signed in here as. `returning`: someone coming back, whose device last signed in with `last_used`","example":"returning"},"last_used":{"type":"string","maxLength":64,"pattern":"^(?:email|passkey|wallet|google|github|microsoft|apple|facebook|x|discord|telegram|matrica|custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?)$","description":"The way the device last signed in with, for a `returning` visitor: one that is on, or off only for new people (they keep it). Required with `returning`","example":"google"},"step":{"type":"string","enum":["start","email"],"description":"`start` (the default): the first page. `email`: the step after the address, as `email` typed it","example":"email"},"email":{"type":"string","maxLength":254,"description":"The address the email step shows in its chip; `you@example.com` unless given","example":"ada@example.com"},"screen":{"type":"string","enum":["sign-in","sign-up"],"description":"`sign-in` (the default) or `sign-up`: which of the two the page is","example":"sign-in"}},"additionalProperties":false,"description":"Which state of the page to draw"},"Upload":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"upload":{"type":"object","properties":{"method":{"type":"string","enum":["PUT"],"description":"The HTTP method to upload with"},"url":{"type":"string","description":"Where to PUT the bytes, signed for this one file: exactly `declared_size` bytes, with the headers below, before `expires_at`"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Send these as they are. The length is signed too: a browser or HTTP client sets it from the body","example":{"content-type":"image/png"}},"expires_at":{"type":"string","format":"date-time","description":"When the URL stops working: 5 minutes on"}},"required":["method","url","headers","expires_at"],"description":"The upload: bytes go here, never through the API"}},"required":["upload"]}]},"File":{"type":"object","properties":{"id":{"type":"string","description":"The file's id","example":"fil_01h455vb4pex5vsknk084sn02q"},"purpose":{"type":"string","x-extensible-enum":["brand_logo","brand_icon","theme_background","default_avatar","provider_icon","user_picture","user_picture_upload"],"description":"What it is for: a value of the request's `purpose`; `user_picture`, a linked account's picture Synq copies itself; or `user_picture_upload`, a picture someone uploaded of themselves through the account API","example":"brand_logo"},"status":{"type":"string","x-extensible-enum":["pending","ready","rejected","expired"],"description":"`pending`: waiting for its bytes and for finalize. `ready`: kept, at `url`. `rejected`: not what its purpose takes (`rejected_reason`), nothing kept. `expired`: never finalized in time","example":"ready"},"visibility":{"type":"string","x-extensible-enum":["public","private"],"description":"`public`: on Synq's media host for anyone, cached for ever. Every purpose of Synq's is public"},"url":{"type":["string","null"],"description":"Where it is read once ready: Synq's media host, under a name made of its content"},"content_type":{"type":["string","null"],"description":"What Synq kept, once ready: `image/webp`","example":"image/webp"},"size":{"type":["integer","null"],"description":"In bytes, of what Synq kept"},"width":{"type":["integer","null"],"description":"An image's width in pixels, or null until it is ready, or for a file that isn't one"},"height":{"type":["integer","null"],"description":"An image's height in pixels, or null until it is ready, or for a file that isn't one"},"sha256":{"type":["string","null"],"description":"Of what Synq kept, as lowercase hex"},"rejected_reason":{"type":"string","nullable":true,"x-extensible-enum":["type","size","dimensions","unreadable"],"description":"Why a `rejected` file was refused, as `file_rejected`'s `reason` said"},"declared_type":{"type":"string","description":"The type the upload was authorized for"},"declared_size":{"type":"integer","description":"The length the upload was authorized for"},"expires_at":{"type":"string","format":"date-time","description":"Until when finalize takes it: an hour after the upload was authorized"},"created_at":{"type":"string","format":"date-time","description":"When the upload was authorized, as a UTC timestamp."},"ready_at":{"type":["string","null"],"format":"date-time","description":"When the file became ready, as a UTC timestamp; null until it is ready."}},"required":["id","purpose","status","visibility","url","content_type","size","width","height","sha256","rejected_reason","declared_type","declared_size","expires_at","created_at","ready_at"]},"CreateUpload":{"type":"object","properties":{"purpose":{"type":"string","enum":["brand_logo","brand_icon","theme_background","default_avatar","provider_icon"],"description":"`brand_logo`: the brand's logo, kept as a WebP of at most 512 × 512 (at most 2 MiB and 4096 × 4096 uploaded). `brand_icon`: the brand's icon, a square, circle-safe mark for its bots' Discord embeds and its pages' tab and home-screen icon, cut to a square around what draws the eye and kept as a WebP of at most 512 × 512 (at most 2 MiB and 4096 × 4096 uploaded). `theme_background`: its hosted pages' background image, an advanced theme's, kept as a WebP of at most 2560 × 2560 (at most 5 MiB and 6144 × 6144 uploaded). `default_avatar`: one of the brand's own default avatars, shown for someone who chose no picture, kept as a WebP square of at most 256 × 256 (at most 2 MiB and 4096 × 4096 uploaded), 24 at most, on a plan with `branding.default_avatars` (Pro and up). `provider_icon`: the icon on the button of one of the brand's own sign-in providers, kept as a WebP square of 64 × 64 (at most 1 MiB and 4096 × 4096 uploaded), which the provider names by its `url`","example":"brand_logo"},"content_type":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"],"description":"What the file is: PNG, JPEG, WebP or GIF, never SVG. Synq knows it again by its first bytes","example":"image/png"},"content_length":{"type":"integer","minimum":1,"description":"The file's length in bytes, exactly: the upload takes no other","example":48213}},"required":["purpose","content_type","content_length"],"additionalProperties":false},"BrandStats":{"type":"object","properties":{"brand_id":{"type":"string","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"month":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"The month the monthly figures count, in UTC: this one","example":"2026-11"},"users":{"type":"integer","description":"Everyone with an account at the brand, disabled ones included","example":1280},"monthly_active_users":{"type":"integer","description":"Users active this month: those who got tokens in it, by signing in or an app refreshing them. The same count the org's usage adds up across its brands toward its plan","example":312},"sign_ins_last_7_days":{"type":"integer","description":"Sign-ins finished at the brand in the last 7 days (today and the 6 days before it, in UTC), through any of its apps","example":940},"sign_ins_started_last_7_days":{"type":"integer","description":"Sign-ins started at the brand over the same 7 days as `sign_ins_last_7_days`: each that reached a way to sign in, on the brand's hosted pages or an app's own screens, finished or not. A silent sign-in, which the person's session answered with no page, starts none. Finished over started is the brand's sign-in success","example":1010},"new_users_last_7_days":{"type":"integer","description":"Accounts made at the brand over the same 7 days as `sign_ins_last_7_days`: each one’s first sign-in","example":48},"apps":{"type":"array","items":{"type":"object","properties":{"app_id":{"type":"string","description":"The app's id, its client_id","example":"app_01h455vb4pex5vsknk084sn02q"},"users_signed_in":{"type":"integer","description":"Distinct users who signed in through the app this month","example":120}},"required":["app_id","users_signed_in"]},"description":"Each app someone signed in through this month, with how many people did. An app no one signed in through this month is not listed"}},"required":["brand_id","month","users","monthly_active_users","sign_ins_last_7_days","sign_ins_started_last_7_days","new_users_last_7_days","apps"]},"BrandNotice":{"type":"object","properties":{"notice":{"type":"string","x-extensible-enum":["setup_checklist","website_logo_prompt","nextjs_app"],"description":"The notice: `setup_checklist`, the brand overview’s \"Finish setting up\" checklist, `website_logo_prompt`, its \"Use your website’s logo\" prompt, or `nextjs_app`, the \"Make your Next.js app\" card after onboarding","example":"setup_checklist"},"hidden":{"type":"boolean","description":"Whether the calling person hid it for themselves","example":true},"hidden_at":{"type":["string","null"],"format":"date-time","description":"When they hid it, or null while they haven’t","example":"2026-11-09T23:30:00.000Z"}},"required":["notice","hidden","hidden_at"]},"PersonNotice":{"type":"object","properties":{"notice":{"type":"string","x-extensible-enum":["add_passkey"],"description":"The notice: `add_passkey`, the \"Add a passkey\" to-do on their account’s page","example":"add_passkey"},"hidden":{"type":"boolean","description":"Whether the calling person hid it for themselves","example":true},"hidden_at":{"type":["string","null"],"format":"date-time","description":"When they hid it, or null while they haven’t","example":"2026-11-11T08:30:00.000Z"}},"required":["notice","hidden","hidden_at"]},"BrandEmail":{"type":"object","properties":{"sender":{"$ref":"#/components/schemas/BrandEmailSender"},"reply_to":{"anyOf":[{"$ref":"#/components/schemas/BrandReplyTo"},{"type":"null"}],"description":"Where replies to the brand's email go, once confirmed; null: none"},"effective":{"$ref":"#/components/schemas/BrandEmailEffective"}},"required":["sender","reply_to","effective"]},"BrandEmailSender":{"type":"object","properties":{"email_domain_id":{"type":["string","null"],"description":"The brand's own sending domain its email comes from once verified, on a plan with `branding.custom_email_domain`; null: `<brand> via Synq`","example":"edm_01h455vb4pex5vsknk084sn02q"},"local_part":{"type":"string","description":"The part before the @ on its own domain","example":"no-reply"},"name":{"type":["string","null"],"description":"The name its email is from; null: the brand's name","example":"Acme"}},"required":["email_domain_id","local_part","name"]},"BrandReplyTo":{"type":"object","properties":{"address":{"type":"string","description":"Where replies to its email go","example":"support@acme.com"},"status":{"type":"string","x-extensible-enum":["confirmed","pending_confirmation"],"description":"`confirmed`: replies go there. `pending_confirmation`: Synq emailed the address a link to confirm it, and replies go nowhere until someone opens it.","example":"confirmed"}},"required":["address","status"]},"BrandEmailEffective":{"type":"object","properties":{"from":{"type":"object","properties":{"name":{"type":"string","description":"The name its email is sent from","example":"Acme via Synq"},"address":{"type":"string","description":"The address its email is sent from","example":"notifications@mail.synq.build"}},"required":["name","address"],"description":"Who the next email is from, exactly as it will be sent"},"reply_to":{"type":["string","null"],"description":"Where replies to it go; null: no Reply-To at all","example":"support@acme.com"},"kind":{"type":"string","x-extensible-enum":["custom","fallback"],"description":"`custom`: from the brand's own domain. `fallback`: `<brand> via Synq` at Synq's own address.","example":"fallback"},"fallback_reason":{"type":"string","nullable":true,"x-extensible-enum":["plan","no_domain","domain_pending","domain_failing"],"description":"Why it is the fallback; null when it is not","example":"no_domain"}},"required":["from","reply_to","kind","fallback_reason"]},"BrandEmailPreview":{"type":"object","properties":{"subject":{"type":"string","description":"The next sign-in email's subject, exactly as it is sent (with the stage's mark, such as `[Preview] `, where the stage adds one)","example":"Your code to sign in to Acme"},"effective":{"$ref":"#/components/schemas/BrandEmailEffective"},"html":{"type":"string","description":"The brand's next sign-in code email, the whole document its users get, with a sample code and its link going nowhere. Show it only in a sandboxed iframe, as its `srcdoc`, with neither `allow-scripts` nor `allow-same-origin`, under `content_security_policy`: never inline in the page that shows it. It has a light and a dark version, as inboxes show it (`prefers-color-scheme`)."},"content_security_policy":{"type":"string","description":"The Content-Security-Policy the preview's HTML must be shown under","example":"default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"}},"required":["subject","effective","html","content_security_policy"]},"BrandEmailUpdate":{"type":"object","properties":{"sender":{"type":"object","properties":{"email_domain_id":{"type":["string","null"],"description":"One of the brand's own sending domains (Pro and up, `GET …/brands/{brand}/email-domains`); null goes back to `<brand> via Synq` on any plan. A domain that isn't verified yet is taken: email comes from it once it is. Another brand's domain is refused."},"local_part":{"type":["string","null"],"description":"The part before the @; null: `no-reply`","example":"hello"},"name":{"type":["string","null"],"description":"The name its email is from, on every plan; null: the brand's name","example":"Acme"}},"additionalProperties":false,"description":"Who its email is from"},"reply_to":{"type":["string","null"],"description":"Where replies to the brand's email go, on every plan; null takes it away. A new address is used once someone who reads it confirms it, through a link Synq emails it, unless it is the caller's own verified address or on a sending domain the org verified, which are confirmed at once. A plain address in ASCII: no quoted part before the @, and an internationalized domain in punycode.","example":"support@acme.com"}},"additionalProperties":false},"EmailDomainPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailDomain"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"EmailDomain":{"type":"object","properties":{"id":{"type":"string","description":"The sending domain's id","example":"edm_01h455vb4pex5vsknk084sn02q"},"domain":{"type":"string","description":"In lower-case ASCII; an internationalized name in punycode","example":"mail.acme.com"},"status":{"type":"string","x-extensible-enum":["pending_setup","pending_dns","verified","failing"],"description":"`pending_setup`: Synq is still registering it, and its records will appear; nothing to do yet. `pending_dns`: publish its records; once every required one reads `found`, there is nothing left to publish while Synq’s email provider confirms them, and Synq checks it again 1, 5 and 15 minutes and an hour after first finding them all. `verified`: its brand’s email comes from it, once the brand picks it. `failing`: a record went missing, and its brand’s email comes from `<brand> via Synq` until it is back.","example":"pending_dns"},"records":{"type":"array","items":{"$ref":"#/components/schemas/EmailDomainRecord"},"description":"The records to add at the DNS host"},"problem":{"type":"string","nullable":true,"x-extensible-enum":["setup_pending","record_missing","record_mismatch","zone_appended_twice","cname_proxied","return_path_conflict","postmark_refused"],"description":"What is wrong now, or null","example":"record_missing"},"brand":{"type":"string","description":"The brand it belongs to, which alone sends from it","example":"brd_01h455vb4pex5vsknk084sn02q"},"in_use":{"type":"boolean","description":"Whether its brand's email is set to come from it (`sender.email_domain_id` on `…/brands/{brand}/email`): then it can't be deleted until the brand picks another, or none"},"verified_at":{"type":["string","null"],"format":"date-time","description":"When its records were first found, or null until they are"},"last_checked_at":{"type":["string","null"],"format":"date-time","description":"When Synq last checked its DNS, or null before the first check"},"created_at":{"type":"string","format":"date-time","description":"When it was added"}},"required":["id","domain","status","records","problem","brand","in_use","verified_at","last_checked_at","created_at"]},"EmailDomainRecord":{"type":"object","properties":{"purpose":{"type":"string","x-extensible-enum":["dkim","dkim_pending","return_path","dmarc"],"description":"`dkim`: the key Postmark signs with. `dkim_pending`: a new key Postmark is moving to, published beside the current one. `return_path`: the bounce domain, a CNAME to Postmark, which aligns SPF. `dmarc`: a policy Synq suggests, never required.","example":"dkim"},"type":{"type":"string","x-extensible-enum":["TXT","CNAME"],"description":"The record type","example":"TXT"},"host":{"type":"string","description":"The record's full name. Many DNS providers want only the part before the zone.","example":"20261006120000pm._domainkey.mail.acme.com"},"value":{"type":"string","description":"The record's value, exactly","example":"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ…"},"required":{"type":"boolean","description":"Whether the domain verifies only with it"},"status":{"type":"string","x-extensible-enum":["unchecked","found","missing","mismatch"],"description":"What Synq saw at the name when it last looked","example":"unchecked"},"seen":{"type":"string","description":"What was there instead, for a `mismatch`"}},"required":["purpose","type","host","value","required","status"]},"EmailDomainProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"brand_id":{"type":"string","description":"With `email_domain_unavailable` and `reason: another_brand`: the brand of this org that has the domain","example":"brd_01h455vb4pex5vsknk084sn02q"},"suggested_domain":{"type":"string","description":"With `email_domain_unavailable` held by another brand or org: a subdomain this brand could add instead, such as `mail.pay.acme.com`","example":"mail.pay.acme.com"}}}]},"EmailDomainCreate":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"A domain of the org’s own, for this brand’s email. A subdomain kept for this, such as `mail.acme.com`, keeps it apart from the org’s own mailboxes and their DMARC policy.","example":"mail.acme.com"}},"required":["domain"],"additionalProperties":false},"OrgDomainPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrgDomain"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"OrgDomain":{"type":"object","properties":{"id":{"type":"string","description":"The domain's id","example":"odm_01h455vb4pex5vsknk084sn02q"},"domain":{"type":"string","description":"In lower-case ASCII; an internationalized name in punycode. It covers itself alone, never its subdomains.","example":"acme.com"},"status":{"type":"string","x-extensible-enum":["pending","verified","failing"],"description":"`pending`: publish its record, then verify it. `verified`: the org holds the name. `failing`: its record went missing at a daily check; it still counts until `failing_until`, then goes back to `pending`.","example":"pending"},"verification":{"$ref":"#/components/schemas/OrgDomainVerificationRecord"},"problem":{"type":"string","nullable":true,"x-extensible-enum":["record_not_found","record_mismatch","not_every_resolver","dns_unavailable","verified_elsewhere"],"description":"What was wrong at the last check, or null: `record_not_found` (no record yet), `record_mismatch` (a `synq-verification=` record with another token), `not_every_resolver` (some public resolvers see it and others don't yet: wait a few minutes), `dns_unavailable` (DNS didn't answer: try again), `verified_elsewhere` (another org proved the name first).","example":"record_not_found"},"verified_at":{"type":["string","null"],"format":"date-time","description":"When the org last proved it owns the domain, or null until it does"},"failing_until":{"type":["string","null"],"format":"date-time","description":"For a `failing` domain, when it goes back to `pending` unless its record is back; else null"},"last_checked_at":{"type":["string","null"],"format":"date-time","description":"When Synq last read its record, or null before the first check"},"created_at":{"type":"string","format":"date-time","description":"When it was added"}},"required":["id","domain","status","verification","problem","verified_at","failing_until","last_checked_at","created_at"]},"OrgDomainVerificationRecord":{"type":"object","properties":{"type":{"type":"string","x-extensible-enum":["TXT"],"description":"The record type","example":"TXT"},"host":{"type":"string","description":"The record's full name. Many DNS providers want only the part before the domain: `_synq-verification`.","example":"_synq-verification.acme.com"},"value":{"type":"string","description":"The record's value, exactly","example":"synq-verification=k7q2m5x9a3b4c6d8e2f7g5h3j9k4m2n6"}},"required":["type","host","value"],"description":"The TXT record that proves the org owns the domain. Keep it while the domain is in use."},"OrgDomainCreate":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"A domain your organization registered, such as `acme.com`, whose addresses are its people’s. Each subdomain people have addresses at, such as `eu.acme.com`, is added on its own.","example":"acme.com"}},"required":["domain"],"additionalProperties":false},"CustomDomain":{"type":"object","properties":{"id":{"type":"string","description":"The custom domain's id","example":"cdm_01h455vb4pex5vsknk084sn02q"},"hostname":{"type":"string","description":"The host name sign-ins happen on","example":"login.acme.com"},"status":{"type":"string","x-extensible-enum":["pending_dns","pending_setup","provisioning","active","suspended","failed","removing","removed"],"description":"`pending_dns`: add the record. `pending_setup`: the record is verified and Synq is finishing setup; it goes live on its own. `provisioning`: its certificate is being issued. `active`: the brand’s issuer answers on it. `suspended`: the org’s plan no longer includes custom domains; it still answers until `grace_ends_at`. `failed`: see `problems`; it no longer holds its hostname. Fix them and check again, or remove it and add it again. `removing`, `removed`: it no longer answers.","example":"pending_dns"},"issuer":{"type":["string","null"],"description":"The issuer identifier apps use to sign in on it, once it answers: its own `iss`, beside the brand’s own issuer. Null until active.","example":"https://login.acme.com"},"dns_records":{"type":"array","items":{"$ref":"#/components/schemas/CustomDomainRecord"},"description":"The records to add at the DNS host"},"ssl":{"type":"object","properties":{"status":{"type":"string","x-extensible-enum":["pending","active","failed"],"description":"Its certificate's state","example":"pending"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the certificate expires, or null before it is issued. Synq renews it"}},"required":["status","expires_at"],"description":"Its certificate"},"problems":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","x-extensible-enum":["cname_not_found","cname_points_elsewhere","cname_proxied_by_cloudflare","conflicting_records","caa_blocks_issuance","dns_unavailable","verification_expired","hostname_taken","cloudflare_blocked","certificate_failed","hostname_moved","certificate_expiring"],"description":"What is wrong, each with its fix in the docs (errors/custom-domains)","example":"cname_not_found"},"detail":{"type":"string","description":"What was found, such as the record that is there instead","example":"other.example.net"}},"required":["code"]},"description":"What keeps it from going live, empty when nothing does"},"verified_at":{"type":["string","null"],"format":"date-time","description":"When Synq verified the record, or null until it does"},"activated_at":{"type":["string","null"],"format":"date-time","description":"When it went live, or null until it does"},"grace_ends_at":{"type":["string","null"],"format":"date-time","description":"While suspended: when it is removed unless the plan includes custom domains again"},"checked_at":{"type":["string","null"],"format":"date-time","description":"When Synq last checked its DNS, or null before the first check"},"created_at":{"type":"string","format":"date-time","description":"When it was added"}},"required":["id","hostname","status","issuer","dns_records","ssl","problems","verified_at","activated_at","grace_ends_at","checked_at","created_at"]},"CustomDomainRecord":{"type":"object","properties":{"type":{"type":"string","x-extensible-enum":["CNAME"],"description":"The record type","example":"CNAME"},"name":{"type":"string","description":"The record's full name: the custom domain itself.","example":"login.acme.com"},"relative_name":{"type":"string","description":"The same name relative to its registrable domain, as most DNS providers ask for it.","example":"login"},"value":{"type":"string","description":"What it points at: this domain's own target, made for it alone.","example":"cd-k7m2q4x9w3p5r8t6.domains.synq.build"},"status":{"type":"string","x-extensible-enum":["pending","verified","misconfigured"],"description":"`pending`: not seen yet. `verified`: seen at its value. `misconfigured`: something else is there (`found`, and the domain’s `problems`).","example":"pending"},"found":{"type":["string","null"],"description":"What the name points at now, when that is something else","example":null}},"required":["type","name","relative_name","value","status","found"]},"CustomDomainPreview":{"type":"object","properties":{"dry_run":{"type":"boolean","enum":[true],"description":"Always true: a dry run, which changed nothing"},"hostname":{"type":"string","description":"The hostname, as it would be added","example":"login.acme.com"}},"required":["dry_run","hostname"]},"CustomDomainCreate":{"type":"object","properties":{"dry_run":{"type":"boolean","description":"Check permissions, plan, hostname policy and availability without adding a domain or starting verification."},"hostname":{"type":"string","minLength":1,"maxLength":253,"description":"A subdomain of a domain the org owns, such as `login.acme.com`: never the domain itself (`acme.com`).","example":"login.acme.com"}},"required":["hostname"],"additionalProperties":false},"SignInProviderPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SignInProvider"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"SignInProvider":{"type":"object","properties":{"provider":{"type":"string","x-extensible-enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"description":"The provider. More are added over time: skip one you don’t know.","example":"google"},"link_by_email":{"type":"boolean","description":"Whether a sign-in whose provider vouches for the address signs in to the brand's user who verified it, rather than being refused. Google vouches for Gmail and for a Workspace account's address on its own domain, Apple for its own mailboxes, and Microsoft only with its `xms_edov` claim. Off only makes linking stricter. On by default."},"hosted_domain":{"type":["string","null"],"description":"Google only: the one Workspace domain whose accounts may sign in, decided by the ID token, not the request. Any Google account when null.","example":"acme.example"},"microsoft_tenant":{"type":["string","null"],"description":"Microsoft only: whose accounts may sign in. `organizations` for work or school accounts, or one directory by its tenant id; any account, work, school or personal, when null.","example":"organizations"},"use":{"type":"string","x-extensible-enum":["sign_in","link_only"],"description":"What the provider is for: `sign_in` (the default), signing in, signing up and adding it to an account; `link_only`, adding it to an account alone, never a way to sign in or up, nor counted as one. A linked account there still shows on the person's account page and to the tenant's server.","example":"sign_in"},"keep_tokens":{"type":"boolean","description":"Whether Synq keeps each person's tokens at the provider for the tenant's server: the access token and any refresh token, sealed, replaced at every sign-in or link with it, and refreshed by Synq when read. Only through the brand's own app there or its org's, never Synq's shared one (`own_app_required`); a sign-in through Synq's app keeps none. The tenant's server reads one with an org API key at `POST …/users/{user}/identities/{identity}/access-token`; the refresh token is never returned. Turning it on wants a sign-in from the last 5 minutes for a person; turning it off deletes every token kept here. Off by default."},"kept_claims":{"type":"array","items":{"type":"string","description":"A claim’s name, as the provider names it"},"description":"The claims the provider says of the person that Synq keeps on each identity, by name, for the tenant's server (`GET …/users/{user}/identities`' `claims`): an OpenID Connect provider's ID token claims, an OAuth 2.0 provider's user endpoint fields (X's inside `data`). At most 16, kept as the provider said them at the last sign-in or link, 4 KB at most altogether; never the protocol's own claims (`iss`, `aud`, `nonce`…) nor a name like a credential's.","example":["locale"]},"app":{"$ref":"#/components/schemas/ProviderApp"},"signs_in_through":{"type":["string","null"],"x-extensible-enum":["brand","org","synq"],"description":"Whose app a sign-in goes through now: the brand’s own, the org’s, Synq’s, or none anywhere"},"redirect_uri":{"type":"string","description":"The redirect URI an app the tenant brings registers for this brand, the brand’s own or the org’s: the brand’s own callback, on its issuer’s host. Synq’s own app needs nothing registered","example":"https://acme.auth.synq.build/federation/google/callback"},"offered":{"type":"boolean","description":"Whether the sign-in page offers it now: turned on, with an app somewhere. False with an app set means it is turned off"},"synq_app":{"type":"boolean","description":"Whether Synq’s own app at the provider can sign this brand in. False for Matrica, whose two apps are Synq’s own and sign in Synq alone: a brand offers it only through an app its org or brand brings (`PUT …/sign-in-providers/matrica/app`, a plan with `auth.byo_connections`), and turning it on without one answers `own_app_required`"},"scopes":{"$ref":"#/components/schemas/ProviderScopes"}},"required":["provider","link_by_email","hosted_domain","microsoft_tenant","use","keep_tokens","kept_claims","app","signs_in_through","redirect_uri","offered","synq_app","scopes"]},"ProviderApp":{"type":["object","null"],"properties":{"client_id":{"type":"string","description":"The app’s client id at the provider"},"app_type":{"type":["string","null"],"x-extensible-enum":["oauth_app","github_app"],"description":"GitHub only: the kind of app, as declared: `oauth_app`, which takes the extra scopes the brand asks for, or `github_app`, which ignores scopes and has the permissions its registration lists. Null when not declared, and for every other provider: extra scopes that need your own app then never ride on it","example":"oauth_app"},"redirect_uri":{"type":"string","description":"Register this exact redirect URI with the app at the provider: the brand’s own callback for it, on its issuer’s host","example":"https://acme.auth.synq.build/federation/google/callback"},"updated_at":{"type":"string","format":"date-time","description":"When the app was last set"}},"required":["client_id","app_type","redirect_uri","updated_at"],"description":"The brand’s own app at the provider, or null. Set it with `PUT …/sign-in-providers/{provider}/app`"},"ProviderScopes":{"type":"object","properties":{"minimum":{"type":"array","items":{"type":"string","description":"A scope, as the provider names it","example":"telegram:bot_access"},"description":"Synq’s own scopes at the provider: every sign-in asks for them, first","example":["openid","profile"]},"extra":{"type":"array","items":{"type":"string","description":"A scope, as the provider names it","example":"telegram:bot_access"},"description":"The extra scopes the brand asks for: its own (`source: brand`), else the org’s (`source: org`), in the catalog’s order","example":["phone","telegram:bot_access"]},"source":{"type":["string","null"],"x-extensible-enum":["brand","org"],"description":"Whose `extra` are: the brand’s own, which replace the org’s entirely, the org’s, or null for none","example":"org"},"asked":{"type":"array","items":{"type":"string","description":"A scope, as the provider names it","example":"telegram:bot_access"},"description":"What a sign-in through the app it goes through now asks the provider for: the minimum, then each extra that app may carry","example":["openid","profile","phone","telegram:bot_access"]},"inactive":{"type":"array","items":{"$ref":"#/components/schemas/InactiveProviderScope"},"description":"The extra scopes kept that sign-ins leave out now, and why: nothing is ever deleted when an app goes away"}},"required":["minimum","extra","source","asked","inactive"],"description":"What a sign-in asks the provider for: Synq’s minimum, the extra scopes the brand or its org set (`PUT …/sign-in-providers/{provider}/scopes`), what is asked through the app sign-ins go through now, and the extras left out, with why"},"InactiveProviderScope":{"type":"object","properties":{"scope":{"type":"string","description":"A scope, as the provider names it","example":"telegram:bot_access"},"reason":{"type":"string","x-extensible-enum":["scope_needs_own_app","scope_unavailable","scope_not_allowed"],"description":"Why it isn’t sent: `scope_needs_own_app`, it rides only on your own app at the provider (a GitHub OAuth App at GitHub) and sign-ins here go through another; `scope_unavailable` or `scope_not_allowed`, Synq’s list no longer offers it as it did. Kept, and sent again once that changes","example":"scope_needs_own_app"}},"required":["scope","reason"]},"SignInProviderUpdate":{"type":"object","properties":{"link_by_email":{"type":"boolean","description":"Whether a sign-in whose provider vouches for the address signs in to the brand's user who verified it, rather than being refused. Google vouches for Gmail and for a Workspace account's address on its own domain, Apple for its own mailboxes, and Microsoft only with its `xms_edov` claim. Off only makes linking stricter. On by default."},"hosted_domain":{"type":["string","null"],"maxLength":253,"pattern":"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$","example":"acme.example","description":"Google only: the one Workspace domain whose accounts may sign in, decided by the ID token, not the request. Any Google account when null."},"microsoft_tenant":{"type":["string","null"],"pattern":"^(organizations|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$","description":"Microsoft only: whose accounts may sign in. `organizations` for work or school accounts, or one directory by its tenant id; any account, work, school or personal, when null."},"use":{"type":"string","enum":["sign_in","link_only"],"description":"What the provider is for: `sign_in` (the default), signing in, signing up and adding it to an account; `link_only`, adding it to an account alone, never a way to sign in or up, nor counted as one. A linked account there still shows on the person's account page and to the tenant's server."},"keep_tokens":{"type":"boolean","description":"Whether Synq keeps each person's tokens at the provider for the tenant's server: the access token and any refresh token, sealed, replaced at every sign-in or link with it, and refreshed by Synq when read. Only through the brand's own app there or its org's, never Synq's shared one (`own_app_required`); a sign-in through Synq's app keeps none. The tenant's server reads one with an org API key at `POST …/users/{user}/identities/{identity}/access-token`; the refresh token is never returned. Turning it on wants a sign-in from the last 5 minutes for a person; turning it off deletes every token kept here. Off by default."},"kept_claims":{"type":["array","null"],"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.:-]{0,63}$","description":"A claim’s name, as the provider names it"},"maxItems":16,"description":"The claims the provider says of the person that Synq keeps on each identity, by name, for the tenant's server (`GET …/users/{user}/identities`' `claims`): an OpenID Connect provider's ID token claims, an OAuth 2.0 provider's user endpoint fields (X's inside `data`). At most 16, kept as the provider said them at the last sign-in or link, 4 KB at most altogether; never the protocol's own claims (`iss`, `aud`, `nonce`…) nor a name like a credential's. Null or an empty list keeps none."}},"additionalProperties":false},"ProviderScopesInput":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":32,"description":"The extra scopes, as the provider names them, at most 32: the whole list, replacing the one before. Each one added must be on the provider’s list (`GET /v1/provider-scopes`) and `available`, and those that need your own app need one where the scopes are set; one asked for already stays, though it can’t be sent now (`inactive`). Synq’s own minimum is always asked for and is not listed here. An empty list asks for nothing extra","example":["phone","telegram:bot_access"]}},"required":["scopes"],"additionalProperties":false},"CustomSignInProviderPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomSignInProvider"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"CustomSignInProvider":{"type":"object","properties":{"id":{"type":"string","description":"Its id, `custom-` and the slug the tenant picked: its name wherever a provider's is","example":"custom-acme-guild"},"type":{"type":"string","x-extensible-enum":["oidc","oauth2"],"description":"`oidc` or `oauth2`. More kinds are added over time: skip one you don’t know"},"name":{"type":"string","description":"Its name on buttons and pages"},"icon":{"type":["string","null"],"description":"Its icon on its button, 20 px square: one of the brand's files, uploaded for `provider_icon` (`POST …/files`) and finalized, by its `url`. Null for none."},"issuer":{"type":"string","description":"The issuer: discovered for `oidc`, the `iss` its answers carry for `oauth2`"},"endpoints":{"type":["object","null"],"properties":{"authorization":{"type":"string","description":"Where people sign in and approve the app"},"token":{"type":"string","description":"Where the app trades the code"},"userinfo":{"type":"string","description":"Where the access token reads who the person is"}},"required":["authorization","token","userinfo"],"description":"OAuth 2.0's endpoints, as the tenant named them. Null for OpenID Connect, whose issuer names its own"},"app":{"type":"object","properties":{"client_id":{"type":"string","description":"The app's client id at the provider; never its secret"},"token_endpoint_auth_method":{"type":"string","x-extensible-enum":["client_secret_basic","client_secret_post"],"description":"How the app authenticates at the token endpoint: `client_secret_basic` (HTTP Basic, the default, which every OAuth 2.0 server must take) or `client_secret_post` (in the form)."},"updated_at":{"type":"string","format":"date-time","description":"When the provider was last changed"}},"required":["client_id","token_endpoint_auth_method","updated_at"],"description":"The app it signs in through: yours, at the provider. Replace it with `PUT …/app`"},"redirect_uri":{"type":"string","description":"Register this exact redirect URI with the app at the provider: the brand's own callback for it, on its issuer's host","example":"https://acme.auth.synq.build/federation/custom-acme-guild/callback"},"scopes":{"type":"array","items":{"type":"string"},"description":"What a sign-in asks it for, as sent: `openid` first for OpenID Connect"},"claims":{"$ref":"#/components/schemas/CustomSignInProviderClaims"},"email_authoritative":{"type":"boolean","description":"Whether the provider's word on an email address is enough: on, an address it says it proved (`email_verified`) is the person's, verified, and signs them in to the brand's user who verified it rather than being refused, as Google's does. Off, the default, every address it gives is unverified: it never matches or joins an account that has it, and a newcomer verifies it before it counts. Turn it on only for a provider whose addresses you trust as much as your own."},"use":{"type":"string","x-extensible-enum":["sign_in","link_only"],"description":"What it is for: `sign_in` (the default), signing in, signing up and adding it to an account; `link_only`, adding it to an account alone, never a way to sign in or up, nor counted as one."},"keep_tokens":{"type":"boolean","description":"Whether Synq keeps each person's tokens there for your server: the access token and any refresh token, sealed, read with an org API key at `POST …/users/{user}/identities/{identity}/access-token`. Turning it on wants a person's sign-in from the last 5 minutes; turning it off deletes every token kept here. Off by default."},"kept_claims":{"type":"array","items":{"type":"string"},"description":"The claims it says of the person that Synq keeps on each identity, by name"},"offered":{"type":"boolean","description":"Whether its sign-ins offer it now: on the brand’s sign-in page (shown or under More ways, `…/sign-in-page`), and of a kind this version of Synq signs in with"},"created_at":{"type":"string","format":"date-time","description":"When it was added"}},"required":["id","type","name","icon","issuer","endpoints","app","redirect_uri","scopes","claims","email_authoritative","use","keep_tokens","kept_claims","offered","created_at"]},"CustomSignInProviderClaims":{"type":"object","properties":{"subject":{"type":"string","description":"Who someone is, for life"},"name":{"type":["string","null"],"description":"Their name, or null to read none"},"handle":{"type":["string","null"],"description":"Their username there, or null"},"picture":{"type":["string","null"],"description":"An https URL of their picture, or null"},"email":{"type":["string","null"],"description":"Their email address, or null"},"email_verified":{"type":["string","null"],"description":"Whether the provider proved the address, read only where `email_authoritative` is on, or null"}},"required":["subject","name","handle","picture","email","email_verified"],"description":"Where in the provider's answer each thing about the person is: an ID token or user endpoint claim by name, or a dotted path into an object (`data.id`). OpenID Connect reads the ID token and, where its discovery names one, the user endpoint; OAuth 2.0 the user endpoint. `subject` says who someone is, for life: it must never change or be reused. Leave one out for its default; null reads nothing for it."},"CustomSignInProviderCreate":{"type":"object","properties":{"client_id":{"type":"string","minLength":1,"maxLength":512,"description":"The app's client id at the provider"},"client_secret":{"type":"string","minLength":1,"maxLength":1024,"description":"Kept sealed, used only to authenticate to the provider, and never returned"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post"],"description":"How the app authenticates at the token endpoint: `client_secret_basic` (HTTP Basic, the default, which every OAuth 2.0 server must take) or `client_secret_post` (in the form)."},"id":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","example":"custom-acme-guild","description":"Its id, which you pick: `custom-` and a slug. It is its name everywhere a provider's is (the sign-in step's URL, `synq_method`, people's linked accounts) and can't change."},"type":{"type":"string","enum":["oidc","oauth2"],"description":"`oidc`, an OpenID Connect issuer, discovered; or `oauth2`, an OAuth 2.0 server at the `endpoints` you name"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^\\p{Cc}]+$/u","description":"Its name on buttons and pages: \"Continue with Acme Guild\"","example":"Acme Guild"},"icon":{"type":["string","null"],"maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Its icon on its button, 20 px square: one of the brand's files, uploaded for `provider_icon` (`POST …/files`) and finalized, by its `url`. Null for none."},"issuer":{"type":"string","maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"`oidc`: the issuer, discovered at its `/.well-known/openid-configuration`, which must name it exactly. `oauth2`: its issuer identifier, the `iss` its answers carry (RFC 9207), the authorization endpoint's origin when left out. Can't change.","example":"https://id.acme-guild.example"},"endpoints":{"type":"object","properties":{"authorization":{"type":"string","maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Where people sign in and approve the app"},"token":{"type":"string","maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Where the app trades the code"},"userinfo":{"type":"string","maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Where the access token reads who the person is"}},"required":["authorization","token","userinfo"],"additionalProperties":false,"description":"`oauth2` only, and needed there"},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$"},"maxItems":32,"description":"What a sign-in asks the provider for, at most 32. OpenID Connect always asks for `openid` first, then these: `email` and `profile` by default. OAuth 2.0: none by default."},"claims":{"$ref":"#/components/schemas/CustomSignInProviderClaimsInput"},"email_authoritative":{"type":"boolean","description":"Whether the provider's word on an email address is enough: on, an address it says it proved (`email_verified`) is the person's, verified, and signs them in to the brand's user who verified it rather than being refused, as Google's does. Off, the default, every address it gives is unverified: it never matches or joins an account that has it, and a newcomer verifies it before it counts. Turn it on only for a provider whose addresses you trust as much as your own."},"use":{"type":"string","enum":["sign_in","link_only"],"description":"What it is for: `sign_in` (the default), signing in, signing up and adding it to an account; `link_only`, adding it to an account alone, never a way to sign in or up, nor counted as one."},"keep_tokens":{"type":"boolean","description":"Whether Synq keeps each person's tokens there for your server: the access token and any refresh token, sealed, read with an org API key at `POST …/users/{user}/identities/{identity}/access-token`. Turning it on wants a person's sign-in from the last 5 minutes; turning it off deletes every token kept here. Off by default."},"kept_claims":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.:-]{0,63}$"},"maxItems":16,"description":"The claims it says of the person that Synq keeps on each identity for your server, by name, at most 16"}},"required":["client_id","client_secret","id","type","name"],"additionalProperties":false},"CustomSignInProviderClaimsInput":{"type":"object","properties":{"subject":{"type":"string","maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_:-]{0,63}(\\.[A-Za-z_][A-Za-z0-9_:-]{0,63}){0,4}$","description":"Who someone is: `sub` for OpenID Connect and `id` for OAuth 2.0 by default"},"name":{"type":["string","null"],"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_:-]{0,63}(\\.[A-Za-z_][A-Za-z0-9_:-]{0,63}){0,4}$","description":"Their name"},"handle":{"type":["string","null"],"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_:-]{0,63}(\\.[A-Za-z_][A-Za-z0-9_:-]{0,63}){0,4}$","description":"Their username there, without `@`"},"picture":{"type":["string","null"],"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_:-]{0,63}(\\.[A-Za-z_][A-Za-z0-9_:-]{0,63}){0,4}$","description":"An https URL of their picture"},"email":{"type":["string","null"],"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_:-]{0,63}(\\.[A-Za-z_][A-Za-z0-9_:-]{0,63}){0,4}$","description":"Their email address, unverified unless `email_authoritative`"},"email_verified":{"type":["string","null"],"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_:-]{0,63}(\\.[A-Za-z_][A-Za-z0-9_:-]{0,63}){0,4}$","description":"Whether the provider proved the address: read only where `email_authoritative` is on"}},"additionalProperties":false,"description":"Where in the provider's answer each thing about the person is: an ID token or user endpoint claim by name, or a dotted path into an object (`data.id`). OpenID Connect reads the ID token and, where its discovery names one, the user endpoint; OAuth 2.0 the user endpoint. `subject` says who someone is, for life: it must never change or be reused. Leave one out for its default; null reads nothing for it."},"CustomSignInProviderUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^\\p{Cc}]+$/u","description":"Its name on buttons and pages: \"Continue with Acme Guild\"","example":"Acme Guild"},"icon":{"type":["string","null"],"maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Its icon on its button, 20 px square: one of the brand's files, uploaded for `provider_icon` (`POST …/files`) and finalized, by its `url`. Null for none."},"endpoints":{"type":"object","properties":{"authorization":{"type":"string","maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Where people sign in and approve the app"},"token":{"type":"string","maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Where the app trades the code"},"userinfo":{"type":"string","maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Where the access token reads who the person is"}},"required":["authorization","token","userinfo"],"additionalProperties":false,"description":"`oauth2` only: new endpoints, where the app is asked again"},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[\\x21\\x23-\\x5B\\x5D-\\x7E]+$"},"maxItems":32,"description":"What a sign-in asks the provider for, at most 32. OpenID Connect always asks for `openid` first, then these: `email` and `profile` by default. OAuth 2.0: none by default."},"claims":{"$ref":"#/components/schemas/CustomSignInProviderClaimsInput"},"email_authoritative":{"type":"boolean","description":"Whether the provider's word on an email address is enough: on, an address it says it proved (`email_verified`) is the person's, verified, and signs them in to the brand's user who verified it rather than being refused, as Google's does. Off, the default, every address it gives is unverified: it never matches or joins an account that has it, and a newcomer verifies it before it counts. Turn it on only for a provider whose addresses you trust as much as your own."},"use":{"type":"string","enum":["sign_in","link_only"],"description":"What it is for: `sign_in` (the default), signing in, signing up and adding it to an account; `link_only`, adding it to an account alone, never a way to sign in or up, nor counted as one."},"keep_tokens":{"type":"boolean","description":"Whether Synq keeps each person's tokens there for your server: the access token and any refresh token, sealed, read with an org API key at `POST …/users/{user}/identities/{identity}/access-token`. Turning it on wants a person's sign-in from the last 5 minutes; turning it off deletes every token kept here. Off by default."},"kept_claims":{"type":["array","null"],"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.:-]{0,63}$"},"maxItems":16,"description":"The claims to keep; null or an empty list keeps none"}},"additionalProperties":false},"CustomSignInProviderAppInput":{"type":"object","properties":{"client_id":{"type":"string","minLength":1,"maxLength":512,"description":"The app's client id at the provider"},"client_secret":{"type":"string","minLength":1,"maxLength":1024,"description":"Kept sealed, used only to authenticate to the provider, and never returned"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post"],"description":"How the app authenticates at the token endpoint: `client_secret_basic` (HTTP Basic, the default, which every OAuth 2.0 server must take) or `client_secret_post` (in the form)."}},"required":["client_id","client_secret"],"additionalProperties":false},"SignInMethodInUseProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"apps":{"type":"array","items":{"type":"string"},"description":"The apps that take no other way to sign in, by client_id","example":["app_01h455vb4pex5vsknk084sn02q"]}},"required":["apps"]}]},"OrgProviderAppPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrgProviderApp"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"OrgProviderApp":{"type":"object","properties":{"provider":{"type":"string","x-extensible-enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"description":"The provider. More are added over time: skip one you don’t know.","example":"google"},"app":{"anyOf":[{"$ref":"#/components/schemas/OrgWideProviderApp"},{"type":"null"}],"description":"The org’s own app there, or null"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Register every one of these redirect URIs with the app at the provider: each live brand of the org’s own callback for it, on the brand’s issuer host, since the app signs in every brand without an app of its own. A brand made later adds its own, which the answer that makes it names: add it there too","example":["https://acme.auth.synq.build/federation/google/callback","https://acme-games.auth.synq.build/federation/google/callback"]},"scopes":{"$ref":"#/components/schemas/OrgProviderScopes"}},"required":["provider","app","redirect_uris","scopes"]},"OrgWideProviderApp":{"type":"object","properties":{"client_id":{"type":"string","description":"The app’s client id at the provider"},"app_type":{"type":["string","null"],"x-extensible-enum":["oauth_app","github_app"],"description":"GitHub only: the kind of app, as declared: `oauth_app`, which takes the extra scopes the brand asks for, or `github_app`, which ignores scopes and has the permissions its registration lists. Null when not declared, and for every other provider: extra scopes that need your own app then never ride on it","example":"oauth_app"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Register every one of these redirect URIs with the app at the provider: each live brand of the org’s own callback for it, on the brand’s issuer host, since the app signs in every brand without an app of its own. A brand made later adds its own, which the answer that makes it names: add it there too","example":["https://acme.auth.synq.build/federation/google/callback","https://acme-games.auth.synq.build/federation/google/callback"]},"updated_at":{"type":"string","format":"date-time","description":"When the app was last set"}},"required":["client_id","app_type","redirect_uris","updated_at"]},"OrgProviderScopes":{"type":"object","properties":{"minimum":{"type":"array","items":{"type":"string","description":"A scope, as the provider names it","example":"telegram:bot_access"},"description":"Synq’s own scopes at the provider: every sign-in asks for them, first","example":["openid","profile"]},"extra":{"type":"array","items":{"type":"string","description":"A scope, as the provider names it","example":"telegram:bot_access"},"description":"The extra scopes the org asks for at every brand that keeps none of its own, in the catalog’s order","example":["phone"]},"inactive":{"type":"array","items":{"$ref":"#/components/schemas/InactiveProviderScope"},"description":"The extra scopes kept that sign-ins leave out now, and why: nothing is ever deleted when an app goes away"}},"required":["minimum","extra","inactive"]},"ProviderAppInput":{"type":"object","properties":{"client_id":{"type":"string","minLength":1,"maxLength":512,"description":"The app’s client id at the provider: for Apple, its Services ID"},"client_secret":{"type":"string","minLength":1,"maxLength":1024,"description":"Every provider but Apple. Kept sealed, used only to authenticate to the provider, and never returned"},"team_id":{"type":"string","minLength":1,"maxLength":32,"description":"Apple only: the Apple Developer team id","example":"A1B2C3D4E5"},"key_id":{"type":"string","minLength":1,"maxLength":32,"description":"Apple only: the Sign in with Apple key’s id","example":"F6G7H8I9J0"},"private_key":{"type":"string","minLength":1,"maxLength":4096,"description":"Apple only: the key’s `.p8` file, PEM. Kept sealed, used only to sign the client secrets Synq sends Apple, and never returned"},"app_type":{"type":"string","enum":["oauth_app","github_app"],"description":"GitHub only: `oauth_app` for an OAuth App, which takes the extra scopes a brand asks for (`PUT …/sign-in-providers/github/scopes`), or `github_app` for a GitHub App, which ignores scopes. Left out, it is undeclared, and no extra scope that needs your own app rides on it","example":"oauth_app"}},"required":["client_id"],"additionalProperties":false},"AppPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/App"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"App":{"type":"object","properties":{"id":{"type":"string","description":"The app's client_id","example":"app_01h455vb4pex5vsknk084sn02q"},"brand_id":{"type":"string","description":"The brand the app belongs to"},"name":{"type":"string","description":"The app's name, which people see when they sign in and consent"},"app_type":{"type":"string","x-extensible-enum":["web","spa","native","m2m","agent"],"description":"`web` (a server that keeps a secret), `spa`, `native`, `m2m` (a machine, with no person) or `agent` (signs people in with the device flow)"},"source":{"type":"string","x-extensible-enum":["dashboard","api","dcr","cimd"],"description":"Where the app came from. `dashboard` for one the org made in Synq's dashboard; `api` for one the org made with this API, through an org API key, an MCP host or a tool such as `npx synqauth init`; `dcr` for one that registered itself (RFC 7591); `cimd` for one whose client_id is the URL of its metadata document. `dashboard` and `api` are the org's own apps, which never differ in what they may do"},"first_party":{"type":"boolean","description":"The brand's own app: people aren't asked to consent to it"},"own_ui_sign_in":{"type":"boolean","description":"Whether the app signs people in on its own screens, through the issuer's `/authorize-challenge`"},"sign_in_methods":{"type":["array","null"],"items":{"type":"string"},"description":"The ways to sign in this app takes, of those its brand offers, by their ids: Synq's (`email`, `google`…) and the brand's own providers' (`custom-…`). Null takes every one","example":["email","custom-acme-guild"]},"test_sign_ins":{"type":"boolean","description":"Whether its sign-ins offer test sign-ins: a made-up GitHub or Google account, for your tests. Never in production"},"sign_in_claims":{"type":"boolean","description":"Whether its ID tokens say how each sign-in went: `sign_in_method`, `sign_in_wallet` (a wallet sign-in’s address and wallet app) and `new_user` (true once, for the sign-in that made the account)"},"disabled":{"type":"boolean","description":"A disabled app signs no one in and gets no tokens until enabled again"},"development":{"type":"boolean","description":"Whether it's a development app: it signs people in on this computer only, every redirect URI on localhost, 127.0.0.1 or [::1]. The org's first doesn't count toward its plan's apps (`GET /v1/plans`, `quotas.development_apps`); a redirect URI anywhere else makes it count"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Matched exactly, port included. https; a web app or SPA may also use https on localhost, 127.0.0.1 or [::1] (a dev server on a laptop), and a native app http://localhost or http://127.0.0.1 on any port, or a scheme of its own: a reverse domain name it owns, in lowercase, such as com.example.app:/callback (RFC 8252). A native app is public and always uses PKCE."},"post_logout_redirect_uris":{"type":"array","items":{"type":"string"},"description":"Where the issuer may send someone after the app signs them out, matched exactly like redirect URIs"},"backchannel_logout_uri":{"type":["string","null"],"description":"Where the issuer tells the app's server that someone signed out (OpenID Connect Back-Channel Logout): a POST with a signed `logout_token`. https on a public host; for apps that sign people in with a redirect"},"backchannel_logout_session_required":{"type":"boolean","description":"Whether the logout token and ID tokens carry `sid`, the session that ended. On by default"},"client_uri":{"type":["string","null"],"description":"The app's home page, shown on the consent screen"},"logo_uri":{"type":["string","null"],"description":"The app's logo, shown on the consent screen"},"policy_uri":{"type":["string","null"],"description":"The app's privacy policy, linked from the consent screen"},"tos_uri":{"type":["string","null"],"description":"The app's terms of service, linked from the consent screen"},"initiate_login_uri":{"type":["string","null"],"description":"Where the app starts a sign-in on its own (OpenID Connect's third-party-initiated login): the brand's signed-out page links to it as \"Sign in again\". `client_uri` is its \"Back to\" link"},"jwks_uri":{"type":["string","null"],"description":"For private_key_jwt: where the app's keys are"},"token_endpoint_auth_method":{"type":"string","description":"How a web or machine app authenticates; client_secret_basic by default","example":"client_secret_basic"},"pkce_optional":{"type":"boolean","description":"A web app may skip PKCE (not recommended); public apps never can"},"spa_refresh_tokens":{"type":"boolean","description":"A SPA may hold refresh tokens (off by default)"},"refresh_token_reuse_window_seconds":{"type":"integer","description":"Seconds after a refresh token is rotated during which the same refresh token, presented again by this app, gets back the very tokens its rotation gave (the same refresh, access and ID tokens) instead of ending its grant. For an app on several servers or processes (Vercel, replicas) whose requests may refresh at once. 0, the default, is no window: a rotated refresh token presented again ends its grant. Nothing comes back after the person's sessions are ended or the grant is revoked, and a replay must ask for the scope and resource the rotation did. Each replay is counted and recorded as `app.refresh_token_replayed`, since inside the window a reused token isn't caught as stolen. 0 to 60, for web apps only: a replay still needs the app's secret. A public app (SPA, native, agent) has no secret, so a thief replaying a stolen refresh token inside the window would get the new tokens, and it can't have one; nor can a machine app, which gets no refresh tokens"},"previous_secret_expires_at":{"type":["string","null"],"format":"date-time","description":"Until when the secret before the last rotation still works"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When it last got tokens, or null for never"},"created_at":{"type":"string","format":"date-time","description":"When the app was made"},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/AppWarning"},"description":"What may be wrong with the app as it is, though Synq takes it: empty when nothing is"}},"required":["id","brand_id","name","app_type","source","first_party","own_ui_sign_in","sign_in_methods","test_sign_ins","sign_in_claims","disabled","development","redirect_uris","post_logout_redirect_uris","backchannel_logout_uri","backchannel_logout_session_required","client_uri","logo_uri","policy_uri","tos_uri","initiate_login_uri","jwks_uri","token_endpoint_auth_method","pkce_optional","spa_refresh_tokens","refresh_token_reuse_window_seconds","previous_secret_expires_at","last_used_at","created_at","warnings"]},"AppWarning":{"type":"object","properties":{"code":{"type":"string","description":"What it is about, for code to read. `loopback_redirect_uris`: deployed, a web app or SPA still has redirect or post-logout URIs on a loopback address (localhost, 127.0.0.1, [::1]), a dev server on a laptop. `passkey_origin_beyond_related_origins_limit`: a web app that signs people in on its own screens has an origin past the first 5 sites of the brand's passkey list, which browsers read, so passkeys from there go through the hosted page","example":"loopback_redirect_uris"},"message":{"type":"string","description":"The same, for a person to read"}},"required":["code","message"]},"AppWithSecret":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","properties":{"client_secret":{"type":["string","null"],"description":"The secret, shown this once; null for an app without one. Only its hash is kept."}},"required":["client_secret"]}]},"AppCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The app's name, which people see when they sign in and consent","example":"Acme web"},"app_type":{"type":"string","enum":["web","spa","native","m2m","agent"],"description":"`web` (a server that keeps a secret), `spa`, `native`, `m2m` (a machine, with no person) or `agent` (signs people in with the device flow). It never changes"},"redirect_uris":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Matched exactly, port included. https; a web app or SPA may also use https on localhost, 127.0.0.1 or [::1] (a dev server on a laptop), and a native app http://localhost or http://127.0.0.1 on any port, or a scheme of its own: a reverse domain name it owns, in lowercase, such as com.example.app:/callback (RFC 8252). A native app is public and always uses PKCE."},"post_logout_redirect_uris":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Where the issuer may send someone after the app signs them out, matched exactly like redirect URIs"},"backchannel_logout_uri":{"type":["string","null"],"maxLength":2048,"description":"Where the issuer tells the app's server that someone signed out (OpenID Connect Back-Channel Logout): a POST with a signed `logout_token`. https on a public host; for apps that sign people in with a redirect","example":"https://app.acme.example/auth/backchannel-logout"},"backchannel_logout_session_required":{"type":"boolean","description":"Whether the logout token and ID tokens carry `sid`, the session that ended. On by default"},"client_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's home page, shown on the consent screen"},"logo_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's logo, shown on the consent screen"},"policy_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's privacy policy, linked from the consent screen"},"tos_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's terms of service, linked from the consent screen"},"initiate_login_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"Where the app starts a sign-in on its own (OpenID Connect's third-party-initiated login): the brand's signed-out page links to it as \"Sign in again\". `client_uri` is its \"Back to\" link","example":"https://shop.acme.example/login"},"jwks_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"For private_key_jwt: where the app's keys are"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","private_key_jwt"],"description":"How a web or machine app authenticates; client_secret_basic by default"},"first_party":{"type":"boolean","description":"The brand's own app: people aren't asked to consent to it"},"pkce_optional":{"type":"boolean","description":"A web app may skip PKCE (not recommended); public apps never can"},"own_ui_sign_in":{"type":"boolean","description":"The app signs people in on its own screens, with a password, an emailed code or a passkey, through the issuer's `/authorize-challenge` (OAuth 2.0 for First-Party Applications), rather than sending them to the hosted page. For the brand's own web or native apps only (`first_party`), and off by default: the app's code then sees the passwords and codes people type. Turning `first_party` off turns this off too"},"spa_refresh_tokens":{"type":"boolean","description":"A SPA may hold refresh tokens (off by default)"},"sign_in_methods":{"type":["array","null"],"items":{"anyOf":[{"type":"string","enum":["email","password","passkey","wallet","google","github","microsoft","apple","facebook","x","discord","telegram","matrica"]},{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"One of the brand's own sign-in providers, by its id","example":"custom-acme-guild"}],"description":"A way to sign in: built-in (`email`, `password`, `passkey`, `wallet`), one of Synq's upstream providers (`google`, `github`…), or one of the brand's own by its `custom-…` id","example":"custom-acme-guild"},"minItems":1,"maxItems":32,"description":"The ways to sign in this app takes, of those its brand offers: built-in (`email`, `password`, `passkey`, `wallet`), Synq's upstream providers (`github`, `google`…), or the brand's own OpenID Connect and OAuth 2.0 providers by their `custom-…` ids (`…/custom-sign-in-providers`). Its sign-ins offer only these, on the hosted page and its own screens (`method_unavailable` otherwise), sign up and add ways in with only these, and a session the brand has from another way signs in again with one of these first, on a page that says so. For an app that takes GitHub and Google alone, say, to tie each person to one of those accounts, or an emailed code and the brand's own provider alone. A `custom-…` id that isn't one of the brand's own providers, or names a provider your app verifies (never a way to sign in), is refused at its place in `errors`; deleting a provider takes it off every app's list. Null, the default, takes every way the brand offers, its own providers included. Recorded in `app.updated`; not for a machine app, which signs no one in","example":["email","custom-acme-guild"]},"test_sign_ins":{"type":"boolean","description":"Offer test sign-ins (`test`), on Synq's stages other than production only: a made-up GitHub or Google account, which your end-to-end tests describe (its age, its public repositories, a Workspace domain…), on the hosted page or headless through `/authorize-challenge`. Every account it makes says `test: true` in `linked_accounts`, its subject starts `test-`, and its address is never verified. Off by default; never for a machine app. Production refuses it (`validation_failed`)"},"sign_in_claims":{"type":"boolean","description":"Its ID tokens say how each sign-in went: `sign_in_method` (the way in: `google`, `wallet`, `email`, `password`, `passkey`…), `sign_in_wallet` (for a wallet sign-in, `{ address, app }`: the address that signed and the wallet app’s name as it announced itself, or null) and `new_user` (true in the first ID token of the sign-in that made the account, for the app it was made for; false in every other). They describe the sign-in the ID token’s `auth_time` names, so a refresh’s ID token says the same, but `new_user` is false there. In ID tokens alone, never at userinfo. For the brand’s own apps only (`first_party`), and off by default: another party’s app learns a wallet’s address only through a scope the person allows. Not for a machine app, which signs no one in. Turning `first_party` off turns this off too"},"refresh_token_reuse_window_seconds":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds after a refresh token is rotated during which the same refresh token, presented again by this app, gets back the very tokens its rotation gave (the same refresh, access and ID tokens) instead of ending its grant. For an app on several servers or processes (Vercel, replicas) whose requests may refresh at once. 0, the default, is no window: a rotated refresh token presented again ends its grant. Nothing comes back after the person's sessions are ended or the grant is revoked, and a replay must ask for the scope and resource the rotation did. Each replay is counted and recorded as `app.refresh_token_replayed`, since inside the window a reused token isn't caught as stolen. 0 to 60, for web apps only: a replay still needs the app's secret. A public app (SPA, native, agent) has no secret, so a thief replaying a stolen refresh token inside the window would get the new tokens, and it can't have one; nor can a machine app, which gets no refresh tokens","example":30}},"required":["name","app_type"],"additionalProperties":false},"AppQuickstart":{"type":"object","properties":{"app_id":{"type":"string","description":"The app's id","example":"app_01h455vb4pex5vsknk084sn02q"},"app_type":{"type":"string","x-extensible-enum":["web","spa","native","m2m","agent"],"description":"The app's type, which decides what the quickstart shows","example":"web"},"issuer":{"type":"string","description":"The brand's issuer, which the app signs in with"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/QuickstartBlock"},"description":"The steps, in order: what to install and the values to set"}},"required":["app_id","app_type","issuer","blocks"]},"QuickstartBlock":{"type":"object","properties":{"title":{"type":"string","description":"What the block is","example":"Install"},"file":{"type":["string","null"],"description":"The file it goes in, when it is one","example":".env.local"},"code":{"type":"string","description":"The command to run, or what to put in the file","example":"pnpm add @synqauth/nextjs @synqauth/react"},"note":{"type":["string","null"],"description":"Why it's there, when the code alone doesn't say"}},"required":["title","file","code","note"]},"AppUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The app's name, which people see when they sign in and consent"},"redirect_uris":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Matched exactly, port included. https; a web app or SPA may also use https on localhost, 127.0.0.1 or [::1] (a dev server on a laptop), and a native app http://localhost or http://127.0.0.1 on any port, or a scheme of its own: a reverse domain name it owns, in lowercase, such as com.example.app:/callback (RFC 8252). A native app is public and always uses PKCE."},"post_logout_redirect_uris":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Where the issuer may send someone after the app signs them out, matched exactly like redirect URIs"},"backchannel_logout_uri":{"type":["string","null"],"maxLength":2048,"description":"Where the issuer tells the app's server that someone signed out (OpenID Connect Back-Channel Logout): a POST with a signed `logout_token`. https on a public host; for apps that sign people in with a redirect","example":"https://app.acme.example/auth/backchannel-logout"},"backchannel_logout_session_required":{"type":"boolean","description":"Whether the logout token and ID tokens carry `sid`, the session that ended. On by default"},"client_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's home page, shown on the consent screen"},"logo_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's logo, shown on the consent screen"},"policy_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's privacy policy, linked from the consent screen"},"tos_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"The app's terms of service, linked from the consent screen"},"initiate_login_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"Where the app starts a sign-in on its own (OpenID Connect's third-party-initiated login): the brand's signed-out page links to it as \"Sign in again\". `client_uri` is its \"Back to\" link","example":"https://shop.acme.example/login"},"jwks_uri":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"For private_key_jwt: where the app's keys are"},"token_endpoint_auth_method":{"type":"string","enum":["client_secret_basic","client_secret_post","private_key_jwt"],"description":"How a web or machine app authenticates; client_secret_basic by default"},"first_party":{"type":"boolean","description":"The brand's own app: people aren't asked to consent to it"},"pkce_optional":{"type":"boolean","description":"A web app may skip PKCE (not recommended); public apps never can"},"own_ui_sign_in":{"type":"boolean","description":"The app signs people in on its own screens, with a password, an emailed code or a passkey, through the issuer's `/authorize-challenge` (OAuth 2.0 for First-Party Applications), rather than sending them to the hosted page. For the brand's own web or native apps only (`first_party`), and off by default: the app's code then sees the passwords and codes people type. Turning `first_party` off turns this off too"},"spa_refresh_tokens":{"type":"boolean","description":"A SPA may hold refresh tokens (off by default)"},"sign_in_methods":{"type":["array","null"],"items":{"anyOf":[{"type":"string","enum":["email","password","passkey","wallet","google","github","microsoft","apple","facebook","x","discord","telegram","matrica"]},{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"One of the brand's own sign-in providers, by its id","example":"custom-acme-guild"}],"description":"A way to sign in: built-in (`email`, `password`, `passkey`, `wallet`), one of Synq's upstream providers (`google`, `github`…), or one of the brand's own by its `custom-…` id","example":"custom-acme-guild"},"minItems":1,"maxItems":32,"description":"The ways to sign in this app takes, of those its brand offers: built-in (`email`, `password`, `passkey`, `wallet`), Synq's upstream providers (`github`, `google`…), or the brand's own OpenID Connect and OAuth 2.0 providers by their `custom-…` ids (`…/custom-sign-in-providers`). Its sign-ins offer only these, on the hosted page and its own screens (`method_unavailable` otherwise), sign up and add ways in with only these, and a session the brand has from another way signs in again with one of these first, on a page that says so. For an app that takes GitHub and Google alone, say, to tie each person to one of those accounts, or an emailed code and the brand's own provider alone. A `custom-…` id that isn't one of the brand's own providers, or names a provider your app verifies (never a way to sign in), is refused at its place in `errors`; deleting a provider takes it off every app's list. Null, the default, takes every way the brand offers, its own providers included. Recorded in `app.updated`; not for a machine app, which signs no one in","example":["email","custom-acme-guild"]},"test_sign_ins":{"type":"boolean","description":"Offer test sign-ins (`test`), on Synq's stages other than production only: a made-up GitHub or Google account, which your end-to-end tests describe (its age, its public repositories, a Workspace domain…), on the hosted page or headless through `/authorize-challenge`. Every account it makes says `test: true` in `linked_accounts`, its subject starts `test-`, and its address is never verified. Off by default; never for a machine app. Production refuses it (`validation_failed`)"},"sign_in_claims":{"type":"boolean","description":"Its ID tokens say how each sign-in went: `sign_in_method` (the way in: `google`, `wallet`, `email`, `password`, `passkey`…), `sign_in_wallet` (for a wallet sign-in, `{ address, app }`: the address that signed and the wallet app’s name as it announced itself, or null) and `new_user` (true in the first ID token of the sign-in that made the account, for the app it was made for; false in every other). They describe the sign-in the ID token’s `auth_time` names, so a refresh’s ID token says the same, but `new_user` is false there. In ID tokens alone, never at userinfo. For the brand’s own apps only (`first_party`), and off by default: another party’s app learns a wallet’s address only through a scope the person allows. Not for a machine app, which signs no one in. Turning `first_party` off turns this off too"},"refresh_token_reuse_window_seconds":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds after a refresh token is rotated during which the same refresh token, presented again by this app, gets back the very tokens its rotation gave (the same refresh, access and ID tokens) instead of ending its grant. For an app on several servers or processes (Vercel, replicas) whose requests may refresh at once. 0, the default, is no window: a rotated refresh token presented again ends its grant. Nothing comes back after the person's sessions are ended or the grant is revoked, and a replay must ask for the scope and resource the rotation did. Each replay is counted and recorded as `app.refresh_token_replayed`, since inside the window a reused token isn't caught as stolen. 0 to 60, for web apps only: a replay still needs the app's secret. A public app (SPA, native, agent) has no secret, so a thief replaying a stolen refresh token inside the window would get the new tokens, and it can't have one; nor can a machine app, which gets no refresh tokens","example":30}},"additionalProperties":false},"SecretRotation":{"type":"object","properties":{"overlap_seconds":{"type":"integer","minimum":0,"maximum":604800,"default":86400,"description":"How long the current secret keeps working beside the new one: a day by default, up to 7 days; 0 ends it now"}},"additionalProperties":false},"AppSetupCode":{"type":"object","properties":{"code":{"type":"string","description":"Whoever has it can set a project up with the app, once, within 60 minutes: `npx synqauth init --code <code>`. Shown once, here.","example":"synq_setup_…"},"expires_at":{"type":"string","format":"date-time","description":"When it stops working"}},"required":["code","expires_at"]},"RedeemedSetupCode":{"type":"object","properties":{"org":{"type":"object","properties":{"id":{"type":"string","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"slug":{"type":"string","description":"The org's slug","example":"acme"},"name":{"type":"string","description":"The org's name","example":"Acme"}},"required":["id","slug","name"],"description":"The org the app is in"},"brand":{"type":"object","properties":{"id":{"type":"string","description":"The brand's id"},"name":{"type":"string","description":"The brand's name","example":"Acme"}},"required":["id","name"],"description":"The brand the app signs people in to"},"issuer":{"type":"string","description":"The brand's issuer: `SYNQ_ISSUER`.","example":"https://acme.auth.synq.build"},"app":{"type":"object","properties":{"client_id":{"type":"string","description":"The app's client_id: `SYNQ_CLIENT_ID`"},"client_secret":{"type":"string","description":"The app's new secret, `SYNQ_CLIENT_SECRET`, shown once: here, and never again. The one it had keeps working for a day."},"name":{"type":"string","description":"The app's name"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"The app's redirect URIs"}},"required":["client_id","client_secret","name","redirect_uris"],"description":"The app"}},"required":["org","brand","issuer","app"]},"SetupCodeRedeem":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":200,"description":"The setup code the dashboard showed, `synq_setup_…`","example":"synq_setup_…"},"redirect_uris":{"type":"array","items":{"type":"string","format":"uri","example":"https://localhost:3000/api/auth/callback"},"minItems":1,"maxItems":5,"description":"The project's dev server's redirect URIs, https on a loopback address only (`localhost`, `127.0.0.1`, `[::1]`) with its port: the app gets those it lacks."},"post_logout_redirect_uris":{"type":"array","items":{"type":"string","format":"uri","example":"https://localhost:3000/api/auth/callback"},"maxItems":5,"default":[],"description":"https on a loopback address only, as `redirect_uris`."}},"required":["code","redirect_uris"],"additionalProperties":false},"AppSetupEmail":{"type":"object","properties":{"to":{"type":"string","description":"Where it went: the calling person's own verified address","example":"ada@example.com"},"setup_url":{"type":"string","format":"uri","description":"The link it carries: the app's setup on Synq's dashboard, which asks the person to sign in","example":"https://dashboard.synq.build/orgs/org_01h455vb4pex5vsknk084sn02q/get-started?brand=brd_01h455vb4pex5vsknk084sn02r&app=app_01h455vb4pex5vsknk084sn02s"}},"required":["to","setup_url"]},"ApprovalRequest":{"type":"object","properties":{"id":{"type":"string","description":"The request's id","example":"apr_01h455vb4pex5vsknk084sn02q"},"kind":{"type":"string","x-extensible-enum":["app.redirect_uris","app.sign_in_method","app.create","brand.create","org.invite","org.api_key","configuration.update","bundle"],"description":"What it changes, as it was asked: the `kind` of its ask","example":"app.redirect_uris"},"target":{"type":"object","properties":{"brand_id":{"type":["string","null"],"description":"The brand it changes, or null"},"app_id":{"type":["string","null"],"description":"The app it changes, or null"}},"required":["brand_id","app_id"],"description":"What it changes; null where the kind has no such target"},"change":{"type":"object","additionalProperties":{},"description":"What approving sets, as the route that makes it takes it: `redirect_uris` (`app.redirect_uris`); `sign_in_methods`, the app’s whole list, or `test_sign_ins` (`app.sign_in_method`); `name`, `app_type`, `redirect_uris` and `post_logout_redirect_uris` (`app.create`); `email` and `role` (`org.invite`); `name`, `permissions`, `expires_at` and `ip_allowlist` (`org.api_key`)","example":{"redirect_uris":["https://acme.example/callback"]}},"title":{"type":"string","description":"What the change is called, as the approval page titles it: its own words for each kind and operation, such as \"Make a token gate\" or \"Announce a Discord window\"","example":"Make a token gate"},"preview":{"type":"string","description":"What approving does, in plain words, from what was there when it was asked: what changes, by the names people know it by, who it affects and how to undo it. What the dashboard shows the person, and what the MCP host tells them","example":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback."},"details":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalRequestDetail"},"description":"Exactly what approving sets, field by field, in words: each field of `change`, by what it is called, with its values said with names rather than ids or JSON. What the approval page lists under \"Exactly what it sets\". Empty for a bundle, whose changes each say theirs"},"changes":{"type":["array","null"],"items":{"type":"object","properties":{"kind":{"type":"string","x-extensible-enum":["app.redirect_uris","app.sign_in_method","app.create","brand.create","org.invite","org.api_key","configuration.update","bundle"],"description":"What it changes, as it was asked: the `kind` of its ask"},"operation":{"type":["string","null"],"description":"Its configuration operation, for a `configuration.update`; null otherwise"},"target":{"type":"object","properties":{"brand_id":{"type":["string","null"],"description":"The brand it changes, or null"},"app_id":{"type":["string","null"],"description":"The app it changes, or null"}},"required":["brand_id","app_id"],"description":"What it changes"},"title":{"type":"string","description":"What the change is called"},"preview":{"type":"string","description":"What it does, in plain words"},"details":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalRequestDetail"},"description":"Exactly what it sets, field by field, in words, as `details` says it"},"result":{"type":["object","null"],"properties":{"app_id":{"type":["string","null"],"description":"The app it made, or null"},"resource_id":{"type":["string","null"],"description":"What else it made or changed, or null"}},"required":["app_id","resource_id"],"description":"What approving it made, once approved; null before"}},"required":["kind","operation","target","title","preview","details","result"]},"description":"For a bundle (`kind: bundle`): each change it holds, in the order approving makes them, all of them or none, each with its own title, preview and fields. Null for a single change"},"hash":{"type":"string","description":"SHA-256 (hex) of the kind, target, change and preview: approving names it, so an approval covers exactly what was shown","example":"9f2c6a…"},"status":{"type":"string","x-extensible-enum":["awaiting_approval","approved","declined","expired","cancelled"],"description":"`awaiting_approval` until the person decides; then `approved` or `declined`, or `expired` once 15 minutes pass with no decision, or `cancelled` when Synq ended it first (`reason` says why: the brand it names moved to another org)","example":"awaiting_approval"},"reason":{"type":["string","null"],"description":"Why Synq cancelled it, in plain words; null otherwise"},"last_refusal":{"type":["object","null"],"properties":{"code":{"type":"string","description":"The change's own route's problem code, such as `plan_feature_unavailable`","example":"plan_feature_unavailable"},"detail":{"type":"string","description":"What the route said, with the fix"},"at":{"type":"string","format":"date-time","description":"When approving it was refused"}},"required":["code","detail","at"],"description":"The last time approving it was refused by the change's own route (a plan without the feature, a name taken since it was asked): the request waited again, and nothing changed. Null when approving never was refused"},"asked_from":{"type":["string","null"],"description":"The client_id of the MCP host's app it was asked from"},"asked_from_name":{"type":["string","null"],"description":"The name of the app it was asked from, as that app gave it to Synq's sign-in (an MCP host such as Claude: its registration's `client_name`, or its client ID metadata document's): the app's own word, never Synq's. Null when it was asked from no app, or from one Synq can't name","example":"Claude"},"approve_url":{"type":["string","null"],"description":"Where the person approves or declines it, in the dashboard: only while it awaits approval"},"applied_at_once":{"type":"boolean","description":"Whether it was made when it was asked, with no approval: the default for a change that doesn’t always ask, unless the org requires approval for every AI agent change or the person asks to approve theirs. Its status is `approved`, and its change is recorded in the audit log as made by the agent for the person, naming this request as `approval_id`","example":false},"asks_because":{"type":"string","x-extensible-enum":["approvals_on","money_or_people","sign_in_security","shows_secret"],"description":"Why it waits, or waited, for the person to approve it: `approvals_on`, their org requires approval for every AI agent change or they asked to approve theirs; `money_or_people`, a change to money or people, which always asks; `sign_in_security`, a change to where sign-ins and sign-outs go, how an app proves itself, a domain, or a sign-in protection turned off, which always asks; `shows_secret`, it makes a secret only they should see, which shows once on its approval page. Null for one applied at once","example":"sign_in_security"},"fresh_sign_in":{"type":"boolean","description":"Whether approving it takes a fresh sign-in: a change to money or people does (billing and plans, inviting or removing members, roles, API keys, and deleting or moving a brand), and so does one to sign-in security (an app’s redirect and sign-out addresses and how it proves itself, custom sign-in, sending and verified domains, and turning a sign-in protection off). Fresh is from the last 5 minutes, or within the approval window an earlier approval opened in the same dashboard session, for 2 hours after the sign-in it relied on (`GET /v1/approval-window`); otherwise the dashboard asks the person to sign in again first. Any other change is approved with the session they have","example":false},"relied_on_sign_in":{"type":["object","null"],"properties":{"signed_in_at":{"type":"string","format":"date-time","description":"When the person signed in, in the sign-in approving it relied on"},"within_window":{"type":"boolean","description":"Whether that sign-in was more than 5 minutes old, so approving went through on the approval window an earlier approval opened in the same dashboard session, rather than on a sign-in from the last 5 minutes","example":false}},"required":["signed_in_at","within_window"],"description":"The fresh sign-in approving it relied on, for a change that took one (`fresh_sign_in`, or a change whose own route wants a recent sign-in): null for one that took none, and until it is approved"},"result":{"type":["object","null"],"properties":{"app_id":{"type":["string","null"],"description":"The app it made, or null"},"invite_id":{"type":["string","null"],"description":"The invitation it sent, or null"},"key_id":{"type":["string","null"],"description":"The API key it made, or null"},"resource_id":{"type":["string","null"],"description":"What else it made or changed, such as a brand, or null"}},"required":["app_id","invite_id","key_id","resource_id"],"description":"What approving made: the new app, the invitation sent, or the new API key"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When it expires unless the person decides first: null for one made at once (`applied_at_once`), which never waited"},"decided_at":{"type":["string","null"],"format":"date-time","description":"When the person approved or declined it, or null"},"created_at":{"type":"string","format":"date-time","description":"When it was asked for"}},"required":["id","kind","target","change","title","preview","details","changes","hash","status","reason","last_refusal","asked_from","asked_from_name","approve_url","applied_at_once","asks_because","fresh_sign_in","relied_on_sign_in","result","expires_at","decided_at","created_at"]},"ApprovalRequestDetail":{"type":"object","properties":{"field":{"type":"string","description":"The field of `change` it is, as the change’s route names it","example":"redirect_uris"},"label":{"type":"string","description":"What the field is called, in words","example":"Redirect URIs"},"values":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"One value it gets, in words, with names rather than ids","example":"https://acme.example/callback"},"code":{"type":"boolean","description":"Whether it is a value to read exactly, such as an address or a scope, which the dashboard sets in a fixed-width font"},"tag":{"type":"string","x-extensible-enum":["new","kept"],"description":"In a list approving replaces: `new` for a value it adds, `kept` for one there already; null otherwise"}},"required":["text","code","tag"]},"description":"Each value the field gets, in order"}},"required":["field","label","values"]},"ApprovalRequestCreate":{"oneOf":[{"$ref":"#/components/schemas/ApprovalRequestRedirectUris"},{"$ref":"#/components/schemas/ApprovalRequestAppSignInMethod"},{"$ref":"#/components/schemas/ApprovalRequestAppCreate"},{"$ref":"#/components/schemas/ApprovalRequestBrandCreate"},{"$ref":"#/components/schemas/ApprovalRequestInvite"},{"$ref":"#/components/schemas/ApprovalRequestApiKey"},{"$ref":"#/components/schemas/ApprovalRequestConfiguration"}],"discriminator":{"propertyName":"kind","mapping":{"app.redirect_uris":"#/components/schemas/ApprovalRequestRedirectUris","app.sign_in_method":"#/components/schemas/ApprovalRequestAppSignInMethod","app.create":"#/components/schemas/ApprovalRequestAppCreate","brand.create":"#/components/schemas/ApprovalRequestBrandCreate","org.invite":"#/components/schemas/ApprovalRequestInvite","org.api_key":"#/components/schemas/ApprovalRequestApiKey","configuration.update":"#/components/schemas/ApprovalRequestConfiguration"}}},"ApprovalRequestRedirectUris":{"type":"object","properties":{"kind":{"type":"string","enum":["app.redirect_uris"],"description":"Set an app's redirect URIs"},"brand_id":{"type":"string","description":"The brand it changes, `brd_…`","example":"brd_01h455vb4pex5vsknk084sn02q"},"app_id":{"type":"string","description":"The app it changes, `app_…`","example":"app_01h455vb4pex5vsknk084sn02q"},"redirect_uris":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":20,"description":"The app's redirect URIs as they will be: the whole list"}},"required":["kind","brand_id","app_id","redirect_uris"],"additionalProperties":false},"ApprovalRequestAppSignInMethod":{"type":"object","properties":{"kind":{"type":"string","enum":["app.sign_in_method"],"description":"Have an app take, or stop taking, a way to sign in"},"brand_id":{"type":"string","description":"The brand it changes, `brd_…`","example":"brd_01h455vb4pex5vsknk084sn02q"},"app_id":{"type":"string","description":"The app it changes, `app_…`","example":"app_01h455vb4pex5vsknk084sn02q"},"method":{"anyOf":[{"type":"string","enum":["email","password","passkey","wallet","google","github","microsoft","apple","facebook","x","discord","telegram","matrica","test"]},{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"One of the brand's own sign-in providers, by its id","example":"custom-acme-guild"}],"description":"A way to sign in the app takes or stops taking (a built-in way, one of Synq's upstream providers, or one of the brand's own by its `custom-…` id), or `test`, its test sign-ins: made-up accounts for its end-to-end tests, on every stage but production","example":"github"},"enabled":{"type":"boolean","description":"Whether the app takes it"}},"required":["kind","brand_id","app_id","method","enabled"],"additionalProperties":false},"ApprovalRequestAppCreate":{"type":"object","properties":{"kind":{"type":"string","enum":["app.create"],"description":"Make an app in a brand"},"brand_id":{"type":"string","description":"The brand it changes, `brd_…`","example":"brd_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The app's name, as people see it","example":"Acme web"},"app_type":{"type":"string","enum":["web","spa","native","m2m","agent"],"description":"What kind of app: `web`, `spa`, `native`, `m2m` or `agent`","example":"web"},"redirect_uris":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":20,"description":"Where sign-ins come back to, as the apps route takes them"},"post_logout_redirect_uris":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":20,"description":"Where the issuer may send someone after the app signs them out"}},"required":["kind","brand_id","name","app_type"],"additionalProperties":false},"ApprovalRequestBrandCreate":{"type":"object","properties":{"kind":{"type":"string","enum":["brand.create"],"description":"Make a brand in the org"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The brand's name, as people see it","example":"Acme"},"issuer_slug":{"type":"string","minLength":3,"maxLength":63,"description":"The brand's issuer slug: permanent, and never used again once the brand is gone","example":"acme"}},"required":["kind","name","issuer_slug"],"additionalProperties":false},"ApprovalRequestInvite":{"type":"object","properties":{"kind":{"type":"string","enum":["org.invite"],"description":"Invite someone to the org"},"email":{"type":"string","maxLength":254,"format":"email","description":"Who to invite","example":"ana@acme.example"},"role":{"type":"string","maxLength":64,"description":"`admin`, `billing`, `member`, or one of the org’s own roles (`rol_…`); never `owner`","example":"admin"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/BrandRoleInput"},"maxItems":100,"description":"What they may do in the org's brands: a role per brand, or on All brands, at most one for each; a brand with none is one they can't reach. Never more than the caller has there. Left out, their org role's: Brand admin on All brands for an admin, Viewer for a member, nothing for billing"}},"required":["kind","email","role"],"additionalProperties":false},"BrandRoleInput":{"type":"object","properties":{"brand":{"type":["string","null"],"maxLength":64,"description":"A brand of the org (`brd_…`), or null for All brands, those made later included. One brand needs a plan with roles in one brand at a time (Scale and up); All brands is on every plan","example":"brd_01h455vb4pex5vsknk084sn02q"},"role":{"type":"string","maxLength":64,"description":"`brand_admin`, `developer`, `support`, `viewer`, or one of the org’s own roles (`rol_…`)","example":"developer"}},"required":["brand","role"],"additionalProperties":false},"ApprovalRequestApiKey":{"type":"object","properties":{"kind":{"type":"string","enum":["org.api_key"],"description":"Make an API key for the org"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"What the key is for, as the org sees it","example":"Deploys"},"permissions":{"type":"array","items":{"type":"string","enum":["org.read","org.edit","org.delete","org.members.view","org.members.edit","org.ownership.transfer","org.brands.view","org.brands.edit","org.brands.transfer","org.apps.view","org.apps.edit","org.apis.view","org.apis.edit","org.connections.view","org.connections.edit","org.webhooks.view","org.webhooks.edit","org.tokenGates.view","org.tokenGates.edit","org.integrations.view","org.integrations.edit","org.emailDomains.view","org.emailDomains.edit","org.billing.view","org.billing.edit","org.users.view","org.users.edit","org.users.providerTokens.read","org.users.identities.edit","org.users.signInTickets.create","org.apiKeys.view","org.apiKeys.edit","org.auditLog.view","org.auditLog.export","org.sso.view","org.sso.edit"]},"minItems":1,"description":"What it may do: at most what the caller may do in the org"},"expires_at":{"type":"string","format":"date-time","description":"When it stops working; never, when not given"},"ip_allowlist":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50,"description":"The CIDR blocks it may be used from; anywhere, when not given"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyBrandRoleInput"},"minItems":1,"maxItems":100,"description":"What it may do in the org's brands, at most what the caller may do in each. Left out, its `permissions` on All brands, which only the org's owner, or a key for All brands, gives. A key for some brands acts in them alone: across the org it only reads the org (`org.read`)"}},"required":["kind","name","permissions"],"additionalProperties":false},"ApiKeyBrandRoleInput":{"type":"object","properties":{"brand":{"type":["string","null"],"maxLength":64,"description":"A brand of the org (`brd_…`), or null for All brands, those made later included, which only the org's owner gives"},"role":{"type":"string","enum":["brand_admin","developer","support","viewer"],"description":"A built-in brand role: `brand_admin`, `developer`, `support` or `viewer`"},"permissions":{"type":"array","items":{"type":"string","enum":["org.read","org.edit","org.delete","org.members.view","org.members.edit","org.ownership.transfer","org.brands.view","org.brands.edit","org.brands.transfer","org.apps.view","org.apps.edit","org.apis.view","org.apis.edit","org.connections.view","org.connections.edit","org.webhooks.view","org.webhooks.edit","org.tokenGates.view","org.tokenGates.edit","org.integrations.view","org.integrations.edit","org.emailDomains.view","org.emailDomains.edit","org.billing.view","org.billing.edit","org.users.view","org.users.edit","org.users.providerTokens.read","org.users.identities.edit","org.users.signInTickets.create","org.apiKeys.view","org.apiKeys.edit","org.auditLog.view","org.auditLog.export","org.sso.view","org.sso.edit"]},"minItems":1,"description":"A permission set in that brand, in place of a role, each change with its view, as `permissions` takes them"}},"required":["brand"],"additionalProperties":false},"ApprovalRequestConfiguration":{"type":"object","properties":{"kind":{"type":"string","enum":["configuration.update"],"description":"Change the org's configuration, as the dashboard does"},"operation":{"type":"string","enum":["set_theme","set_sign_in_page","set_email","create_api","update_api","set_app_sign_in_methods","set_app_api_access","create_token_gate","update_token_gate","enable_token_gate","disable_token_gate","add_email_domain","check_email_domain","set_sign_in_provider_scopes","finalize_file","change_plan","start_trial","end_trial","create_user","set_user_profile","enable_user","disable_user","revoke_user_sessions","remove_user_passkey","schedule_user_deletion","revoke_user_consent","revoke_user_api_key","set_app_logout_uris","set_app_security","enable_app","disable_app","delete_app","delete_api","create_webhook","update_webhook","delete_webhook","set_brand_sign_in_policy","delete_brand","remove_email_domain","remove_domain","add_custom_domain","remove_custom_domain","update_sign_in_provider","set_org_sign_in_provider_scopes","remove_org_sign_in_provider_app","remove_sign_in_provider_app","update_custom_sign_in_provider","delete_custom_sign_in_provider","create_app_verified_provider","update_app_verified_provider","enable_app_verified_provider","disable_app_verified_provider","delete_app_verified_provider","set_discord_verify_channel","disconnect_discord_server","disconnect_telegram_group","set_telegram_window","announce_telegram_window","extend_telegram_window","move_telegram_window","set_discord_window","announce_discord_window","extend_discord_window","resume_discord_window","resume_telegram_window","remove_own_bot","create_role","update_role","delete_role","update_member","remove_member","end_member_sessions","leave_org","revoke_api_key","rotate_api_key","delete_token_gate","request_brand_transfer","decline_brand_transfer","cancel_brand_transfer","accept_brand_transfer","send_brand_transfer_notice"],"description":"Which change: the MCP tool `get_reference`, with topic `configuration`, lists each with its inputs","example":"set_theme"},"brand_id":{"type":"string","description":"The brand it changes, `brd_…`, when the operation takes one"},"app_id":{"type":"string","description":"The app it changes, `app_…`, when the operation takes one"},"resource_id":{"type":"string","description":"What else it changes, such as an API, a token gate or a file, when the operation takes one"},"item_id":{"type":"string","description":"A second id, under resource_id, when the operation takes one (such as a user's passkey)"},"settings":{"type":"object","additionalProperties":{},"description":"The operation's inputs, as its route takes them"}},"required":["kind","operation","settings"],"additionalProperties":false},"ApprovalRequestPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalRequest"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"ApprovalRequestApproved":{"allOf":[{"$ref":"#/components/schemas/ApprovalRequest"},{"type":"object","properties":{"secret":{"type":["string","null"],"description":"Shown this once: a new web or machine app’s client secret (`app.create`), the new API key itself (`org.api_key`), or a new webhook’s signing secret (`configuration.update`, `create_webhook`); null otherwise. Only its hash or a sealed copy is kept."}},"required":["secret"]}]},"ApprovalRequestApproval":{"type":"object","properties":{"hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The `hash` of the request as the page showed it"}},"required":["hash"],"additionalProperties":false},"OrgAgentApprovals":{"type":"object","properties":{"require_approval":{"type":"boolean","description":"Whether every change its members’ AI agents ask for waits for the member to approve it in the dashboard, \"Require approval for every AI agent change\": off by default, so an ordinary change applies at once","example":false},"your_approvals":{"type":"string","x-extensible-enum":["ask","apply_at_once"],"description":"How the calling person's AI agents' changes are made in this org: `apply_at_once`, the default, each applies when it is asked, recorded in the audit log as made by the agent for them, or `ask`, each waits for them to approve it in the dashboard, because the org requires approval or they asked to approve theirs. Some changes always ask, and take a sign-in from the last 5 minutes to approve: money and people (billing and plans, inviting or removing members, roles, API keys, deleting or moving a brand) and sign-in security (an app’s redirect and sign-out addresses and how it proves itself, custom sign-in, sending and verified domains, turning a sign-in protection off, such as the breached-password check or PKCE, turning a token gate off, deleting it or taking a place off it, and loosening account linking). So does a change that makes a secret only you should see (a web or machine app’s client secret, a webhook’s signing secret), which shows once, on its approval page. Null for an API key, which asks for nothing","example":"apply_at_once"}},"required":["require_approval","your_approvals"]},"OrgAgentApprovalsUpdate":{"type":"object","properties":{"require_approval":{"type":"boolean","description":"Whether every member’s AI agents’ changes wait for the member to approve them. Turning it off wants a sign-in from the last 5 minutes; turning it on asks every member at once","example":true}},"required":["require_approval"],"additionalProperties":false},"AgentApprovals":{"type":"object","properties":{"ask_to_approve":{"type":"boolean","description":"The calling person's own setting, \"Ask me to approve what my agents change\": off unless they turned it on. On, each change their AI agents ask for waits for them to approve it in the dashboard, in every org of theirs","example":false}},"required":["ask_to_approve"]},"AgentApprovalsUpdate":{"type":"object","properties":{"ask_to_approve":{"type":"boolean","description":"Whether the person's AI agents' changes wait for them to approve, in every org of theirs. Turning it off wants a sign-in from the last 5 minutes","example":true}},"required":["ask_to_approve"],"additionalProperties":false},"ApprovalWindow":{"type":"object","properties":{"open":{"type":"boolean","description":"Whether approving in this dashboard session skips signing in again now: true once an approval relied on a fresh sign-in, until 2 hours after it","example":true},"signed_in_at":{"type":["string","null"],"format":"date-time","description":"When the person signed in, in the fresh sign-in that opened it; null when it isn’t open","example":"2026-11-13T09:12:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"When it closes: 2 hours after that sign-in, unless the session ends or signs in again first; null when it isn’t open","example":"2026-11-13T11:12:00.000Z"},"window_seconds":{"type":"integer","description":"How long a window lasts after the sign-in that opens it, in seconds","example":7200}},"required":["open","signed_in_at","ends_at","window_seconds"]},"ConnectedAppPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedApp"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"ConnectedApp":{"type":"object","properties":{"id":{"type":"string","description":"The connection's id, the consent the person gave the app: what disconnecting it takes","example":"cns_01h455vb4pex5vsknk084sn02q"},"client_id":{"type":"string","description":"The app's client_id: the URL of its client ID metadata document, or the id Synq gave it","example":"https://claude.ai/oauth/mcp-oauth-client-metadata"},"name":{"type":["string","null"],"description":"The app's name: its metadata document's when the person last allowed it, or its registration's. Null for a metadata-document app connected before Synq kept the name, which `published_on` names instead","example":"Claude"},"source":{"type":"string","x-extensible-enum":["metadata_document","registered_itself","app"],"description":"Where the name comes from: `metadata_document`, a document published on `published_on`, a host Synq fetches documents from; `registered_itself`, its own registration at Synq (`/reg`), a claim nobody checked; or `app`, one Synq made","example":"metadata_document"},"published_on":{"type":["string","null"],"description":"The host its metadata document is published on, such as claude.ai: who vouches for the name. Null for an app without one","example":"claude.ai"},"scopes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The scope","example":"synq.read"},"description":{"type":"string","description":"What it lets the app do, in the consent page’s words","example":"See your orgs as your role lets you: brands, apps, users, sign-in settings, token gates, communities, webhooks, billing and the audit log"}},"required":["name","description"]},"description":"What the person allowed it, each scope in plain words"},"may_change":{"type":"boolean","description":"Whether the person let it make changes (`synq.write`), each made as `approvals` says; false for one that only reads","example":true},"approvals":{"type":"array","items":{"type":"object","properties":{"org_id":{"type":"string","description":"One of the person’s orgs","example":"org_01h455vb4pex5vsknk084sn02q"},"approvals":{"type":"string","x-extensible-enum":["ask","apply_at_once"],"description":"How the changes it asks for are made there: `apply_at_once`, the default, each applies when it is asked, or `ask`, each waits for the person to approve it in the dashboard, because the org requires approval for every AI agent change or the person asks to approve theirs. It is the same for every AI agent of theirs: the person's own `ask_to_approve` and the org's `require_approval` decide it","example":"apply_at_once"}},"required":["org_id","approvals"]},"description":"How its changes are made in each org the person is in, oldest org first; empty when it only reads. Some changes always ask, and take a sign-in from the last 5 minutes to approve: money and people (billing and plans, inviting or removing members, roles, API keys, deleting or moving a brand) and sign-in security (an app’s redirect and sign-out addresses and how it proves itself, custom sign-in, sending and verified domains, turning a sign-in protection off, such as the breached-password check or PKCE, turning a token gate off, deleting it or taking a place off it, and loosening account linking). So does a change that makes a secret only you should see (a web or machine app’s client secret, a webhook’s signing secret), which shows once, on its approval page."},"connected_at":{"type":"string","format":"date-time","description":"When the person first allowed it, since they last disconnected it"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When it last got tokens for the person, to the minute: an MCP host renews its 10-minute token as it works, so this is within 10 minutes of its last call. Null until it first does"},"current":{"type":"boolean","description":"Whether the calling credential was issued to this app: an MCP host reading its own connection","example":false}},"required":["id","client_id","name","source","published_on","scopes","may_change","approvals","connected_at","last_used_at","current"]},"ApiPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Api"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Api":{"type":"object","properties":{"id":{"type":"string","description":"The API's id","example":"api_01h455vb4pex5vsknk084sn02q"},"brand_id":{"type":"string","description":"The brand the API belongs to"},"identifier":{"type":"string","description":"Its tokens' audience (`aud`), and the `resource` apps ask for","example":"https://api.acme.example"},"name":{"type":"string","description":"The API's name, for people"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"},"description":"The scopes apps may ask for in its tokens"},"access_token_ttl":{"type":"integer","description":"Seconds, 300 to 900"},"allow_third_party":{"type":"boolean","description":"Whether apps that aren't the brand's own may ask for its scopes, after the person consents"},"allow_user_api_keys":{"type":"boolean","description":"Whether the brand's users may make API keys for it, which its own app checks at the issuer's `POST /api-keys/verify`"},"client_id":{"type":["string","null"],"description":"The app that may introspect this API's tokens, and check its users' API keys"},"identity_claims":{"type":"array","items":{"type":"string","enum":["email","email_verified","linked_accounts","wallets"]},"description":"Who the person is, beyond `sub`, in this API's access tokens and in its API key checks (`POST /api-keys/verify`): `email`, `email_verified`, `linked_accounts`, the person's accounts at upstream providers with what each says of the account (a GitHub account's age, Google's `email_verified`), and `wallets`, their wallets as `{ address, chain, primary }`, primary first, at most 10 in a token with `wallets_truncated: true` when they have more (every one in a key check). A wallet's address is personal data: name it only when your API authorizes by wallet. An app that isn't the brand's own asks the person first, on a consent page that names them","example":["email_verified","linked_accounts"]},"created_at":{"type":"string","format":"date-time","description":"When the API was registered"}},"required":["id","brand_id","identifier","name","scopes","access_token_ttl","allow_third_party","allow_user_api_keys","client_id","identity_claims","created_at"]},"Scope":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9:._-]{1,64}$","description":"The scope's name, as apps ask for it","example":"reports.read"},"description":{"type":"string","minLength":1,"maxLength":200,"description":"What the consent page says the scope lets an app do","example":"Read your reports"}},"required":["name","description"]},"ApiCreate":{"type":"object","properties":{"identifier":{"type":"string","maxLength":512,"description":"The API's identifier, the `aud` of its access tokens and the `resource` apps ask for it by: usually its URL. It never changes"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"The API's name, for people"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"},"maxItems":100,"default":[],"description":"The scopes apps may ask for in its tokens"},"access_token_ttl":{"type":"integer","minimum":300,"maximum":900,"description":"600 by default"},"allow_third_party":{"type":"boolean","description":"Whether apps that aren't the brand's own may ask for its scopes, after the person consents. Off by default"},"identity_claims":{"type":"array","items":{"type":"string","enum":["email","email_verified","linked_accounts","wallets"]},"maxItems":4,"description":"Who the person is in its tokens and key checks, beyond `sub`; none by default"}},"required":["identifier","name"],"additionalProperties":false},"ApiUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The API's name, for people"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"},"maxItems":100,"description":"The whole list: a scope left out is also taken from every app allowed it"},"access_token_ttl":{"type":"integer","minimum":300,"maximum":900,"description":"How long its access tokens last, in seconds"},"allow_third_party":{"type":"boolean","description":"Whether apps that aren't the brand's own may ask for its scopes, after the person consents"},"allow_user_api_keys":{"type":"boolean","description":"Let the brand's users make API keys for it. Needs the API's own app (`client_id`), which alone checks them. Turning it off revokes every key its users made, for good."},"client_id":{"type":["string","null"],"description":"One of the brand's web or machine apps, or null"},"identity_claims":{"type":"array","items":{"type":"string","enum":["email","email_verified","linked_accounts","wallets"]},"maxItems":4,"description":"The whole list of identity claims in its tokens and key checks; an empty list for none"}},"additionalProperties":false},"ApiAccessPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AppApiAccess"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"AppApiAccess":{"type":"object","properties":{"api_id":{"type":"string","description":"The API's id"},"identifier":{"type":"string","description":"The API's identifier"},"scopes":{"type":"array","items":{"type":"string"},"description":"The API's scopes the app may ask for"}},"required":["api_id","identifier","scopes"]},"AppApiAccessUpdate":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"The API's scopes the app may ask for: the rest are refused to it"}},"required":["scopes"],"additionalProperties":false},"ApiKeyPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string","description":"The key's id, never the key itself","example":"key_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"What the key is for, such as the server that uses it"},"prefix":{"type":"string","description":"The start of the key, to tell keys apart","example":"sk_live_Ab3d"},"permissions":{"type":"array","items":{"type":"string"},"description":"What it may do across the org: at most what its maker could"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyBrandRole"},"description":"What it may do in the org's brands: a role or a permission set per brand, or on All brands. A brand it holds none in reads as not there to it"},"ip_allowlist":{"type":["array","null"],"items":{"type":"string"},"description":"The CIDR blocks it may be used from; null for anywhere"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When it stops working by itself, or null for never"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"When it was revoked, or null while it works"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When it last authenticated a request, or null for never"},"created_by":{"type":["string","null"],"description":"Who made it: a member's user id (`usr_…`) or the API key that made it (`key_…`); null if unknown"},"created_at":{"type":"string","format":"date-time","description":"When the key was made"},"replaced_by":{"type":["string","null"],"description":"The key a rotation made to replace it (`key_…`), or null: once set, `expires_at` is the end of the overlap, and the key is never rotated again","example":"key_01h455vb4pex5vsknk084sn02q"},"replaces":{"type":["string","null"],"description":"The key it was made to replace by a rotation (`key_…`), or null","example":"key_01h455vb4pex5vsknk084sn02q"}},"required":["id","name","prefix","permissions","brand_roles","ip_allowlist","expires_at","revoked_at","last_used_at","created_by","created_at","replaced_by","replaces"]},"ApiKeyBrandRole":{"type":"object","properties":{"brand":{"type":["string","null"],"description":"The brand (`brd_…`), or null for All brands, those made later included"},"role":{"type":["string","null"],"description":"`brand_admin`, `developer`, `support` or `viewer`; null where it holds a permission set"},"permissions":{"type":"array","items":{"type":"string"},"description":"What it may do in that brand"}},"required":["brand","role","permissions"]},"NewApiKey":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"type":"object","properties":{"key":{"type":"string","description":"The key itself, shown this once. Only its hash is kept."}},"required":["key"]}]},"ApiKeyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"What the key is for, such as the server that uses it","example":"Deploys"},"permissions":{"type":"array","items":{"type":"string","enum":["org.read","org.edit","org.delete","org.members.view","org.members.edit","org.ownership.transfer","org.brands.view","org.brands.edit","org.brands.transfer","org.apps.view","org.apps.edit","org.apis.view","org.apis.edit","org.connections.view","org.connections.edit","org.webhooks.view","org.webhooks.edit","org.tokenGates.view","org.tokenGates.edit","org.integrations.view","org.integrations.edit","org.emailDomains.view","org.emailDomains.edit","org.billing.view","org.billing.edit","org.users.view","org.users.edit","org.users.providerTokens.read","org.users.identities.edit","org.users.signInTickets.create","org.apiKeys.view","org.apiKeys.edit","org.auditLog.view","org.auditLog.export","org.sso.view","org.sso.edit"]},"minItems":1,"description":"What it may do: at most what the caller may do in the org. Each permission that changes something comes with the one that reads it, as in every built-in role: `org.brands.edit` gives `org.brands.view` too, and `org.edit` gives `org.read`"},"expires_at":{"type":"string","format":"date-time","description":"When it stops working; never, when not given"},"ip_allowlist":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50,"description":"The CIDR blocks it may be used from; anywhere, when not given"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyBrandRoleInput"},"minItems":1,"maxItems":100,"description":"What it may do in the org's brands, at most what the caller may do in each. Left out, its `permissions` on All brands, which only the org's owner, or a key for All brands, gives. A key for some brands acts in them alone: across the org it only reads the org (`org.read`)"}},"required":["name","permissions"],"additionalProperties":false},"ApiKeyRotation":{"type":"object","properties":{"overlap_seconds":{"type":"integer","minimum":0,"maximum":604800,"default":86400,"description":"How long the key keeps working beside the new one: a day by default, up to 7 days; 0 ends it now"}},"additionalProperties":false},"UserPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"User":{"type":"object","properties":{"id":{"type":"string","description":"The user's id: their `sub` in every token","example":"usr_01h455vb4pex5vsknk084sn02q"},"email":{"type":["string","null"],"description":"Their email address, or null"},"email_verified":{"type":"boolean","description":"Whether they proved they own the address"},"username":{"type":["string","null"],"description":"Their username at the brand, or null"},"name":{"type":["string","null"],"description":"Their full name, or null"},"given_name":{"type":["string","null"],"description":"Their given name, or null"},"family_name":{"type":["string","null"],"description":"Their family name, or null"},"picture":{"type":["string","null"],"description":"The picture they chose, or null: then your app shows its own default avatar, drawn from `avatar_seed`. Synq never puts a made-up picture here"},"picture_source":{"type":"string","x-extensible-enum":["none","upload","url","linked:<provider>"],"description":"Where `picture` came from: `none` (no picture: show your own default, from `avatar_seed`), `upload` (one the person uploaded), `linked:<provider>` (the picture of an account they linked, such as `linked:google`, copied into the brand’s files) or `url` (one set through the API)","example":"linked:google"},"avatar_seed":{"type":"string","description":"What to draw the person's default avatar from: the same for them in every app of the brand for as long as the account lasts, another in every other brand, and never leading back to their id","example":"mJ3kT0a9yZVqC1x8fR4wLb"},"default_picture":{"type":"string","description":"The brand's own default avatar for the person, where the brand uploaded a set (`default_avatars` of its theme) and its plan includes them (`branding.default_avatars`, Pro and up): absent otherwise"},"locale":{"type":["string","null"],"description":"Their locale, a BCP 47 tag such as `en-US`, or null"},"wallets":{"type":"array","items":{"type":"string"},"description":"Solana addresses they sign in with"},"sign_in_methods":{"type":"array","items":{"type":"string","x-extensible-enum":["email","passkey","password","solana","google","apple","microsoft","github","facebook","x","discord","telegram","matrica"]},"description":"How they sign in: each kind of way they have (an email address, a passkey, a password, a Solana wallet, or a provider such as `google`), once each","example":["email","passkey","google"]},"disabled":{"type":"boolean","description":"Whether they are disabled: signed out, and signing in no more until enabled"},"deletion_scheduled_for":{"type":["string","null"],"format":"date-time","description":"When their account is deleted, or null when no deletion is scheduled"},"last_sign_in_at":{"type":["string","null"],"format":"date-time","description":"When they last signed in, or null for never"},"created_at":{"type":"string","format":"date-time","description":"When the user signed up, or was made"}},"required":["id","email","email_verified","username","name","given_name","family_name","picture","picture_source","avatar_seed","locale","wallets","sign_in_methods","disabled","deletion_scheduled_for","last_sign_in_at","created_at"]},"UserDetail":{"allOf":[{"$ref":"#/components/schemas/User"},{"type":"object","properties":{"metadata":{"type":"object","additionalProperties":{},"description":"The tenant's own JSON"},"identities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identity's id","example":"idn_01h455vb4pex5vsknk084sn02q"},"provider":{"type":"string","description":"Where it is from: a provider, `email`, `solana`…"},"subject":{"type":"string","description":"Who they are there: the provider's id for them, an address or a wallet"},"handle":{"type":["string","null"],"description":"Their handle at the provider, without the @, as of their last sign-in with it: GitHub’s, X’s, Discord’s, Telegram’s and Matrica’s username. For showing people only: it changes, and never identifies anyone"},"details":{"type":["object","null"],"properties":{"account_type":{"type":"string","description":"GitHub’s word for the account: `User`, `Organization` or `Bot`","example":"User"},"created_at":{"type":"string","format":"date-time","description":"When the GitHub account was made","example":"2011-01-25T18:44:36.000Z"},"public_repos":{"type":"integer","minimum":0,"description":"How many public repositories the GitHub account owns"},"followers":{"type":"integer","minimum":0,"description":"How many people follow the GitHub account"},"email_verified":{"type":"boolean","description":"Google’s own word that it checked the account’s address (at least once, when the account was made)"},"workspace_domain":{"type":["string","null"],"description":"The Google Workspace domain the account belongs to (Google’s `hd`), or null for a personal Google account","example":"acme.example"},"telegram_user_id":{"type":"string","description":"Telegram’s user id for the account (its `id` claim), kept where the brand asks Telegram for `telegram:bot_access`: the `chat_id` your own bot sends the person messages at. Not the identity’s `subject`","example":"987654321"},"phone_number":{"type":"string","description":"The phone number on the person’s Telegram account, kept where the brand asks Telegram for `phone` and the person shared it","example":"+15555550123"},"phone_number_verified":{"type":"boolean","description":"Whether the phone number is verified: Telegram’s own `phone_number_verified` where it sends one, else true, since Telegram documents its `phone` scope as the person’s verified phone number. Synq checks nothing itself"},"name":{"type":"string","description":"For an account at a provider your app verifies: the name your server gave for the person there","example":"Ada Lovelace"},"test":{"type":"boolean","enum":[true],"description":"A made-up account from a test sign-in (`test_sign_ins`): never a real account at the provider, and never in production"}},"description":"What the provider said of the account at their last sign-in with it, beyond who they are: GitHub’s account type, age, public repositories and followers, Google’s `email_verified` and Workspace domain, and, where the brand asks Telegram for more, Telegram’s user id and phone number, and the name your server gave for an account at a provider your app verifies, each only where the provider sent it. Null for every other provider"},"details_read_at":{"type":["string","null"],"format":"date-time","description":"When `details` was read from the provider: their last sign-in with it"},"scopes":{"type":"array","items":{"type":"string"},"description":"The extra scopes the brand asked the provider for that it says the person granted, at their last sign-in with it; empty when none","example":["phone"]},"unconfirmed_scopes":{"type":"array","items":{"type":"string"},"description":"The extra scopes asked for at their last sign-in that the provider never confirms either way, such as Telegram’s `telegram:bot_access`; empty when none","example":["telegram:bot_access"]},"label":{"type":["string","null"],"description":"A wallet’s name, as its person called it"},"primary":{"type":"boolean","description":"Whether it is the person’s primary wallet"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When they last signed in with it, or null for never"},"created_at":{"type":"string","format":"date-time","description":"When it was added"}},"required":["id","provider","subject","handle","details","details_read_at","scopes","unconfirmed_scopes","label","primary","last_used_at","created_at"]},"description":"The ways they sign in: each provider account, wallet or address"},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The session's id, which ending it takes"},"signed_in_at":{"type":["string","null"],"format":"date-time","description":"When they signed in, or null"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When it ends by itself, or null"},"apps":{"type":"array","items":{"type":"string"},"description":"The apps it signed in to, by client_id"},"signed_in_apps":{"type":"array","items":{"$ref":"#/components/schemas/SessionApp"},"description":"The same apps as `apps`, in the same order, each named and saying what it is"},"via":{"type":"string","x-extensible-enum":["hosted","app"],"description":"Where it was signed in: the brand's hosted page, or one of its apps' own screens"}},"required":["id","signed_in_at","expires_at","apps","signed_in_apps","via"]},"description":"Their sessions at the brand"}},"required":["metadata","identities","sessions"]}]},"SessionApp":{"type":"object","properties":{"client_id":{"type":"string","description":"The app's client_id, as `apps` lists it","example":"app_01h455vb4pex5vsknk084sn02q"},"name":{"type":["string","null"],"description":"Its name: an app of the brand's by its own name, one of Synq's by Synq's (`Sign-in preview`, `Member profile`), and a deleted app by the name it had when it was deleted, while the org's audit log keeps that; null for an app known only by its metadata document, and for a deleted app the log no longer names","example":"Acme web"},"kind":{"type":"string","x-extensible-enum":["app","synq","metadata_document","deleted"],"description":"What the app is. `app`: one of the brand's apps, made in the dashboard or the API or registered itself. `synq`: one of Synq's own apps, which every issuer serves: the sign-in preview (the dashboard's \"Try it now\" and \"Open sign-in page\") and the member profile. `metadata_document`: an app known only by its client ID metadata document, whose URL is its `client_id`. `deleted`: an app of the brand's deleted since the session signed in to it","example":"app"}},"required":["client_id","name","kind"]},"UserCreate":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","description":"Their email address, which they sign in with"},"email_verified":{"type":"boolean","default":false,"description":"Whether the tenant has already proved the person owns it"},"username":{"type":["string","null"],"pattern":"^[a-z0-9](?:[a-z0-9._-]{1,62}[a-z0-9])$","description":"Their username at the brand: 3 to 64 lowercase letters, digits, dots, hyphens and underscores, starting and ending with a letter or digit"},"name":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"Their full name"},"given_name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Their given name"},"family_name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Their family name"},"picture":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"Their picture: an https URL"},"locale":{"type":["string","null"],"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","description":"Their locale, a BCP 47 tag such as `en-US`"},"metadata":{"type":"object","additionalProperties":{},"description":"The tenant's own JSON, at most 16 KB"}},"required":["email"],"additionalProperties":false},"UserUpdate":{"type":"object","properties":{"username":{"type":["string","null"],"pattern":"^[a-z0-9](?:[a-z0-9._-]{1,62}[a-z0-9])$","description":"Their username at the brand: 3 to 64 lowercase letters, digits, dots, hyphens and underscores, starting and ending with a letter or digit"},"name":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"Their full name"},"given_name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Their given name"},"family_name":{"type":["string","null"],"minLength":1,"maxLength":100,"description":"Their family name"},"picture":{"type":["string","null"],"maxLength":2048,"format":"uri","description":"Their picture: an https URL"},"locale":{"type":["string","null"],"pattern":"^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$","description":"Their locale, a BCP 47 tag such as `en-US`"},"metadata":{"type":"object","additionalProperties":{},"description":"The tenant's own JSON, at most 16 KB"}},"additionalProperties":false},"UserPasskeyPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserPasskey"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"UserPasskey":{"type":"object","properties":{"id":{"type":"string","description":"The passkey's id","example":"pky_01h455vb4pex5vsknk084sn02q"},"synced":{"type":"boolean","description":"Whether the passkey can leave its device: a synced passkey, kept by a password manager or a platform account"},"backed_up":{"type":"boolean","description":"Whether a synced passkey is backed up now"},"transports":{"type":"array","items":{"type":"string"},"description":"How the browser reaches it, as WebAuthn names them","example":["internal","hybrid"]},"created_at":{"type":"string","format":"date-time","description":"When it was added"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When they last signed in with it, or null for never"}},"required":["id","synced","backed_up","transports","created_at","last_used_at"]},"ConsentPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Consent"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Consent":{"type":"object","properties":{"id":{"type":"string","description":"The consent's id","example":"cns_01h455vb4pex5vsknk084sn02q"},"app":{"type":"object","properties":{"client_id":{"type":"string","description":"The app's client_id","example":"app_01h455vb4pex5vsknk084sn02q"},"name":{"type":["string","null"],"description":"Its name, for one of the brand’s apps; null for an app known only by its metadata document"}},"required":["client_id","name"],"description":"The app they allowed"},"scopes":{"type":"array","items":{"type":"string"},"description":"The OpenID scopes allowed","example":["openid","email"]},"claims":{"type":"array","items":{"type":"string"},"description":"The OpenID claims allowed besides what the scopes carry (the `claims` request parameter)","example":[]},"apis":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"The API's identifier"},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes of it the person allowed"}},"required":["identifier","scopes"]},"description":"Each API's scopes allowed, by the API's identifier"},"scope_descriptions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The scope, OpenID or an API’s; or `email`, `linked_accounts` or `wallets` for what an API the app calls sees of the person besides","example":"orders.read"},"description":{"type":"string","description":"What it lets the app do, in the consent page’s words","example":"See your orders"}},"required":["name","description"]},"description":"Everything the person allowed it, as the consent page said it: each OpenID scope in Synq's words, each API's scope in the words its tenant registered (its name where it has none), and what an API sees of them besides","example":[{"name":"openid","description":"Know who you are"},{"name":"orders.read","description":"See your orders"}]},"allowed_at":{"type":"string","format":"date-time","description":"When the person first allowed it"},"updated_at":{"type":"string","format":"date-time","description":"When they last allowed it more"}},"required":["id","app","scopes","claims","apis","scope_descriptions","allowed_at","updated_at"]},"UserApiKeyPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserApiKey"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"UserApiKey":{"type":"object","properties":{"id":{"type":"string","description":"The key's id, never the key itself","example":"uak_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"What the key is for","example":"Reports script"},"prefix":{"type":"string","description":"The start of the key, to tell keys apart","example":"ak_live_Ab3d"},"api":{"type":"object","properties":{"identifier":{"type":"string","description":"The API's identifier","example":"https://api.acme.example"},"name":{"type":"string","description":"The API's name"}},"required":["identifier","name"],"description":"The API it is for"},"scopes":{"type":"array","items":{"type":"string"},"description":"What it may do: scopes of its API (one the API drops leaves every key)","example":["reports:read"]},"expires_at":{"type":["string","null"],"format":"date-time","description":"When it stops working by itself, or null for never"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"When it was revoked, or null while it works"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When its API last checked it, to the minute"},"created_at":{"type":"string","format":"date-time","description":"When it was made"}},"required":["id","name","prefix","api","scopes","expires_at","revoked_at","last_used_at","created_at"]},"LinkedIdentityPage":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The identity's id","example":"idn_01h455vb4pex5vsknk084sn02q"},"provider":{"type":"string","description":"Where it is from: a provider, `email`, `solana`…"},"subject":{"type":"string","description":"Who they are there: the provider's id for them, an address or a wallet"},"handle":{"type":["string","null"],"description":"Their handle at the provider, without the @, as of their last sign-in with it: GitHub’s, X’s, Discord’s, Telegram’s and Matrica’s username. For showing people only: it changes, and never identifies anyone"},"details":{"type":["object","null"],"properties":{"account_type":{"type":"string","description":"GitHub’s word for the account: `User`, `Organization` or `Bot`","example":"User"},"created_at":{"type":"string","format":"date-time","description":"When the GitHub account was made","example":"2011-01-25T18:44:36.000Z"},"public_repos":{"type":"integer","minimum":0,"description":"How many public repositories the GitHub account owns"},"followers":{"type":"integer","minimum":0,"description":"How many people follow the GitHub account"},"email_verified":{"type":"boolean","description":"Google’s own word that it checked the account’s address (at least once, when the account was made)"},"workspace_domain":{"type":["string","null"],"description":"The Google Workspace domain the account belongs to (Google’s `hd`), or null for a personal Google account","example":"acme.example"},"telegram_user_id":{"type":"string","description":"Telegram’s user id for the account (its `id` claim), kept where the brand asks Telegram for `telegram:bot_access`: the `chat_id` your own bot sends the person messages at. Not the identity’s `subject`","example":"987654321"},"phone_number":{"type":"string","description":"The phone number on the person’s Telegram account, kept where the brand asks Telegram for `phone` and the person shared it","example":"+15555550123"},"phone_number_verified":{"type":"boolean","description":"Whether the phone number is verified: Telegram’s own `phone_number_verified` where it sends one, else true, since Telegram documents its `phone` scope as the person’s verified phone number. Synq checks nothing itself"},"name":{"type":"string","description":"For an account at a provider your app verifies: the name your server gave for the person there","example":"Ada Lovelace"},"test":{"type":"boolean","enum":[true],"description":"A made-up account from a test sign-in (`test_sign_ins`): never a real account at the provider, and never in production"}},"description":"What the provider said of the account at their last sign-in with it, beyond who they are: GitHub’s account type, age, public repositories and followers, Google’s `email_verified` and Workspace domain, and, where the brand asks Telegram for more, Telegram’s user id and phone number, and the name your server gave for an account at a provider your app verifies, each only where the provider sent it. Null for every other provider"},"details_read_at":{"type":["string","null"],"format":"date-time","description":"When `details` was read from the provider: their last sign-in with it"},"scopes":{"type":"array","items":{"type":"string"},"description":"The extra scopes the brand asked the provider for that it says the person granted, at their last sign-in with it; empty when none","example":["phone"]},"unconfirmed_scopes":{"type":"array","items":{"type":"string"},"description":"The extra scopes asked for at their last sign-in that the provider never confirms either way, such as Telegram’s `telegram:bot_access`; empty when none","example":["telegram:bot_access"]},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When they last signed in with it, or null for never"},"created_at":{"type":"string","format":"date-time","description":"When it was added"},"added_by":{"type":"string","x-extensible-enum":["person","server"],"description":"Who added it: `person`, the person themselves, signing up or linking it (a link code they confirmed in your app included), or `server`, your server, for a person it already knew (`POST …/users/{user}/identities`), which the person’s account page shows as added by your brand"},"claims":{"type":"object","additionalProperties":{},"description":"The claims the brand keeps from the provider (`kept_claims`), as it said them at the person’s last sign-in or link with it; empty when none","example":{"locale":"en-US"}},"provider_tokens":{"type":["object","null"],"properties":{"scope":{"type":["string","null"],"description":"What the access token grants, as the provider said; null where it didn’t","example":"tweet.read users.read offline.access"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the access token kept now expires, or null where the provider didn’t say. Synq refreshes it when read, where it can"},"refreshable":{"type":"boolean","description":"Whether Synq holds a refresh token for it, and so can get a fresh access token when this one expires. The refresh token itself never leaves Synq"},"kept_at":{"type":"string","format":"date-time","description":"When they were kept at a sign-in or link, or last refreshed"}},"required":["scope","expires_at","refreshable","kept_at"],"description":"The person’s tokens Synq keeps at the provider for your server (`keep_tokens`), without the tokens: read the access token with `POST …/identities/{identity}/access-token`. Null where none are kept"},"linked_at":{"type":"string","format":"date-time","description":"When it joined the account"}},"required":["id","provider","subject","handle","details","details_read_at","scopes","unconfirmed_scopes","last_used_at","created_at","added_by","claims","provider_tokens","linked_at"]},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"ProviderAccessToken":{"type":"object","properties":{"access_token":{"type":"string","description":"The person’s access token at the provider, to call its API as them from your server. Never put it in a browser, a log or a URL"},"scope":{"type":["string","null"],"description":"What it grants, as the provider said; null where it didn’t"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When it expires, or null where the provider didn’t say"}},"required":["access_token","scope","expires_at"]},"AppVerifiedProviderPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AppVerifiedProvider"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"AppVerifiedProvider":{"type":"object","properties":{"id":{"type":"string","description":"Its id, `custom-` and the slug you picked: its name wherever a provider's is","example":"custom-acme-telegram"},"name":{"type":"string","description":"Its name as people know it"},"icon":{"type":["string","null"],"description":"Its icon, 20 px square: one of the brand's files, uploaded for `provider_icon` (`POST …/files`) and finalized, by its `url`. Null for none."},"sign_in_tickets":{"type":"boolean","description":"What it is for: false, the default, linking alone (\"Use for: Linking\"); true, linking and sign-in links (\"Use for: Linking and sign-in links\"), which your server makes for the people who confirmed an account here (`POST …/sign-in-tickets`). A link signs the person in to one of the brand's own apps, once, within 2 minutes, and never counts as a fresh sign-in. Turning it on wants a person's sign-in from the last 5 minutes; turning it off, or turning the provider off, refuses every link at once, those made already included."},"enabled":{"type":"boolean","description":"Whether it links people now: off, no link code is made or redeemed, no identity is confirmed or added, and no sign-in link works. Off until turned on"},"created_at":{"type":"string","format":"date-time","description":"When it was added"},"updated_at":{"type":"string","format":"date-time","description":"When it was last changed"}},"required":["id","name","icon","sign_in_tickets","enabled","created_at","updated_at"]},"AppVerifiedProviderCreate":{"type":"object","properties":{"id":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"Its id, which you pick: `custom-` and a slug, unique among the brand's own providers of every kind. It is its name wherever a provider's is (people's linked accounts, `provider` in your server's requests) and can't change.","example":"custom-acme-telegram"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^\\p{Cc}]+$/u","description":"Its name as people know it, where they link it and on their account page: \"Telegram\", \"Acme Guild\"","example":"Telegram"},"icon":{"type":["string","null"],"maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Its icon, 20 px square: one of the brand's files, uploaded for `provider_icon` (`POST …/files`) and finalized, by its `url`. Null for none."},"sign_in_tickets":{"type":"boolean","description":"What it is for: false, the default, linking alone (\"Use for: Linking\"); true, linking and sign-in links (\"Use for: Linking and sign-in links\"), which your server makes for the people who confirmed an account here (`POST …/sign-in-tickets`). A link signs the person in to one of the brand's own apps, once, within 2 minutes, and never counts as a fresh sign-in. Turning it on wants a person's sign-in from the last 5 minutes; turning it off, or turning the provider off, refuses every link at once, those made already included."}},"required":["id","name"],"additionalProperties":false},"AppVerifiedProviderUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^\\p{Cc}]+$/u","description":"Its name as people know it, where they link it and on their account page: \"Telegram\", \"Acme Guild\"","example":"Telegram"},"icon":{"type":["string","null"],"maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"Its icon, 20 px square: one of the brand's files, uploaded for `provider_icon` (`POST …/files`) and finalized, by its `url`. Null for none."},"sign_in_tickets":{"type":"boolean","description":"What it is for: false, the default, linking alone (\"Use for: Linking\"); true, linking and sign-in links (\"Use for: Linking and sign-in links\"), which your server makes for the people who confirmed an account here (`POST …/sign-in-tickets`). A link signs the person in to one of the brand's own apps, once, within 2 minutes, and never counts as a fresh sign-in. Turning it on wants a person's sign-in from the last 5 minutes; turning it off, or turning the provider off, refuses every link at once, those made already included."}},"additionalProperties":false},"RedeemedLinkCode":{"type":"object","properties":{"identity":{"type":"string","description":"The pending identity's id, which it keeps once the person confirms it: nothing links until then","example":"idn_01h455vb4pex5vsknk084sn02q"},"user":{"type":"string","description":"The person who made the code, whose account it waits to join","example":"usr_01h455vb4pex5vsknk084sn02q"},"provider":{"type":"string","description":"The provider","example":"custom-acme-telegram"},"subject":{"type":"string","description":"Who they are there, as you said","example":"987654321"},"expires_at":{"type":"string","format":"date-time","description":"When it stops waiting for the person to confirm it in the app: 10 minutes from now"}},"required":["identity","user","provider","subject","expires_at"]},"LinkCodeRedemption":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":128,"description":"The link code the person's app made (`POST /me/v1/link-codes`) and put in your service's deep link: single use, for 10 minutes. In the body, never in a URL, since it is a credential and URLs reach logs","example":"q2V0ZXJzLWV4YW1wbGUtY29kZS1vbmx5LTAxMjM0NTY"},"provider":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider your service verified them at: one of the brand’s “your app verifies it” providers, by its id, turned on","example":"custom-acme-telegram"},"subject":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}]+$/u","description":"Who the person is at the provider, as your service knows them for life: Telegram's user id, a game's player id. It must never change or be reused for someone else","example":"987654321"},"handle":{"type":["string","null"],"pattern":"^@?[^\\s@\\p{Cc}]{1,64}$/u","description":"Their username there, with or without the @ (kept without it), for showing people: \"Link Telegram @ada?\"","example":"ada"},"name":{"type":["string","null"],"minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]+$/u","description":"Their name there, for showing people","example":"Ada Lovelace"},"picture":{"type":["string","null"],"maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"An https URL of their picture there, which they may choose as their own picture later"}},"required":["code","provider","subject"],"additionalProperties":false},"NewServerIdentity":{"type":"object","properties":{"provider":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider your service verified them at: one of the brand’s “your app verifies it” providers, by its id, turned on","example":"custom-acme-telegram"},"subject":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}]+$/u","description":"Who the person is at the provider, as your service knows them for life: Telegram's user id, a game's player id. It must never change or be reused for someone else","example":"987654321"},"handle":{"type":["string","null"],"pattern":"^@?[^\\s@\\p{Cc}]{1,64}$/u","description":"Their username there, with or without the @ (kept without it), for showing people: \"Link Telegram @ada?\"","example":"ada"},"name":{"type":["string","null"],"minLength":1,"maxLength":200,"pattern":"^[^\\p{Cc}]+$/u","description":"Their name there, for showing people","example":"Ada Lovelace"},"picture":{"type":["string","null"],"maxLength":2048,"pattern":"^https:\\/\\/[^\\s]+$","description":"An https URL of their picture there, which they may choose as their own picture later"}},"required":["provider","subject"],"additionalProperties":false},"SignInTicket":{"type":"object","properties":{"url":{"type":"string","description":"The link to send the person, a credential for 2 minutes: `return_to` with `synq_ticket` added. Opening it shows the app's page whose button signs them in, so a link preview or a scanner that only fetches it spends nothing. Never log it","example":"https://app.acme-guild.example/auth/callback?synq_ticket=Oyewzb7tB0AL3anJsAjr7DTSO3Ojr34HOqKwZ611DYM"},"expires_at":{"type":"string","format":"date-time","description":"When it stops working"}},"required":["url","expires_at"]},"NewSignInTicket":{"type":"object","properties":{"provider":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider the person confirmed an account at: one of the brand’s “your app verifies it” providers, turned on, with `sign_in_tickets`","example":"custom-acme-telegram"},"subject":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{Cc}]+$/u","description":"Who the person is there: the account they confirmed","example":"987654321"},"client_id":{"type":"string","minLength":1,"maxLength":255,"description":"The app the link signs them in to: one of the brand's own apps, by its client_id","example":"app_01h455vb4pex5vsknk084sn02q"},"return_to":{"type":"string","minLength":1,"maxLength":2048,"description":"One of that app's redirect URIs, exactly as registered: the link opens it, and its route mount signs the person in (`@synqauth/nextjs` does it at its callback)","example":"https://app.acme-guild.example/auth/callback"}},"required":["provider","subject","client_id","return_to"],"additionalProperties":false},"CallerPermissions":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string","x-extensible-enum":["org.read","org.edit","org.delete","org.members.view","org.members.edit","org.ownership.transfer","org.brands.view","org.brands.edit","org.brands.transfer","org.apps.view","org.apps.edit","org.apis.view","org.apis.edit","org.connections.view","org.connections.edit","org.webhooks.view","org.webhooks.edit","org.tokenGates.view","org.tokenGates.edit","org.integrations.view","org.integrations.edit","org.emailDomains.view","org.emailDomains.edit","org.billing.view","org.billing.edit","org.users.view","org.users.edit","org.users.providerTokens.read","org.users.identities.edit","org.users.signInTickets.create","org.apiKeys.view","org.apiKeys.edit","org.auditLog.view","org.auditLog.export","org.sso.view","org.sso.edit"]},"description":"What the caller may do across the org. More are added over time"},"brand_permissions":{"type":"object","properties":{"all_brands":{"type":"array","items":{"type":"string"},"description":"What it may do in every brand, those made later included (a role on All brands)"},"brands":{"type":"array","items":{"$ref":"#/components/schemas/CallerBrandPermissions"},"description":"Each brand it holds a role in of its own, beside All brands. A brand neither lists is one it can’t reach"}},"required":["all_brands","brands"],"description":"What the caller may do in the org's brands"},"role":{"type":["string","null"],"description":"The caller's role across the org: `owner`, `admin`, `billing`, `member` or one of the org's own (`rol_…`); null for an API key, which holds `permissions` itself","example":"admin"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/CallerBrandRole"},"description":"The caller's brand roles, what `brand_permissions` comes from. An owner is Brand admin on All brands, always"}},"required":["permissions","brand_permissions","role","brand_roles"]},"CallerBrandPermissions":{"type":"object","properties":{"brand":{"type":"string","description":"A brand (`brd_…`) it holds a role in","example":"brd_01h455vb4pex5vsknk084sn02q"},"permissions":{"type":"array","items":{"type":"string"},"description":"What it may do there, its All brands roles included"}},"required":["brand","permissions"]},"CallerBrandRole":{"type":"object","properties":{"brand":{"type":["string","null"],"description":"The brand (`brd_…`), or null for All brands, those made later included","example":"brd_01h455vb4pex5vsknk084sn02q"},"role":{"type":["string","null"],"description":"`brand_admin`, `developer`, `support`, `viewer` or one of the org's own (`rol_…`); null where an API key holds a permission set there","example":"developer"}},"required":["brand","role"]},"RolePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Role"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Role":{"type":"object","properties":{"id":{"type":"string","description":"Across the org: `owner`, `admin`, `billing` or `member`; in a brand: `brand_admin`, `developer`, `support` or `viewer`; or `rol_…` for the org’s own"},"name":{"type":"string","description":"The role's name"},"system":{"type":"boolean","description":"Whether it is one of Synq's built-in roles, which can't be changed or deleted"},"level":{"type":"string","description":"Where it applies: `org`, a member’s role across the org; `brand`, a brand role, on one brand or on All brands; `any`, one of the org’s own, which can be either","x-extensible-enum":["org","brand","any"]},"permissions":{"type":"array","items":{"type":"string"},"description":"What the role may do"}},"required":["id","name","system","level","permissions"]},"RoleInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"The role's name"},"permissions":{"type":"array","items":{"type":"string","enum":["org.read","org.edit","org.delete","org.members.view","org.members.edit","org.ownership.transfer","org.brands.view","org.brands.edit","org.brands.transfer","org.apps.view","org.apps.edit","org.apis.view","org.apis.edit","org.connections.view","org.connections.edit","org.webhooks.view","org.webhooks.edit","org.tokenGates.view","org.tokenGates.edit","org.integrations.view","org.integrations.edit","org.emailDomains.view","org.emailDomains.edit","org.billing.view","org.billing.edit","org.users.view","org.users.edit","org.users.providerTokens.read","org.users.identities.edit","org.users.signInTickets.create","org.apiKeys.view","org.apiKeys.edit","org.auditLog.view","org.auditLog.export","org.sso.view","org.sso.edit"]},"minItems":1,"description":"What the role may do: at most what the caller can. Each permission that changes something comes with the one that reads it, as in every built-in role: `org.brands.edit` gives `org.brands.view` too, and `org.edit` gives `org.read`"}},"required":["name","permissions"],"additionalProperties":false},"MemberPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Member":{"type":"object","properties":{"user_id":{"type":"string","description":"The member's user id at Synq","example":"usr_01h455vb4pex5vsknk084sn02q"},"email":{"type":["string","null"],"description":"The member's email address, or null"},"name":{"type":["string","null"],"description":"The member's name, or null"},"role":{"type":"string","description":"Their role across the org: `owner`, `admin`, `billing`, `member`, or one of the org’s own roles (`rol_…`)"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/BrandRoleGrant"},"description":"What they may do in the org's brands: a role per brand, or on All brands. An owner is Brand admin in every brand whatever this says"},"joined_at":{"type":"string","format":"date-time","description":"When they joined the org"},"sessions_ended_at":{"type":["string","null"],"format":"date-time","description":"When an owner or admin last ended their sessions in this org (`POST …/members/{user}/end-sessions`): a sign-in from before then acts here no more. Null when nobody has"}},"required":["user_id","email","name","role","brand_roles","joined_at","sessions_ended_at"]},"BrandRoleGrant":{"type":"object","properties":{"brand":{"type":["string","null"],"description":"The brand (`brd_…`), or null for All brands, those made later included","example":"brd_01h455vb4pex5vsknk084sn02q"},"role":{"type":"string","description":"`brand_admin`, `developer`, `support`, `viewer`, or one of the org’s own roles (`rol_…`)","example":"developer"}},"required":["brand","role"]},"BrandMemberPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"MemberSessionsEnded":{"type":"object","properties":{"sessions_ended_at":{"type":"string","format":"date-time","description":"The moment: a sign-in from before then acts in the org no more"},"setup_codes_ended":{"type":"integer","description":"How many of their setup codes stopped working"},"change_requests_cancelled":{"type":"integer","description":"How many change requests their agents asked for were cancelled"}},"required":["sessions_ended_at","setup_codes_ended","change_requests_cancelled"]},"InvitePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invite"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Invite":{"type":"object","properties":{"id":{"type":"string","description":"The invite's id","example":"inv_01h455vb4pex5vsknk084sn02q"},"email":{"type":"string","description":"The address it was sent to"},"role":{"type":"string","description":"The role across the org the person gets: `admin`, `billing`, `member`, or one of the org’s own roles (`rol_…`)"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/BrandRoleGrant"},"description":"The brand roles they get"},"invited_by":{"type":["string","null"],"description":"Who sent it: a member's user id (`usr_…`) or the API key that did (`key_…`); null if unknown"},"expires_at":{"type":"string","format":"date-time","description":"When it stops working, 7 days after it was sent"},"created_at":{"type":"string","format":"date-time","description":"When it was sent"}},"required":["id","email","role","brand_roles","invited_by","expires_at","created_at"]},"InviteOffer":{"type":"object","properties":{"org_name":{"type":"string","description":"The org's name","example":"Acme"},"role":{"type":"string","description":"The role across the org the person gets: `admin`, `billing`, `member`, or one of the org’s own roles (`rol_…`)","example":"admin"},"role_name":{"type":"string","description":"That role's name: Admin, Billing, Member, or the org's own role's","example":"Admin"},"role_about":{"type":["string","null"],"description":"What that role lets them do across the org, in plain words; null for one of the org's own roles","example":"Everything but handing the organization over or deleting it"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/InviteOfferBrandRole"},"description":"The brand roles they get, All brands first, then each brand by name: what they may do in the org's brands. A brand with none is one they won't see"},"inviter_name":{"type":["string","null"],"description":"The name of the member who sent it, while they are one of the org's members; null for an API key, or a member with no name","example":"Ana Lima"},"expires_at":{"type":"string","format":"date-time","description":"When it stops working, 7 days after it was sent"}},"required":["org_name","role","role_name","role_about","brand_roles","inviter_name","expires_at"]},"InviteOfferBrandRole":{"type":"object","properties":{"brand_name":{"type":["string","null"],"description":"The brand's name, or null for All brands, those made later included","example":"Acme Books"},"role":{"type":"string","description":"`brand_admin`, `developer`, `support`, `viewer`, or one of the org’s own roles (`rol_…`)","example":"developer"},"role_name":{"type":"string","description":"The role's name: Brand admin, Developer, Support, Viewer, or the org's own role's","example":"Developer"},"about":{"type":["string","null"],"description":"What it lets them do in the brand, in plain words; null for one of the org's own roles","example":"Its apps, APIs, sign-in methods, webhooks and API keys"}},"required":["brand_name","role","role_name","about"]},"InviteToken":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":200,"description":"The token in the link the invite emailed"}},"required":["token"],"additionalProperties":false},"MemberAlreadyProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"org_id":{"type":"string","description":"With `conflict`: the org they are a member of already","example":"org_01h455vb4pex5vsknk084sn02q"}}}]},"PendingInvitePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PendingInvite"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"PendingInvite":{"allOf":[{"$ref":"#/components/schemas/InviteOffer"},{"type":"object","properties":{"id":{"type":"string","description":"The invite's id","example":"inv_01h455vb4pex5vsknk084sn02q"}},"required":["id"]}]},"FormerMemberPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FormerMember"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"FormerMember":{"type":"object","properties":{"user_id":{"type":"string","description":"Their user id at Synq, which the audit log's `actor` filter takes","example":"usr_01h455vb4pex5vsknk084sn02q"},"email":{"type":["string","null"],"description":"Their email address when they left, or null"},"name":{"type":["string","null"],"description":"Their name when they left, or null"},"role":{"type":["string","null"],"description":"The role across the org they had: `admin`, `billing`, `member`, or one of the org’s own roles (`rol_…`); null where the entry no longer says"},"joined_at":{"type":["string","null"],"format":"date-time","description":"When they last joined, while the audit log still keeps it; null when that entry is older than the plan keeps"},"left_at":{"type":"string","format":"date-time","description":"When they left or were removed"},"departure":{"type":"string","x-extensible-enum":["left","removed"],"description":"`left`, they left of their own accord (`member.left`); `removed`, someone removed them (`member.removed`), named in `removed_by`"},"removed_by":{"type":["object","null"],"properties":{"type":{"type":"string","x-extensible-enum":["member","api_key","staff","user","anonymous","system"],"description":"`member`, a person in the org; `api_key`; `staff`, Synq's own staff; `system`, Synq itself"},"id":{"type":["string","null"],"description":"Their id: a user's (`usr_…`) or an API key's (`key_…`); null for `system`","example":"usr_01h455vb4pex5vsknk084sn02q"}},"required":["type","id"],"description":"Who removed them, or null when they left themselves"},"audit_event_id":{"type":"string","description":"The audit log's entry that recorded it (`aud_…`)","example":"aud_01h455vb4pex5vsknk084sn02q"}},"required":["user_id","email","name","role","joined_at","left_at","departure","removed_by","audit_event_id"]},"SubscriptionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/WebhookListWarning"},"description":"What the list leaves out for this credential: empty when it holds every webhook of the org. Each page says the same"}},"required":["data","next_cursor","warnings"]},"WebhookSubscription":{"type":"object","properties":{"id":{"type":"string","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"url":{"type":"string","description":"Where events are sent"},"events":{"type":"array","items":{"type":"string"},"description":"The events it gets"},"name":{"type":["string","null"],"description":"Its short name, or null: the dashboard's lists and audit log show it, or the URL's host without one","example":"Order sync"},"description":{"type":["string","null"],"description":"What it is for, or null"},"enabled":{"type":"boolean","description":"Whether events are sent to it"},"disabled_reason":{"type":["string","null"],"description":"Why Synq turned it off, when it did: turning it on again clears it"},"previous_secret_expires_at":{"type":["string","null"],"format":"date-time","description":"Until when deliveries also carry a signature by the secret before the last rotation, or null"},"brands":{"type":["array","null"],"items":{"type":"string"},"description":"The brands whose events it gets (`brd_…`), or null for All brands: those made later, and the org's own events (members, billing, brand moves), which only an All brands webhook gets","example":["brd_01h455vb4pex5vsknk084sn02q"]},"created_at":{"type":"string","format":"date-time","description":"When the webhook was made"}},"required":["id","url","events","name","description","enabled","disabled_reason","previous_secret_expires_at","brands","created_at"]},"WebhookListWarning":{"type":"object","properties":{"code":{"type":"string","x-extensible-enum":["brands_limited"],"description":"What it is about, for code to read. `brands_limited`: the credential has the permission in some brands, not across the org, so the list holds only the webhooks for those brands: a webhook for All brands, or for a brand it holds no role in, isn't in it, whether or not the org has one","example":"brands_limited"},"message":{"type":"string","description":"The same, for a person to read, with how to see every webhook"}},"required":["code","message"]},"WebhookSubscriptionWithSecret":{"allOf":[{"$ref":"#/components/schemas/WebhookSubscription"},{"type":"object","properties":{"secret":{"type":"string","description":"The signing secret (`whsec_…`), shown this once: verify each delivery with it"}},"required":["secret"]}]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","description":"Its `webhook-id` header","example":"msg_01h455vb4pex5vsknk084sn02q"},"event_type":{"type":"string","description":"The event it carries"},"status":{"type":"string","x-extensible-enum":["pending","succeeded","failed"],"description":"`pending` while Synq is still trying it; `succeeded` once the receiver answered 2xx; `failed` once nothing will try it again: every attempt failed, its webhook was turned off before it went, or it waited a day without an attempt. A finished one can be sent again (`POST …/deliveries/{delivery}/resend`)."},"attempts":{"type":"integer","description":"How many times Synq tried it"},"max_attempts":{"type":"integer","description":"How many attempts Synq makes on its own: the first, then one after each wait of its schedule (5 seconds, 5 minutes, 30 minutes, 2 hours and 5 hours). A test event gets one, and each resend by hand adds one to `attempts`","example":6},"next_attempt_at":{"type":["string","null"],"format":"date-time","description":"When Synq tries it next, while it is `pending` after a failed attempt; null once it succeeded or failed, before its first attempt, and after its last"},"last_status_code":{"type":["integer","null"],"description":"The receiver's status code at the last attempt, or null"},"last_error":{"type":["string","null"],"description":"Why the last attempt failed, or null"},"delivered_at":{"type":["string","null"],"format":"date-time","description":"When the receiver took it, or null"},"created_at":{"type":"string","format":"date-time","description":"When Synq made the delivery, once its event was recorded"}},"required":["id","event_type","status","attempts","max_attempts","next_attempt_at","last_status_code","last_error","delivered_at","created_at"]},"WebhookDeliveryPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"TokenGateList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TokenGate"},"description":"This page's token gates"},"next_cursor":{"type":["string","null"],"description":"The cursor for the next page, or null after the last"},"chains":{"type":"array","items":{"type":"string","enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"A chain, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`","example":"solana:mainnet"},"description":"The chains this API reads, where a condition that reads one can be made or turned on: the stage's (`solana:devnet` on preview, `solana:mainnet` in production), or none where it reads no chain"}},"required":["data","next_cursor","chains"]},"TokenGate":{"type":"object","properties":{"id":{"type":"string","description":"The gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"brand":{"type":["string","null"],"description":"The brand it belongs to (`brd_…`): everything it applies to is this brand’s, and it never moves to another. Null only for a gate an older API made during an upgrade, until Synq gives it its brand (its targets’, else the default brand’s)","example":"brd_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"What the page that refuses someone calls it","example":"Acme holders"},"enabled":{"type":"boolean","description":"Whether it applies; on when made"},"rule":{"$ref":"#/components/schemas/TokenGateShownRule"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/TokenGateShownSchedule"},{"type":"null"}],"description":"When it applies; null: always"},"refusal_message":{"type":["string","null"],"description":"Your own words above the explanation when it refuses someone"},"summary":{"type":"string","description":"The rule in one line of plain words, as the dashboard lists it","example":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)"},"brands":{"type":"array","items":{"type":"string"},"description":"The brands it applies to, every app of each","example":["brd_01h455vb4pex5vsknk084sn02q"]},"apps":{"type":"array","items":{"type":"string"},"description":"The apps it applies to, by client_id, beside those brands","example":["app_01h455vb4pex5vsknk084sn02q"]},"discord_roles":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateDiscordRole"},"description":"The Discord roles it gives, in the org's connected servers: Synq's bot gives each to people who qualify and takes it back from those who stop"},"telegram_groups":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateTelegramGroup"},"description":"The Telegram groups it lets people into: Synq’s bot approves join requests from people who qualify, and mutes or removes those who stop"},"created_at":{"type":"string","format":"date-time","description":"When the gate was made"},"updated_at":{"type":"string","format":"date-time","description":"When the gate last changed"}},"required":["id","brand","name","enabled","rule","schedule","refusal_message","summary","brands","apps","discord_roles","telegram_groups","created_at","updated_at"]},"TokenGateShownRule":{"type":"object","properties":{"version":{"type":"integer","description":"The rule format: 1","example":1},"root":{"$ref":"#/components/schemas/TokenGateShownGroup"}},"required":["version","root"],"description":"Who qualifies: to sign in, for a Discord role or into a Telegram group. A tree of `all` and `any` groups of conditions on the wallets of the person's account in the brand, with what Synq read about each condition"},"TokenGateShownGroup":{"type":"object","properties":{"type":{"type":"string","description":"`all`: every condition in it. `any`: at least one of them","example":"all","x-extensible-enum":["all","any"]},"conditions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TokenGateShownTokenCondition"},{"$ref":"#/components/schemas/TokenGateShownCollectionCondition"},{"$ref":"#/components/schemas/TokenGateShownNftCondition"},{"$ref":"#/components/schemas/TokenGateShownAllowlistCondition"},{"$ref":"#/components/schemas/TokenGateShownProgramActivityCondition"},{"$ref":"#/components/schemas/TokenGateShownAddressActivityCondition"},{"$ref":"#/components/schemas/TokenGateShownGroup2"}],"discriminator":{"propertyName":"type","mapping":{"token":"#/components/schemas/TokenGateShownTokenCondition","collection":"#/components/schemas/TokenGateShownCollectionCondition","nft":"#/components/schemas/TokenGateShownNftCondition","allowlist":"#/components/schemas/TokenGateShownAllowlistCondition","program_activity":"#/components/schemas/TokenGateShownProgramActivityCondition","address_activity":"#/components/schemas/TokenGateShownAddressActivityCondition","all":"#/components/schemas/TokenGateShownGroup2","any":"#/components/schemas/TokenGateShownGroup2"}}},"description":"What the group holds: conditions, and groups below it"}},"required":["type","conditions"],"description":"The rule's top group"},"TokenGateShownTokenCondition":{"type":"object","properties":{"type":{"type":"string","enum":["token"],"description":"A token: hold at least `min_amount` of the mint"},"chain":{"type":"string","x-extensible-enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`; the list grows","example":"solana:mainnet"},"mint":{"type":"string","description":"The token's address on `chain`"},"min_amount":{"type":"string","description":"The least the wallets hold, in whole tokens"},"wallets":{"type":"string","x-extensible-enum":["combined","single"],"description":"`combined`: what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name","example":"USDC"},"display":{"$ref":"#/components/schemas/TokenGateConditionDisplay"}},"required":["type","chain","mint","min_amount","wallets"],"description":"Hold at least `min_amount` of a token"},"TokenGateConditionDisplay":{"type":"object","properties":{"name":{"type":["string","null"],"maxLength":200,"description":"The token's or NFT's name, as its metadata says, or null"},"symbol":{"type":["string","null"],"maxLength":50,"description":"The token's symbol, or null"},"decimals":{"type":"integer","minimum":0,"maximum":255,"description":"The token's decimals, as the chain says"},"image":{"type":"string","maxLength":2048,"description":"The token's or NFT's image, as its metadata names it"}},"required":["name","symbol"],"description":"What Synq read about the token or NFT on the chain when the gate was last written, for pages to show without reading it again. Read-only: Synq fills it on every write and ignores it in a request"},"TokenGateShownCollectionCondition":{"type":"object","properties":{"type":{"type":"string","enum":["collection"],"description":"A collection: hold at least `min_count` of its NFTs"},"chain":{"type":"string","x-extensible-enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`; the list grows","example":"solana:mainnet"},"collection":{"type":"string","description":"The collection's address on `chain`"},"min_count":{"type":"integer","description":"How many of its NFTs the wallets hold at least"},"wallets":{"type":"string","x-extensible-enum":["combined","single"],"description":"`combined`: what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name","example":"USDC"},"display":{"$ref":"#/components/schemas/TokenGateConditionDisplay"},"collection_kind":{"type":"string","x-extensible-enum":["core","token_metadata","token_group"],"description":"What the collection is, as Synq read it when the gate was written: a Metaplex Core collection, a Token Metadata collection NFT, or a Token-2022 group; the list grows","example":"token_metadata"}},"required":["type","chain","collection","min_count","wallets"],"description":"Hold at least `min_count` NFTs of a verified collection"},"TokenGateShownNftCondition":{"type":"object","properties":{"type":{"type":"string","enum":["nft"],"description":"An NFT: hold this one"},"chain":{"type":"string","x-extensible-enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`; the list grows","example":"solana:mainnet"},"asset":{"type":"string","description":"The NFT's address on `chain`"},"label":{"type":"string","description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name","example":"USDC"},"display":{"$ref":"#/components/schemas/TokenGateConditionDisplay"}},"required":["type","chain","asset"],"description":"Hold one NFT in particular"},"TokenGateShownAllowlistCondition":{"type":"object","properties":{"type":{"type":"string","enum":["allowlist"],"description":"An allowlist: have a wallet on the list"},"chain":{"type":"string","x-extensible-enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`; the list grows","example":"solana:mainnet"},"addresses":{"type":"array","items":{"type":"string"},"description":"Wallet addresses"},"label":{"type":"string","description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name","example":"USDC"}},"required":["type","chain","addresses"],"description":"Have a wallet on a list on the account"},"TokenGateShownProgramActivityCondition":{"type":"object","properties":{"type":{"type":"string","enum":["program_activity"],"description":"Activity with a program: at least `min_count` successful transactions it ran in, in the last `window_days` days"},"chain":{"type":"string","x-extensible-enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`; the list grows","example":"solana:mainnet"},"program":{"type":"string","description":"The program's address on `chain`"},"min_count":{"type":"integer","description":"How many transactions, at least","example":3},"window_days":{"type":"integer","description":"The window, in days","example":30},"role":{"type":"string","x-extensible-enum":["signer","any"],"description":"Which of the person's transactions count: `signer` (a wallet of theirs signed it) or `any` (a wallet of theirs is in it); the list grows","example":"signer"},"wallets":{"type":"string","x-extensible-enum":["combined","single"],"description":"`combined`: what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name","example":"USDC"}},"required":["type","chain","program","min_count","window_days","role","wallets"],"description":"Use a program: at least `min_count` of the person's successful transactions in the last `window_days` days ran it"},"TokenGateShownAddressActivityCondition":{"type":"object","properties":{"type":{"type":"string","enum":["address_activity"],"description":"Activity with an address: at least `min_count` successful transactions with it, in the last `window_days` days"},"chain":{"type":"string","x-extensible-enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`; the list grows","example":"solana:mainnet"},"address":{"type":"string","description":"The address on `chain`"},"min_count":{"type":"integer","description":"How many transactions, at least","example":3},"window_days":{"type":"integer","description":"The window, in days","example":30},"direction":{"type":"string","x-extensible-enum":["sent","received","either"],"description":"Which transactions count, by who signed them: `sent` (a wallet of the person’s), `received` (the address) or `either`; the list grows","example":"received"},"wallets":{"type":"string","x-extensible-enum":["combined","single"],"description":"`combined`: what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name","example":"USDC"}},"required":["type","chain","address","min_count","window_days","direction","wallets"],"description":"Transact with an address: at least `min_count` of the person's successful transactions in the last `window_days` days were with it, in `direction`"},"TokenGateShownGroup2":{"type":"object","properties":{"type":{"type":"string","description":"`all`: every condition in it. `any`: at least one of them","example":"all","x-extensible-enum":["all","any"]},"conditions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TokenGateShownTokenCondition"},{"$ref":"#/components/schemas/TokenGateShownCollectionCondition"},{"$ref":"#/components/schemas/TokenGateShownNftCondition"},{"$ref":"#/components/schemas/TokenGateShownAllowlistCondition"},{"$ref":"#/components/schemas/TokenGateShownProgramActivityCondition"},{"$ref":"#/components/schemas/TokenGateShownAddressActivityCondition"},{"$ref":"#/components/schemas/TokenGateShownGroup3"}],"discriminator":{"propertyName":"type","mapping":{"token":"#/components/schemas/TokenGateShownTokenCondition","collection":"#/components/schemas/TokenGateShownCollectionCondition","nft":"#/components/schemas/TokenGateShownNftCondition","allowlist":"#/components/schemas/TokenGateShownAllowlistCondition","program_activity":"#/components/schemas/TokenGateShownProgramActivityCondition","address_activity":"#/components/schemas/TokenGateShownAddressActivityCondition","all":"#/components/schemas/TokenGateShownGroup3","any":"#/components/schemas/TokenGateShownGroup3"}}},"description":"What the group holds: conditions, and groups below it"}},"required":["type","conditions"],"description":"A group at the second level"},"TokenGateShownGroup3":{"type":"object","properties":{"type":{"type":"string","description":"`all`: every condition in it. `any`: at least one of them","example":"all","x-extensible-enum":["all","any"]},"conditions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TokenGateShownTokenCondition"},{"$ref":"#/components/schemas/TokenGateShownCollectionCondition"},{"$ref":"#/components/schemas/TokenGateShownNftCondition"},{"$ref":"#/components/schemas/TokenGateShownAllowlistCondition"},{"$ref":"#/components/schemas/TokenGateShownProgramActivityCondition"},{"$ref":"#/components/schemas/TokenGateShownAddressActivityCondition"}],"discriminator":{"propertyName":"type","mapping":{"token":"#/components/schemas/TokenGateShownTokenCondition","collection":"#/components/schemas/TokenGateShownCollectionCondition","nft":"#/components/schemas/TokenGateShownNftCondition","allowlist":"#/components/schemas/TokenGateShownAllowlistCondition","program_activity":"#/components/schemas/TokenGateShownProgramActivityCondition","address_activity":"#/components/schemas/TokenGateShownAddressActivityCondition"}}},"description":"What the group holds: conditions"}},"required":["type","conditions"],"description":"A group at the third level"},"TokenGateShownSchedule":{"type":"object","properties":{"timezone":{"type":"string","description":"The IANA time zone `starts` and `ends` are in, such as `America/New_York`, or `UTC`. Required: a window means a time somewhere"},"all_day":{"type":"boolean","description":"`true`: `starts` and `ends` are dates (`YYYY-MM-DD`), the window runs from the start of `starts` to the end of `ends`. `false` (the default): they are times (`YYYY-MM-DDTHH:mm`) and the window ends at `ends`, exclusive"},"starts":{"type":"string","description":"When it opens, on the clocks of `timezone`: `2026-10-10T09:00`, or `2026-10-10` all day. Left out, it has always been open"},"ends":{"type":"string","description":"When it closes, on the clocks of `timezone`: `2026-10-10T17:00` (that minute is outside), or `2026-10-12` all day (that day is inside). Left out, it never closes"},"outside":{"type":"string","x-extensible-enum":["let_in","refuse"],"description":"Outside the window: `let_in`, the gate doesn't apply and everyone signs in (holders only until launch); `refuse`, the app is closed to everyone and nothing is read from a chain (an event). Required: the two mean opposite things"},"starts_at":{"type":["string","null"],"format":"date-time","description":"When it opens, in UTC, as the time zone's rules make `starts` today"},"ends_at":{"type":["string","null"],"format":"date-time","description":"When it closes, in UTC: the first instant outside"},"state":{"type":"string","description":"Where now is against the window: `upcoming`, `in_effect` or `ended`","example":"in_effect","x-extensible-enum":["upcoming","in_effect","ended"]}},"required":["timezone","all_day","outside","starts_at","ends_at","state"],"description":"The window as written, with its instants and where now is against it"},"TokenGateDiscordRole":{"type":"object","properties":{"server":{"type":"string","description":"The server (`dsv_…`)"},"server_name":{"type":"string","description":"The server's name","example":"Mollyverse"},"role":{"type":"string","description":"The role's Discord id"},"role_name":{"type":"string","description":"The role's name","example":"MDP Holder"},"grace_seconds":{"type":"integer","description":"The grace period, in seconds"},"recheck_seconds":{"type":"integer","description":"How often everyone is checked again, in seconds"},"existing_members":{"type":"string","x-extensible-enum":["verify","leave"],"description":"What happens to those there before the gate: `verify` or `leave`"},"adopt_by":{"type":["string","null"],"format":"date-time","description":"Until when those already there may verify, from when Synq started counting them (`existing_members: verify`); null otherwise"},"adoption":{"$ref":"#/components/schemas/TokenGateAdoption"}},"required":["server","server_name","role","role_name","grace_seconds","recheck_seconds","existing_members","adopt_by","adoption"]},"TokenGateAdoption":{"type":"object","properties":{"state":{"type":"string","x-extensible-enum":["none","counting","waiting","running","ended"],"description":"`none` (`existing_members: leave`), `counting` (Synq is taking in a Discord role's holders), `waiting` (the group's or the role's window isn't announced yet: `…/window/announce`), `running` (they have until `verify_by`) or `ended`"},"verify_by":{"type":["string","null"],"format":"date-time","description":"The deadline for those already there to verify; null for `none`"},"counted":{"type":["integer","null"],"description":"How many were there when it started: Discord, the role's holders; Telegram, the group's people but its admins and bots. Null while counting"},"unverified":{"type":"integer","description":"How many of them Synq knows of who haven’t verified yet"},"member_listing":{"type":"string","x-extensible-enum":["full","as_they_show_up","unavailable"],"description":"How Synq finds them: `full` (Discord lists the server's members), `as_they_show_up` (Telegram's Bot API lists no members, so Synq learns them as they post, react or join while the window runs), or `unavailable` (Discord won't list them: see `problem`)"},"problem":{"anyOf":[{"type":"string","x-extensible-enum":["members_intent","no_verify_channel","bot_removed"]},{"type":"null"}],"description":"What stops it: `members_intent` (Discord refused to list members: Synq's app needs the Server Members intent), `no_verify_channel` (nowhere to remind holders), `bot_removed`; null when nothing does"},"problem_detail":{"type":["string","null"],"description":"The fix, in the words the dashboard shows"}},"required":["state","verify_by","counted","unverified","member_listing","problem","problem_detail"],"description":"Those already there when the target came: with `existing_members: verify`, the group's or the role's announced window"},"TokenGateTelegramGroup":{"type":"object","properties":{"group":{"type":"string","description":"The group (`tgg_…`)"},"title":{"type":"string","description":"The group's title","example":"RODAI Holders"},"on_lost":{"type":"string","x-extensible-enum":["mute","remove"],"description":"What happens once the grace period ends: `mute` or `remove`"},"grace_seconds":{"type":"integer","description":"The grace period, in seconds"},"recheck_seconds":{"type":"integer","description":"How often everyone is checked again, in seconds"},"existing_members":{"type":"string","x-extensible-enum":["verify","leave"],"description":"What happens to those there before the gate: `verify` or `leave`"},"adopt_by":{"type":["string","null"],"format":"date-time","description":"Until when those already there may verify, from when Synq started counting them (`existing_members: verify`); null otherwise"},"adoption":{"$ref":"#/components/schemas/TokenGateAdoption"}},"required":["group","title","on_lost","grace_seconds","recheck_seconds","existing_members","adopt_by","adoption"]},"TokenGateRule":{"type":"object","properties":{"version":{"type":"number","enum":[1],"description":"The rule format: 1. Required, so a later format is never read as this one","example":1},"root":{"$ref":"#/components/schemas/TokenGateGroup"}},"required":["version","root"],"additionalProperties":false,"description":"Who qualifies: to sign in, for a Discord role or into a Telegram group. A tree of `all` and `any` groups of conditions on the wallets of the person's account in the brand"},"TokenGateGroup":{"type":"object","properties":{"type":{"type":"string","enum":["all","any"],"description":"`all`: every condition in it. `any`: at least one of them","example":"all"},"conditions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TokenGateTokenCondition"},{"$ref":"#/components/schemas/TokenGateCollectionCondition"},{"$ref":"#/components/schemas/TokenGateNftCondition"},{"$ref":"#/components/schemas/TokenGateAllowlistCondition"},{"$ref":"#/components/schemas/TokenGateProgramActivityCondition"},{"$ref":"#/components/schemas/TokenGateAddressActivityCondition"},{"$ref":"#/components/schemas/TokenGateGroup2"}],"discriminator":{"propertyName":"type","mapping":{"token":"#/components/schemas/TokenGateTokenCondition","collection":"#/components/schemas/TokenGateCollectionCondition","nft":"#/components/schemas/TokenGateNftCondition","allowlist":"#/components/schemas/TokenGateAllowlistCondition","program_activity":"#/components/schemas/TokenGateProgramActivityCondition","address_activity":"#/components/schemas/TokenGateAddressActivityCondition","all":"#/components/schemas/TokenGateGroup2","any":"#/components/schemas/TokenGateGroup2"}}},"minItems":1,"maxItems":20,"description":"What the group holds: 1 to 20 conditions, or groups below it"}},"required":["type","conditions"],"additionalProperties":false,"description":"The rule's top group. Groups nest at most 3 deep, counting this one, with at most 20 conditions in all"},"TokenGateTokenCondition":{"type":"object","properties":{"type":{"type":"string","enum":["token"],"description":"A token: hold at least `min_amount` of the mint"},"chain":{"type":"string","enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`","example":"solana:mainnet"},"mint":{"type":"string","minLength":1,"maxLength":64,"description":"The token's address on `chain`: on Solana, its mint","example":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"},"min_amount":{"type":"string","maxLength":40,"description":"The least the wallets hold, in whole tokens above zero: up to 20 digits, and up to 18 after a point, compared exactly in the mint's base units (a minimum finer than the mint counts asks for its next unit)","example":"1000"},"wallets":{"type":"string","enum":["combined","single"],"description":"`combined` (left out, Synq writes this): what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name: at most 60 characters","example":"USDC"},"display":{"$ref":"#/components/schemas/TokenGateConditionDisplay"}},"required":["type","chain","mint","min_amount"],"additionalProperties":false,"description":"Hold at least `min_amount` of a token: every account of the mint the wallets own counts (Token and Token-2022, frozen or delegated ones included), and so do its ZK-compressed balances"},"TokenGateCollectionCondition":{"type":"object","properties":{"type":{"type":"string","enum":["collection"],"description":"A collection: hold at least `min_count` of its NFTs"},"chain":{"type":"string","enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`","example":"solana:mainnet"},"collection":{"type":"string","minLength":1,"maxLength":64,"description":"The collection's address on `chain`: a Metaplex Core collection, a Token Metadata collection NFT, or a Token-2022 mint with the TokenGroup extension","example":"J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w"},"min_count":{"type":"integer","minimum":1,"maximum":1000,"description":"How many of its NFTs the wallets hold at least: 1 to 1000. Only NFTs whose membership the collection verified count, compressed and Core ones included, burnt ones never","example":3},"wallets":{"type":"string","enum":["combined","single"],"description":"`combined` (left out, Synq writes this): what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name: at most 60 characters","example":"USDC"},"display":{"$ref":"#/components/schemas/TokenGateConditionDisplay"},"collection_kind":{"type":"string","enum":["core","token_metadata","token_group"],"description":"What the collection is, as Synq read it when the gate was written: a Metaplex Core collection, a Token Metadata collection NFT, or a Token-2022 group (whose members are mints its member extension names). Read-only: Synq fills it on every write and ignores it in a request","example":"token_metadata"}},"required":["type","chain","collection","min_count"],"additionalProperties":false,"description":"Hold at least `min_count` NFTs of a verified collection"},"TokenGateNftCondition":{"type":"object","properties":{"type":{"type":"string","enum":["nft"],"description":"An NFT: hold this one"},"chain":{"type":"string","enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`","example":"solana:mainnet"},"asset":{"type":"string","minLength":1,"maxLength":64,"description":"The NFT's address on `chain`: its mint, or its asset id (compressed and Core)","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name: at most 60 characters","example":"USDC"},"display":{"$ref":"#/components/schemas/TokenGateConditionDisplay"}},"required":["type","chain","asset"],"additionalProperties":false,"description":"Hold one NFT in particular"},"TokenGateAllowlistCondition":{"type":"object","properties":{"type":{"type":"string","enum":["allowlist"],"description":"An allowlist: have a wallet on the list"},"chain":{"type":"string","enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`","example":"solana:mainnet"},"addresses":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"minItems":1,"maxItems":1000,"description":"Wallet addresses, compared exactly (base58 is case sensitive), each one a wallet can sign with. At most 1000 across a gate's lists. Never shown to the person signing in","example":["9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"]},"label":{"type":"string","minLength":1,"maxLength":60,"description":"What the refusal page and the dashboard call the condition, instead of the token's or NFT's own name: at most 60 characters","example":"USDC"}},"required":["type","chain","addresses"],"additionalProperties":false,"description":"Have a wallet on a list on the account: nothing is read from a chain"},"TokenGateProgramActivityCondition":{"type":"object","properties":{"type":{"type":"string","enum":["program_activity"],"description":"Activity with a program: at least `min_count` successful transactions it ran in, in the last `window_days` days"},"chain":{"type":"string","enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`","example":"solana:mainnet"},"program":{"type":"string","minLength":1,"maxLength":64,"description":"The program's address on `chain`: an executable account. It counts whether a transaction calls it directly or through another program","example":"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"},"min_count":{"type":"integer","minimum":1,"maximum":100,"description":"How many successful transactions in the window, at least: 1 to 100. A transaction counts once, however many of its instructions match and however many of the person's wallets are in it; a failed one never counts","example":3},"window_days":{"type":"integer","minimum":1,"maximum":90,"description":"The window, in days back from the moment of the check: 1 to 90 (on `solana:devnet`, 1 to 14, as far back as its history is kept). It slides: someone can stop qualifying with no change to their wallets, once their transactions leave it","example":30},"role":{"type":"string","enum":["signer","any"],"description":"Which of the person's transactions count. `signer` (left out, Synq writes this): those a wallet on their account signed. `any`: those a wallet of theirs is in, signed or not (one of its accounts, a token account of theirs whose balance changed, or a compressed token account of theirs the transaction opened or closed)","example":"signer"},"wallets":{"type":"string","enum":["combined","single"],"description":"`combined` (left out, Synq writes this): what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"What the refusal page and the dashboard call the program, in place of its shortened address: at most 60 characters","example":"Jupiter"}},"required":["type","chain","program","min_count","window_days"],"additionalProperties":false,"description":"Use a program: at least `min_count` of the person's successful transactions in the last `window_days` days ran it"},"TokenGateAddressActivityCondition":{"type":"object","properties":{"type":{"type":"string","enum":["address_activity"],"description":"Activity with an address: at least `min_count` successful transactions with it, in the last `window_days` days"},"chain":{"type":"string","enum":["solana:mainnet","solana:devnet","solana:testnet","solana:localnet"],"description":"The chain the condition is read on, as the Wallet Standard names it: `solana:mainnet`, `solana:devnet`","example":"solana:mainnet"},"address":{"type":"string","minLength":1,"maxLength":64,"description":"The address on `chain`: a wallet, or any account but a program (a program's activity is `program_activity`)","example":"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"},"min_count":{"type":"integer","minimum":1,"maximum":100,"description":"How many successful transactions in the window, at least: 1 to 100. A transaction counts once, however many of its instructions match and however many of the person's wallets are in it; a failed one never counts","example":3},"window_days":{"type":"integer","minimum":1,"maximum":90,"description":"The window, in days back from the moment of the check: 1 to 90 (on `solana:devnet`, 1 to 14, as far back as its history is kept). It slides: someone can stop qualifying with no change to their wallets, once their transactions leave it","example":30},"direction":{"type":"string","enum":["sent","received","either"],"description":"Which transactions count, by who signed them. `sent`: a wallet on the person's account signed it, and the address is in it. `received`: the address signed it, and a wallet of theirs is in it. `either`: one or the other. In it: one of its accounts, the owner of a token account whose balance changed in it, or the owner of a compressed token account it opened or closed, so tokens and NFTs count whether they are compressed or not","example":"received"},"wallets":{"type":"string","enum":["combined","single"],"description":"`combined` (left out, Synq writes this): what every wallet on the person's account holds, added up. `single`: one wallet must hold it all by itself","example":"combined"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"What the refusal page and the dashboard call the address, in place of its shortened form: at most 60 characters","example":"Acme treasury"}},"required":["type","chain","address","min_count","window_days","direction"],"additionalProperties":false,"description":"Transact with an address: at least `min_count` of the person's successful transactions in the last `window_days` days were with it, in `direction`"},"TokenGateGroup2":{"type":"object","properties":{"type":{"type":"string","enum":["all","any"],"description":"`all`: every condition in it. `any`: at least one of them","example":"all"},"conditions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TokenGateTokenCondition"},{"$ref":"#/components/schemas/TokenGateCollectionCondition"},{"$ref":"#/components/schemas/TokenGateNftCondition"},{"$ref":"#/components/schemas/TokenGateAllowlistCondition"},{"$ref":"#/components/schemas/TokenGateProgramActivityCondition"},{"$ref":"#/components/schemas/TokenGateAddressActivityCondition"},{"$ref":"#/components/schemas/TokenGateGroup3"}],"discriminator":{"propertyName":"type","mapping":{"token":"#/components/schemas/TokenGateTokenCondition","collection":"#/components/schemas/TokenGateCollectionCondition","nft":"#/components/schemas/TokenGateNftCondition","allowlist":"#/components/schemas/TokenGateAllowlistCondition","program_activity":"#/components/schemas/TokenGateProgramActivityCondition","address_activity":"#/components/schemas/TokenGateAddressActivityCondition","all":"#/components/schemas/TokenGateGroup3","any":"#/components/schemas/TokenGateGroup3"}}},"minItems":1,"maxItems":20,"description":"What the group holds: 1 to 20 conditions, or groups below it"}},"required":["type","conditions"],"additionalProperties":false,"description":"A group at the second level"},"TokenGateGroup3":{"type":"object","properties":{"type":{"type":"string","enum":["all","any"],"description":"`all`: every condition in it. `any`: at least one of them","example":"all"},"conditions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TokenGateTokenCondition"},{"$ref":"#/components/schemas/TokenGateCollectionCondition"},{"$ref":"#/components/schemas/TokenGateNftCondition"},{"$ref":"#/components/schemas/TokenGateAllowlistCondition"},{"$ref":"#/components/schemas/TokenGateProgramActivityCondition"},{"$ref":"#/components/schemas/TokenGateAddressActivityCondition"}],"discriminator":{"propertyName":"type","mapping":{"token":"#/components/schemas/TokenGateTokenCondition","collection":"#/components/schemas/TokenGateCollectionCondition","nft":"#/components/schemas/TokenGateNftCondition","allowlist":"#/components/schemas/TokenGateAllowlistCondition","program_activity":"#/components/schemas/TokenGateProgramActivityCondition","address_activity":"#/components/schemas/TokenGateAddressActivityCondition"}}},"minItems":1,"maxItems":20,"description":"What the group holds: 1 to 20 conditions, or groups below it"}},"required":["type","conditions"],"additionalProperties":false,"description":"A group at the third level: it holds conditions, not groups"},"TokenGateSchedule":{"type":"object","properties":{"timezone":{"type":"string","maxLength":64,"description":"The IANA time zone `starts` and `ends` are in, such as `America/New_York`, or `UTC`. Required: a window means a time somewhere","example":"America/New_York"},"all_day":{"type":"boolean","default":false,"description":"`true`: `starts` and `ends` are dates (`YYYY-MM-DD`), the window runs from the start of `starts` to the end of `ends`. `false` (the default): they are times (`YYYY-MM-DDTHH:mm`) and the window ends at `ends`, exclusive","example":false},"starts":{"type":"string","maxLength":32,"description":"When it opens, on the clocks of `timezone`: `2026-10-10T09:00`, or `2026-10-10` all day. Left out, it has always been open","example":"2026-10-10T09:00"},"ends":{"type":"string","maxLength":32,"description":"When it closes, on the clocks of `timezone`: `2026-10-10T17:00` (that minute is outside), or `2026-10-12` all day (that day is inside). Left out, it never closes","example":"2026-10-10T17:00"},"outside":{"type":"string","enum":["let_in","refuse"],"description":"Outside the window: `let_in`, the gate doesn't apply and everyone signs in (holders only until launch); `refuse`, the app is closed to everyone and nothing is read from a chain (an event). Required: the two mean opposite things","example":"refuse"}},"required":["timezone","outside"],"additionalProperties":false,"description":"When the gate applies: a window in a time zone, open at one end or both, and what happens outside it"},"TokenGateDiscordRoleInput":{"type":"object","properties":{"server":{"type":"string","maxLength":64,"description":"A Discord server the org connected (`dsv_…`)","example":"dsv_01h455vb4pex5vsknk084sn02q"},"role":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"The role's Discord id","example":"1187390245566001234"},"grace_seconds":{"type":"integer","minimum":0,"maximum":604800,"description":"How long someone keeps access after a check finds they no longer qualify, in seconds: 0 (at once) to 604800 (a week). Qualifying again in that time changes nothing. 86400 (24 hours) when left out","example":86400},"recheck_seconds":{"type":"integer","minimum":3600,"maximum":86400,"description":"How often everyone it let in is checked again, in seconds: 3600 (every hour) to 86400 (every day). 21600 (every 6 hours) when left out. A check that can’t read the chain keeps their access and tries again sooner","example":21600},"existing_members":{"type":"string","enum":["verify","leave"],"description":"Those who already hold the role, or are in the group, when it is added: `verify` (the default, recommended), they get time to verify: an announced window the brand sets up and announces, a Telegram group's (`…/telegram-groups/{group}/window`) or a Discord role's (`…/discord-servers/{server}/roles/{role}/window`); or `leave`, Synq leaves them alone and manages only people who verify"}},"required":["server","role"],"additionalProperties":false},"TokenGateTelegramGroupInput":{"type":"object","properties":{"group":{"type":"string","maxLength":64,"description":"A Telegram group the org connected (`tgg_…`)","example":"tgg_01h455vb4pex5vsknk084sn02q"},"on_lost":{"type":"string","enum":["mute","remove"],"description":"What happens to someone who stops qualifying, once the grace period ends: `mute` (the default) turns every permission off, so they can still read everything but not post or react, and is lifted when they qualify again; it needs a supergroup. `remove` takes them out with a ban that lifts itself two minutes later, so they can ask to join again; Synq never lifts or shortens a ban an admin set, and leaves anyone an admin banned as they are. A holders-only group should use `remove`"},"grace_seconds":{"type":"integer","minimum":0,"maximum":604800,"description":"How long someone keeps access after a check finds they no longer qualify, in seconds: 0 (at once) to 604800 (a week). Qualifying again in that time changes nothing. 86400 (24 hours) when left out","example":86400},"recheck_seconds":{"type":"integer","minimum":3600,"maximum":86400,"description":"How often everyone it let in is checked again, in seconds: 3600 (every hour) to 86400 (every day). 21600 (every 6 hours) when left out. A check that can’t read the chain keeps their access and tries again sooner","example":21600},"existing_members":{"type":"string","enum":["verify","leave"],"description":"Those who already hold the role, or are in the group, when it is added: `verify` (the default, recommended), they get time to verify: an announced window the brand sets up and announces, a Telegram group's (`…/telegram-groups/{group}/window`) or a Discord role's (`…/discord-servers/{server}/roles/{role}/window`); or `leave`, Synq leaves them alone and manages only people who verify"}},"required":["group"],"additionalProperties":false},"TokenGateDryRun":{"type":"object","properties":{"result":{"type":"string","description":"`passed`, `refused`, `unavailable` (what decides it couldn't be read), `not_in_effect` (outside a window that lets everyone in) or `closed` (outside a window that refuses everyone)","example":"refused","x-extensible-enum":["passed","refused","unavailable","not_in_effect","closed"]},"schedule_state":{"type":["string","null"],"description":"Where `at` is against the window: `upcoming`, `in_effect`, `ended`; null without one","x-extensible-enum":["upcoming","in_effect","ended"]},"wallets":{"type":"array","items":{"type":"string"},"description":"The wallets that were checked"},"tree":{"anyOf":[{"$ref":"#/components/schemas/TokenGateVerdict"},{"type":"null"}],"description":"What each node came to; null for a closed window, where nothing is read"},"reads":{"type":"integer","description":"How many reads of the chain it cost"},"cached":{"type":"integer","description":"How many answers came from the last minute"},"goal":{"type":"string","description":"What passing the gate gets someone, after “To”, from what it does: `sign in to Acme` for the brands and apps it guards, `get Holder in the Acme Discord` for its roles, `join Acme Holders on Telegram` for its groups, each it does, listed; `qualify` when it applies nowhere yet. The explanation's first line says it","example":"get Holder in the Acme Discord"},"explanation":{"type":"array","items":{"type":"string"},"description":"The page's words for it, line by line, nested by two spaces: what someone refused would read","example":["To get Holder in the Acme Discord, you need all of these:","  At least 1,000 USDC - You hold 250 across your wallets"]}},"required":["result","schedule_state","wallets","tree","reads","cached","goal","explanation"]},"TokenGateVerdict":{"type":"object","properties":{"type":{"type":"string","description":"`all` or `any`","example":"all","x-extensible-enum":["all","any"]},"path":{"type":"string","description":"Where it is in the rule","example":"root.conditions.1"},"status":{"type":"string","description":"`met`, `not_met`, or `unknown`: it couldn't be read (an RPC error, a chain this API doesn't read, a spent budget), or it wasn't (`checked: false`)","example":"met","x-extensible-enum":["met","not_met","unknown"]},"checked":{"type":"boolean","description":"Whether it was read: false when the answer was decided without it"},"conditions":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TokenGateVerdictCondition"},{"$ref":"#/components/schemas/TokenGateVerdictGroup2"}]},"description":"How each condition or group the group holds went, in order"},"until":{"type":"string","description":"When met on activity in a window: when the group lapses unless more comes (`all`: its first condition to lapse; `any`: its last, and none while a condition that never lapses is met). An ISO time","example":"2026-11-21T14:03:12.000Z"}},"required":["type","path","status","checked","conditions"],"description":"What a check found, node by node, in the rule's shape"},"TokenGateVerdictCondition":{"type":"object","properties":{"type":{"type":"string","description":"The condition: `token`, `collection`, `nft`, `allowlist`, `program_activity` or `address_activity`","example":"token","x-extensible-enum":["token","collection","nft","allowlist","program_activity","address_activity"]},"path":{"type":"string","description":"Where it is in the rule","example":"root.conditions.1"},"status":{"type":"string","description":"`met`, `not_met`, or `unknown`: it couldn't be read (an RPC error, a chain this API doesn't read, a spent budget), or it wasn't (`checked: false`)","example":"met","x-extensible-enum":["met","not_met","unknown"]},"checked":{"type":"boolean","description":"Whether it was read: false when the answer was decided without it"},"held":{"type":"string","description":"A token's: what the wallets hold in whole tokens, all together (`combined`) or the most one holds (`single`)","example":"250.5"},"decimals":{"type":"integer","description":"A token's: the mint's decimals"},"count":{"type":"integer","description":"A collection's: how many of its verified NFTs were counted. An activity condition's: how many transactions in the window counted, each once. Counting stops at the minimum","example":1},"until":{"type":"string","description":"A met activity condition's: when it lapses unless more transactions come, as its counted ones leave the window (an ISO time). Counting stops at the minimum, so with several wallets the true moment can be later, never sooner","example":"2026-11-21T14:03:12.000Z"},"capped":{"type":"boolean","description":"An activity condition's: true when a wallet had more than 1000 successful transactions in the window, or more than 1000 it is in only through a compressed token account, so only its newest 1000 of them were counted"},"owned":{"type":"boolean","description":"An NFT's: whether a wallet owns it"},"listed":{"type":"boolean","description":"An allowlist's: whether a wallet is on it"}},"required":["type","path","status","checked"],"description":"What a check found for one condition"},"TokenGateVerdictGroup2":{"type":"object","properties":{"type":{"type":"string","description":"`all` or `any`","example":"all","x-extensible-enum":["all","any"]},"path":{"type":"string","description":"Where it is in the rule","example":"root.conditions.1"},"status":{"type":"string","description":"`met`, `not_met`, or `unknown`: it couldn't be read (an RPC error, a chain this API doesn't read, a spent budget), or it wasn't (`checked: false`)","example":"met","x-extensible-enum":["met","not_met","unknown"]},"checked":{"type":"boolean","description":"Whether it was read: false when the answer was decided without it"},"conditions":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/TokenGateVerdictCondition"},{"$ref":"#/components/schemas/TokenGateVerdictGroup3"}]},"description":"How each condition or group the group holds went, in order"},"until":{"type":"string","description":"When met on activity in a window: when the group lapses unless more comes (`all`: its first condition to lapse; `any`: its last, and none while a condition that never lapses is met). An ISO time","example":"2026-11-21T14:03:12.000Z"}},"required":["type","path","status","checked","conditions"]},"TokenGateVerdictGroup3":{"type":"object","properties":{"type":{"type":"string","description":"`all` or `any`","example":"all","x-extensible-enum":["all","any"]},"path":{"type":"string","description":"Where it is in the rule","example":"root.conditions.1"},"status":{"type":"string","description":"`met`, `not_met`, or `unknown`: it couldn't be read (an RPC error, a chain this API doesn't read, a spent budget), or it wasn't (`checked: false`)","example":"met","x-extensible-enum":["met","not_met","unknown"]},"checked":{"type":"boolean","description":"Whether it was read: false when the answer was decided without it"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateVerdictCondition"},"description":"How each condition or group the group holds went, in order"},"until":{"type":"string","description":"When met on activity in a window: when the group lapses unless more comes (`all`: its first condition to lapse; `any`: its last, and none while a condition that never lapses is met). An ISO time","example":"2026-11-21T14:03:12.000Z"}},"required":["type","path","status","checked","conditions"]},"DiscordServerList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServer"},"description":"This page's servers"},"next_cursor":{"type":["string","null"],"description":"The cursor for the next page, or null after the last"},"bot":{"anyOf":[{"$ref":"#/components/schemas/IntegrationBot"},{"type":"null"}],"description":"The bot that serves the org here: Synq's, or the org's own; null where this API has no bot for the platform, so nothing new can connect"}},"required":["data","next_cursor","bot"]},"DiscordServer":{"type":"object","properties":{"id":{"type":"string","description":"The server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"brand_id":{"type":"string","description":"The brand people verify on, and become users of: fixed once connected"},"guild_id":{"type":"string","description":"The server's Discord id","example":"1093847562019384756"},"name":{"type":"string","description":"Its name, as Discord last said","example":"Mollyverse"},"icon_url":{"type":["string","null"],"description":"The server's icon, at Discord's CDN"},"status":{"type":"string","x-extensible-enum":["connected","bot_removed"],"description":"`connected`, or `bot_removed`: someone took the bot out, so nothing is given or taken there until it is added again"},"verify_channel_id":{"type":["string","null"],"description":"The channel the bot keeps its “Verify with Synq” message in, once one is picked"},"verified_channel_id":{"type":["string","null"],"description":"Where verified members go: the channel the member profile's Back to Discord opens once a role is given, and the bot's “You're verified” message links to, usually one the gated roles unlock. Null: the server itself"},"own_bot":{"type":"boolean","description":"Whether the org's own bot serves it"},"invite_url":{"type":["string","null"],"description":"An invite link the brand gave, for the member profile's Join button: Synq's bot makes no invites. A server with one has a public way in","example":"https://discord.gg/mollyverse"},"listed":{"type":"boolean","description":"Whether the brand's member profile lists it under Communities, with where each member stands and the way in: never without a public way in (an invite link, a public username or join requests)"},"listed_by":{"type":"string","x-extensible-enum":["brand","default"],"description":"`brand`: the brand chose; `default`: listed once it has a public way in. Either way, one with no way in is never listed"},"counts":{"$ref":"#/components/schemas/IntegrationCounts"},"connected_at":{"type":"string","format":"date-time","description":"When it was connected"}},"required":["id","brand_id","guild_id","name","icon_url","status","verify_channel_id","verified_channel_id","own_bot","invite_url","listed","listed_by","counts","connected_at"],"description":"A Discord server the org connected"},"IntegrationCounts":{"type":"object","properties":{"roles":{"type":"integer","description":"Discord: how many of its roles the org's gates give"},"gated":{"type":"boolean","description":"Telegram: whether a gate lets people in"},"managed":{"type":"integer","description":"How many people Synq manages there: verified, in grace, or there before the gate and waiting to verify"}},"required":["managed"]},"IntegrationBot":{"type":"object","properties":{"id":{"type":"string","description":"Discord: the application's id; Telegram: the bot's user id","example":"1093847562019384756"},"name":{"type":"string","description":"What members see it called","example":"Synq"},"username":{"type":"string","description":"Discord: the bot user's name; Telegram: its @username, without the @","example":"SynqBot"},"own":{"type":"boolean","description":"Whether it is the org's own bot (Scale and up) rather than Synq's"}},"required":["id","name","username","own"],"description":"The bot that serves the org on this platform"},"TelegramGroupList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TelegramGroup"},"description":"This page's groups"},"next_cursor":{"type":["string","null"],"description":"The cursor for the next page, or null after the last"},"bot":{"anyOf":[{"$ref":"#/components/schemas/IntegrationBot"},{"type":"null"}],"description":"The bot that serves the org here: Synq's, or the org's own; null where this API has no bot for the platform, so nothing new can connect"}},"required":["data","next_cursor","bot"]},"TelegramGroup":{"type":"object","properties":{"id":{"type":"string","description":"The group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"brand_id":{"type":"string","description":"The brand people verify on, and become users of: fixed once connected"},"chat_id":{"type":"string","description":"Telegram's id for the chat","example":"-1001234567890"},"title":{"type":"string","description":"Its title, as Telegram last said","example":"RODAI Holders"},"username":{"type":["string","null"],"description":"Its public @username, if it has one"},"kind":{"type":"string","x-extensible-enum":["group","supergroup"],"description":"`group` or `supergroup`: only a supergroup can mute anyone"},"status":{"type":"string","x-extensible-enum":["connected","bot_removed"],"description":"`connected`, or `bot_removed`: someone took the bot out, so nothing is given or taken there until it is added again"},"guard_bot":{"type":"boolean","description":"Whether the bot is the group's guard bot (Telegram's join request queries). It changes nothing: the bot leaves each request it is asked about to the group's admins at once, itself among them, and messages the person a link to verify, as it does for every group"},"rights":{"type":"object","properties":{"invite_users":{"type":"boolean","description":"Approves join requests: “Invite users via link”"},"restrict_members":{"type":"boolean","description":"Mutes and removes people: “Ban users”"},"pin_messages":{"type":"boolean","description":"Pins its Verify message: “Pin messages”"}},"required":["invite_users","restrict_members","pin_messages"],"description":"The bot's admin rights in the group, as last read"},"member_count":{"type":["integer","null"],"description":"How many people are in it, as last read"},"invite_link":{"type":["string","null"],"description":"The invite link Synq made that asks to join, to share where people find the group"},"own_bot":{"type":"boolean","description":"Whether the org's own bot serves it"},"listed":{"type":"boolean","description":"Whether the brand's member profile lists it under Communities, with where each member stands and the way in: never without a public way in (an invite link, a public username or join requests)"},"listed_by":{"type":"string","x-extensible-enum":["brand","default"],"description":"`brand`: the brand chose; `default`: listed once it has a public way in. Either way, one with no way in is never listed"},"counts":{"$ref":"#/components/schemas/IntegrationCounts"},"checked_at":{"type":"string","format":"date-time","description":"When the bot last read the group"},"connected_at":{"type":"string","format":"date-time","description":"When it was connected"}},"required":["id","brand_id","chat_id","title","username","kind","status","guard_bot","rights","member_count","invite_link","own_bot","listed","listed_by","counts","checked_at","connected_at"],"description":"A Telegram group the org connected"},"IntegrationActivityPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"},"description":"This page's rows, newest first"},"next_cursor":{"type":["string","null"],"description":"The cursor for the next page, or null after the last"}},"required":["data","next_cursor"]},"AuditEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event's id","example":"aud_01h455vb4pex5vsknk084sn02q"},"created_at":{"type":"string","format":"date-time","description":"When it happened"},"action":{"type":"string","description":"What happened, `<resource>.<what happened>`","example":"org.updated"},"actor":{"type":"object","properties":{"type":{"type":"string","x-extensible-enum":["member","api_key","staff","user","anonymous","system"],"description":"`member`, a person acting in the org; `api_key`; `staff`, Synq's own staff; `user`, one of the brand's users on their own account; `anonymous`, someone not signed in; `system`, Synq itself"},"id":{"type":["string","null"],"description":"The actor's id: a user's, a member's or an API key's; null for `anonymous` and `system`","example":"usr_01h455vb4pex5vsknk084sn02q"}},"required":["type","id"],"description":"Who did it"},"act_client_id":{"type":["string","null"],"description":"The app a person acted through, such as the dashboard"},"approval_id":{"type":["string","null"],"description":"The approval request that authorized the change, when one did"},"brand_id":{"type":["string","null"],"description":"The brand it happened in, or null when it happened to the org","example":"brd_01h455vb4pex5vsknk084sn02q"},"resource":{"type":["object","null"],"properties":{"type":{"type":"string","description":"What kind of resource it is","example":"org"},"id":{"type":"string","description":"The resource's id","example":"org_01h455vb4pex5vsknk084sn02q"}},"required":["type","id"],"description":"What it happened to, or null"},"metadata":{"type":"object","additionalProperties":{},"description":"What changed, by the action: never a secret"},"ip":{"type":["string","null"],"description":"The address the request came from, or null"},"user_agent":{"type":["string","null"],"description":"The request's user agent, or null"}},"required":["id","created_at","action","actor","act_client_id","approval_id","brand_id","resource","metadata","ip","user_agent"]},"DiscordInstall":{"type":"object","properties":{"url":{"type":"string","description":"Discord's install screen, for the person's browser"},"expires_at":{"type":"string","format":"date-time","description":"When the link stops working"}},"required":["url","expires_at"]},"DiscordServerRoleList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerRole"},"description":"Its roles, highest first"},"next_cursor":{"type":["string","null"],"description":"The cursor for the next page, or null after the last"}},"required":["data","next_cursor"]},"DiscordServerRole":{"type":"object","properties":{"id":{"type":"string","description":"The role's Discord id","example":"1187390245566001234"},"name":{"type":"string","description":"Its name","example":"MDP Holder"},"color":{"type":"integer","description":"Its color, as an RGB integer; 0 for none"},"position":{"type":"integer","description":"Its place in Server Settings → Roles: higher is above"},"managed":{"type":"boolean","description":"Whether a bot or an integration owns it, so nobody else can give it"},"assignable":{"type":"boolean","description":"Whether the bot can give it"},"problem":{"anyOf":[{"type":"string","x-extensible-enum":["unknown_role","everyone_role","managed_role","role_above_bot","missing_manage_roles","bot_removed","unknown_member"],"description":"Why the bot can't give it: `everyone_role`, `managed_role`, `role_above_bot`, `missing_manage_roles`…; null when it can"},{"type":"null"}],"description":"Why it can't, if it can't"},"problem_detail":{"type":["string","null"],"description":"The fix, in the words the dashboard shows","example":"Synq's role is below @MDP Holder in Server Settings → Roles. Drag Synq above it."},"gate":{"anyOf":[{"$ref":"#/components/schemas/DiscordServerRoleGate"},{"type":"null"}],"description":"The gate that gives it already: a role follows one gate"},"holders":{"type":["integer","null"],"description":"How many of the server's members hold it, counted across its first 5000 members (`holders_more` when it has more, so it is at least this many); null when Discord won't list the server's members: Synq's app needs the Server Members intent. What the dashboard shows before choosing what happens to those already holding it","example":312},"holders_more":{"type":"boolean","description":"Whether the server has more than 5000 members, so `holders` is a lower bound"}},"required":["id","name","color","position","managed","assignable","problem","problem_detail","gate","holders","holders_more"],"description":"A role of a connected server"},"DiscordServerRoleGate":{"type":"object","properties":{"id":{"type":"string","description":"The gate (`tkg_…`)"},"name":{"type":"string","description":"The gate's name"}},"required":["id","name"]},"DiscordServerChannelList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscordServerChannel"},"description":"Its text channels, in Discord's order"},"next_cursor":{"type":["string","null"],"description":"The cursor for the next page, or null after the last"}},"required":["data","next_cursor"]},"DiscordServerChannel":{"type":"object","properties":{"id":{"type":"string","description":"The channel's Discord id"},"name":{"type":"string","description":"Its name, without the #","example":"verify"},"position":{"type":"integer","description":"Its place in the channel list"},"parent_id":{"type":["string","null"],"description":"Its category, if it has one"},"can_post":{"type":"boolean","description":"Whether the bot can post the Verify message there: View Channel, Send Messages and Embed Links"},"can_pin":{"type":"boolean","description":"Whether the bot can pin there (Pin Messages), which an announced window's announcement needs"}},"required":["id","name","position","parent_id","can_post","can_pin"],"description":"A text channel of a connected server"},"TelegramConnectCode":{"type":"object","properties":{"code":{"type":"string","description":"The one-time code: it works once, within 15 minutes, from an admin of the group","example":"SYNQ-7KQ4R-2DXMP"},"link":{"type":"string","description":"Telegram's add-to-group link for Synq's bot, with the rights it needs and the code: open it on a device signed in to Telegram as an admin of the group","example":"https://t.me/synq_robot?startgroup=SYNQ-7KQ4R-2DXMP&admin=invite_users+restrict_members+pin_messages"},"command":{"type":"string","description":"What to send in the group instead, when the bot is in it already","example":"/connect SYNQ-7KQ4R-2DXMP"},"bot":{"type":"string","description":"Synq's bot's @username, without the @","example":"synq_robot"},"expires_at":{"type":"string","format":"date-time","description":"When the code stops working"}},"required":["code","link","command","bot","expires_at"]},"TelegramGroupWindow":{"type":"object","properties":{"group":{"type":"string","description":"The group (`tgg_…`)"},"state":{"type":"string","x-extensible-enum":["draft","announced","deadline","closed","cancelled"],"description":"`draft` (not announced), `announced` (people have until `ends_at`), `deadline` (it passed: those still to verify are being settled, paced), `closed` or `cancelled` (the gate now leaves those already there alone)"},"notice_days":{"type":"integer","description":"The notice period it was set up or announced with, in days"},"deadline_time":{"type":"string","description":"The deadline's time of day, `HH:MM` in `time_zone`"},"time_zone":{"type":"string","description":"The group's time zone, IANA"},"quiet_hours":{"anyOf":[{"$ref":"#/components/schemas/WindowQuietHours"},{"type":"null"}],"description":"Quiet hours, or null for none"},"name_unverified":{"type":"boolean","description":"Whether the last week names those still to verify"},"message_reachable":{"type":"boolean","description":"Whether everyone the bot can reach gets a message at 30 days, 7 days and the last day, or at 3 days where the 7-day reminder is dropped"},"headline":{"type":["string","null"],"description":"The announcement's first line; null: Synq's"},"topic":{"type":["integer","null"],"description":"The forum topic it posts and pins in; null: General"},"forum":{"type":"boolean","description":"Whether the group has topics"},"on_lost":{"anyOf":[{"type":"string","x-extensible-enum":["mute","remove"]},{"type":"null"}],"description":"What happens at the deadline to who hasn't verified, as the group's gate says (`on_lost`): `mute` or `remove`; null while no gate lets people into the group"},"topics":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Telegram's id for the topic"},"name":{"type":["string","null"],"description":"The topic's name, as Telegram last said; null until a message names it. Telegram names a topic only in its creation, a rename, or a message answering its first message, so a topic whose first message is gone stays unnamed until it's renamed"},"closed":{"type":"boolean","description":"Only admins post in a closed topic"}},"required":["id","name","closed"]},"description":"The topics Synq's bot has seen, named ones by name, then the rest by id. The Bot API lists no topics, so Synq learns each from a message in it: one nobody posted in yet shows up once someone does. Any topic can be picked by a link to a message in it (`topic_link`)"},"starts_at":{"type":["string","null"],"format":"date-time","description":"When it was announced; null for a draft"},"ends_at":{"type":"string","format":"date-time","description":"The deadline; for a draft, the one announcing now would set. It never moves earlier once announced"},"paused_at":{"type":["string","null"],"format":"date-time","description":"Since when reminders, names and messages are paused; the countdown and the deadline stay"},"extended_at":{"type":["string","null"],"format":"date-time","description":"When the deadline last moved later"},"members_listed_at":{"type":["string","null"],"format":"date-time","description":"When Synq last read the group's whole member list through Telegram's admin member listing (MTProto `channels.getParticipants`), which it does on announcing, daily and before the deadline; null: never, where this API has no MTProto app, so it knows only those who posted, reacted or joined"},"members_list_complete":{"type":["boolean","null"],"description":"Whether that reading found everyone Telegram counted; null: never read"},"closed_at":{"type":["string","null"],"format":"date-time","description":"When the closing message went, or a cancelled window said so"},"schedule":{"type":"array","items":{"type":"object","properties":{"reminder":{"type":"string","x-extensible-enum":["m1","m2","m3","m4","m5","m6","m7","m8","m9","m10","m11","d60","d45","d30","d21","d14","d7","d3","d1","h3"],"description":"`m1`…`m11` monthly, then `d60`, `d45`, `d30`, `d21`, `d14`, `d7`, `d3`, `d1` days before, and `h3` hours before"},"kind":{"type":"string","x-extensible-enum":["monthly","biweekly","weekly","final"],"description":"How often reminders come at its place in the schedule, for the dashboard’s legend"},"at":{"type":"string","format":"date-time","description":"When it goes: its day at the deadline’s time, or when quiet hours end"},"message_reachable":{"type":"boolean","description":"Whether everyone the bot can reach gets a message with it"},"names":{"type":"boolean","description":"Whether the names of those still to verify follow it"},"done":{"type":"boolean","description":"Whether it went, or passed while paused"}},"required":["reminder","kind","at","message_reachable","names","done"]},"description":"Every reminder after the announcement, in order: the announcement and these are the group messages, never in quiet hours"},"counts":{"$ref":"#/components/schemas/TelegramGroupWindowCounts"},"deadline":{"type":"object","properties":{"per_minute":{"type":"integer","description":"How many the deadline settles a minute in the group"},"minutes":{"type":"integer","description":"How long settling those still to verify and unknown would take now, quiet hours aside"}},"required":["per_minute","minutes"],"description":"The deadline's pacing"},"problem":{"type":["string","null"],"x-extensible-enum":["members_unknown","cannot_pin","cannot_post","bot_removed"],"description":"`members_unknown` (the deadline waits until Synq knows everyone), `cannot_pin`, `cannot_post` or `bot_removed`; null when nothing stops it"},"problem_detail":{"type":["string","null"],"description":"The fix, in the words the dashboard shows"},"announce_queued_at":{"type":["string","null"],"format":"date-time","description":"While Synq posts an announcement in the background: when Announce was pressed. The window stays a `draft` until it's posted, so read the window again for `announced`; null when none is going"},"announce_failure":{"type":["string","null"],"description":"Why the last announcement posted in the background posted nothing, in the words a refusal at once has (what, whose side, the fix), until the next Announce; null when the last posted, or none was asked for"},"move":{"anyOf":[{"$ref":"#/components/schemas/TelegramGroupWindowMove"},{"type":"null"}],"description":"A move to another topic (`POST …/window/move`) while it waits; null: none waiting"}},"required":["group","state","notice_days","deadline_time","time_zone","quiet_hours","name_unverified","message_reachable","headline","topic","forum","on_lost","topics","starts_at","ends_at","paused_at","extended_at","members_listed_at","members_list_complete","closed_at","schedule","counts","deadline","problem","problem_detail","announce_queued_at","announce_failure","move"]},"WindowQuietHours":{"type":"object","properties":{"from":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"When they start, `HH:MM` in the time zone","example":"22:00"},"to":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"When they end, `HH:MM`: the next morning when earlier","example":"09:00"}},"required":["from","to"],"additionalProperties":false,"description":"No reminders, names, messages or removals then; a reminder that falls in them goes when they end"},"TelegramGroupWindowCounts":{"type":"object","properties":{"members":{"type":["integer","null"],"description":"People in the group, admins and bots aside, as last read"},"admins":{"type":["integer","null"],"description":"The group's admins, bots among them, as last read"},"verified":{"type":"integer","description":"Of them, those who verified and qualify"},"to_verify":{"type":"integer","description":"Those Synq knows of who haven’t verified yet"},"unknown":{"type":["integer","null"],"description":"Those Synq doesn't know yet: the Bot API lists no members, so it learns them as they post, react or join. The deadline waits until none are left"},"settled":{"type":"integer","description":"Since the deadline: those removed or muted for not verifying"}},"required":["members","admins","verified","to_verify","unknown","settled"]},"TelegramGroupWindowMove":{"type":"object","properties":{"from_topic":{"type":["integer","null"],"description":"The topic the countdown is still pinned in until it moves; null: General"},"requested_at":{"type":"string","format":"date-time","description":"When the move was asked for"},"waits_until":{"type":["string","null"],"format":"date-time","description":"When the group's quiet hours end, while the move falls in them: Synq posts nothing there until then. Null: it goes within a few minutes"}},"required":["from_topic","requested_at","waits_until"],"description":"A move to another topic (`POST …/window/move`) while it waits: `topic` is the new one already, and Synq posts and pins the countdown there, unpins the one in `from_topic` and edits it to point there"},"WindowSettingsInput":{"type":"object","properties":{"notice_days":{"type":"integer","minimum":7,"maximum":365,"description":"The notice period, in days: 7 to 365. A shorter one keeps the same shape and drops the early reminders. 30 when never set","example":365},"deadline_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"The deadline's time of day, `HH:MM` in `time_zone`, outside quiet hours. 18:00 when never set","example":"18:00"},"time_zone":{"type":"string","minLength":1,"maxLength":64,"description":"The group's time zone, an IANA name such as `America/New_York`, or `UTC` (when never set)","example":"America/New_York"},"quiet_hours":{"anyOf":[{"$ref":"#/components/schemas/WindowQuietHours"},{"type":"null"}],"description":"Quiet hours in the time zone, or null for none. 22:00 to 09:00 when never set"},"name_unverified":{"type":"boolean","description":"Whether the last 7 days name those still to verify in the group: 20 to a message, at most 3 times each, never @everyone. On when never set"},"message_reachable":{"type":"boolean","description":"Whether everyone the bot can reach gets a message, with their own verify link, at 30 days, 7 days and the last day; where the 7-day reminder is dropped, as in a 7-day window, at 3 days instead. Telegram lets a bot message only people who wrote to it. On when never set"},"headline":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}],"description":"The announcement's first line, in the brand's own words; null: Synq's","example":"Token gate: ROD.AI is becoming a home for holders and users of our products."},"topic":{"anyOf":[{"type":"integer","minimum":2},{"type":"null"}],"description":"The forum topic it posts and pins in, by Telegram's id, from `topics`; null: General, or a group without topics. Telegram can't hide a topic from some members, so the gate covers the whole group","example":4},"topic_link":{"type":"string","minLength":1,"maxLength":512,"description":"Any forum topic, by a link to a message in it, in place of `topic`: Telegram's Copy Link on a message in the topic, `https://t.me/c/<chat>/<topic>/<message>` or `https://t.me/<username>/<topic>/<message>`. For a topic not in `topics`, or one shown there without a name. Synq keeps the topic, and `topic` answers its id","example":"https://t.me/c/1234567890/5/1234"}},"additionalProperties":false,"example":{"notice_days":365,"deadline_time":"18:00","time_zone":"America/New_York","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"Token gate: ROD.AI is becoming a home for holders and users of our products.","topic":4}},"DiscordRoleWindowPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscordRoleWindow"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"DiscordRoleWindow":{"type":"object","properties":{"server":{"type":"string","description":"The server (`dsv_…`)"},"role":{"type":"string","description":"The role's Discord id"},"role_name":{"type":"string","description":"The role's name, as Discord last said"},"state":{"type":"string","x-extensible-enum":["draft","announced","deadline","closed","cancelled"],"description":"`draft` (not announced), `announced` (holders have until `ends_at`), `deadline` (it passed: those still to verify are losing the role), `closed` or `cancelled` (the gate now leaves those already holding it alone)"},"notice_days":{"type":"integer","description":"The notice period it was set up or announced with, in days"},"deadline_time":{"type":"string","description":"The deadline's time of day, `HH:MM` in `time_zone`"},"time_zone":{"type":"string","description":"The window's time zone, IANA"},"quiet_hours":{"anyOf":[{"$ref":"#/components/schemas/DiscordWindowQuietHours"},{"type":"null"}],"description":"Quiet hours, or null for none"},"name_unverified":{"type":"boolean","description":"Whether the last week names those still to verify"},"headline":{"type":["string","null"],"description":"The announcement's title; null: Synq's"},"verify_channel":{"type":["string","null"],"description":"The server's Verify channel, where the window posts; null: none yet, so it can't be announced"},"listing":{"type":"boolean","description":"Whether Synq is still listing the server's members to find the role's holders: the deadline waits for it"},"starts_at":{"type":["string","null"],"format":"date-time","description":"When it was announced; null for a draft"},"ends_at":{"type":"string","format":"date-time","description":"The deadline; for a draft, the one announcing now would set. It never moves earlier once announced"},"paused_at":{"type":["string","null"],"format":"date-time","description":"Since when reminders and names are paused; the countdown and the deadline stay"},"extended_at":{"type":["string","null"],"format":"date-time","description":"When the deadline last moved later"},"closed_at":{"type":["string","null"],"format":"date-time","description":"When the closing message went, or a cancelled window said so"},"schedule":{"type":"array","items":{"type":"object","properties":{"reminder":{"type":"string","x-extensible-enum":["m1","m2","m3","m4","m5","m6","m7","m8","m9","m10","m11","d60","d45","d30","d21","d14","d7","d3","d1","h3"],"description":"`m1`…`m11` monthly, then `d60`, `d45`, `d30`, `d21`, `d14`, `d7`, `d3`, `d1` days before, and `h3` hours before"},"kind":{"type":"string","x-extensible-enum":["monthly","biweekly","weekly","final"],"description":"How often reminders come at its place in the schedule, for the dashboard’s legend"},"at":{"type":"string","format":"date-time","description":"When it goes: its day at the deadline’s time, or when quiet hours end"},"names":{"type":"boolean","description":"Whether the names of those still to verify follow it"},"done":{"type":"boolean","description":"Whether it went, or passed while paused"}},"required":["reminder","kind","at","names","done"]},"description":"Every reminder after the announcement, in order, each in the Verify channel; those from 7 days before ping the role"},"counts":{"$ref":"#/components/schemas/DiscordRoleWindowCounts"},"problem":{"type":["string","null"],"x-extensible-enum":["members_unknown","cannot_pin","cannot_post","bot_removed"],"description":"`members_unknown` (the deadline waits until Synq has listed the role’s holders), `cannot_pin`, `cannot_post` or `bot_removed`; null when nothing stops it"},"problem_detail":{"type":["string","null"],"description":"The fix, in the words the dashboard shows"},"announce_queued_at":{"type":["string","null"],"format":"date-time","description":"While Synq posts an announcement in the background: when Announce was pressed. The window stays a `draft` until it's posted, so read the window again for `announced`; null when none is going"},"announce_failure":{"type":["string","null"],"description":"Why the last announcement posted in the background posted nothing, in the words a refusal at once has (what, whose side, the fix), until the next Announce; null when the last posted, or none was asked for"}},"required":["server","role","role_name","state","notice_days","deadline_time","time_zone","quiet_hours","name_unverified","headline","verify_channel","listing","starts_at","ends_at","paused_at","extended_at","closed_at","schedule","counts","problem","problem_detail","announce_queued_at","announce_failure"]},"DiscordWindowQuietHours":{"type":"object","properties":{"from":{"type":"string","description":"When they start, `HH:MM` in the time zone"},"to":{"type":"string","description":"When they end, `HH:MM`"}},"required":["from","to"]},"DiscordRoleWindowCounts":{"type":"object","properties":{"holders":{"type":["integer","null"],"description":"Those who held the role when Synq took them in, bots aside: Synq lists the server's members once the window is announced; null until it has"},"verified":{"type":"integer","description":"Of them, those who verified and qualify"},"to_verify":{"type":"integer","description":"Those who haven’t verified yet"},"settled":{"type":"integer","description":"Since the deadline: those who lost the role for not verifying"}},"required":["holders","verified","to_verify","settled"]},"DiscordWindowSettingsInput":{"type":"object","properties":{"notice_days":{"type":"integer","minimum":7,"maximum":365,"description":"The notice period, in days: 7 to 365. A shorter one keeps the same shape and drops the early reminders. 30 when never set","example":365},"deadline_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"The deadline's time of day, `HH:MM` in `time_zone`, outside quiet hours. 18:00 when never set","example":"18:00"},"time_zone":{"type":"string","minLength":1,"maxLength":64,"description":"The group's time zone, an IANA name such as `America/New_York`, or `UTC` (when never set)","example":"America/New_York"},"quiet_hours":{"anyOf":[{"$ref":"#/components/schemas/WindowQuietHours"},{"type":"null"}],"description":"Quiet hours in the time zone, or null for none. 22:00 to 09:00 when never set"},"name_unverified":{"type":"boolean","description":"Whether the last 7 days name those still to verify in the group: 20 to a message, at most 3 times each, never @everyone. On when never set"},"headline":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}],"description":"The announcement's first line, in the brand's own words; null: Synq's","example":"Token gate: ROD.AI is becoming a home for holders and users of our products."}},"additionalProperties":false},"OwnBotList":{"type":"object","properties":{"discord":{"anyOf":[{"$ref":"#/components/schemas/OwnBot"},{"type":"null"}],"description":"Its own Discord app, if it set one"},"telegram":{"anyOf":[{"$ref":"#/components/schemas/OwnBot"},{"type":"null"}],"description":"Its own Telegram bot, if it set one"}},"required":["discord","telegram"]},"OwnBot":{"type":"object","properties":{"id":{"type":"string","description":"The bot's id at Synq","example":"bot_01h455vb4pex5vsknk084sn02q"},"platform":{"type":"string","x-extensible-enum":["discord","telegram"],"description":"`discord` or `telegram`"},"external_id":{"type":"string","description":"Discord: the app's Application ID; Telegram: the bot's user id","example":"1203847562019384756"},"name":{"type":"string","description":"What members see it called","example":"Mollyverse Bot"},"username":{"type":"string","description":"Discord: the bot user's name; Telegram: its @username, without the @","example":"MollyverseBot"},"serves":{"type":"integer","description":"How many servers or groups it serves now"},"setup":{"type":"object","properties":{"interactions_endpoint_url":{"type":["string","null"],"description":"Discord's: the URL to set as the app's Interactions Endpoint URL on its General Information page"},"redirect_uri":{"type":["string","null"],"description":"Discord's: the redirect to add on the app's OAuth2 page, for Add to Discord"},"webhook_url":{"type":["string","null"],"description":"Telegram's: where Synq pointed the bot's webhook; nothing to set in BotFather"}},"required":["interactions_endpoint_url","redirect_uri","webhook_url"],"description":"What to set where, in Discord’s portal"},"created_at":{"type":"string","format":"date-time","description":"When it was first set"},"updated_at":{"type":"string","format":"date-time","description":"When its credentials last changed"}},"required":["id","platform","external_id","name","username","serves","setup","created_at","updated_at"],"description":"An org's own Discord app or Telegram bot"},"AuditEventPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"ExportedAuditEvent":{"allOf":[{"$ref":"#/components/schemas/AuditEvent"},{"type":"object","properties":{"org_id":{"type":"string","description":"The org it belongs to","example":"org_01h455vb4pex5vsknk084sn02q"},"brand":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"name":{"type":"string","description":"Its name now","example":"Acme"}},"required":["id","name"],"description":"The brand it happened in, or null for the org's own"}},"required":["org_id","brand"]}]},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string","description":"Stripe's checkout session id","example":"cs_test_a1b2c3"},"url":{"type":"string","format":"uri","description":"Stripe's checkout page: send the person here"}},"required":["id","url"]},"CheckoutRequest":{"type":"object","properties":{"plan":{"type":"string","description":"A plan with a price (`GET /v1/plans`)","example":"pro"},"interval":{"type":"string","enum":["month","year"],"default":"month","description":"Billed monthly or yearly","example":"month"},"success_url":{"type":"string","maxLength":2048,"format":"uri","description":"Where Stripe sends the person once they've paid. `{CHECKOUT_SESSION_ID}` in it becomes the session's id. The plan changes moments later, when Stripe's webhook arrives.","example":"https://app.example.com/settings/billing"},"cancel_url":{"type":"string","maxLength":2048,"format":"uri","description":"Where Stripe sends the person if they go back","example":"https://app.example.com/settings/billing"}},"required":["plan","success_url","cancel_url"],"additionalProperties":false},"PlanChange":{"type":"object","properties":{"applies":{"type":"string","x-extensible-enum":["now","at_period_end"],"description":"An upgrade applies now, prorated and invoiced at once (on a trial, nothing is prorated or invoiced, and the trial carries on), and so does keeping the plan the org is on; a downgrade, or the free plan, at the end of the period paid for, a trial’s last day on a trial"},"at":{"type":"string","format":"date-time","description":"When a downgrade applies, or the paid plan ends for the free one: on a trial, when the trial ends","example":"2026-11-04T16:00:00.000Z"}},"required":["applies"]},"PaymentProblem":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","properties":{"hosted_invoice_url":{"type":"string","format":"uri","description":"With `payment_requires_action`: Stripe's page for the payment's invoice, where the person confirms it with their bank"},"invoice":{"$ref":"#/components/schemas/Invoice"},"expires_at":{"type":"string","format":"date-time","description":"With `payment_requires_action`: when the payment stops waiting, after which nothing is charged and nothing changes"},"change":{"type":"string","x-extensible-enum":["end_trial","change_plan"],"description":"With `payment_requires_action`: what the payment does once it's confirmed, `end_trial` or `change_plan`","example":"change_plan"},"plan":{"type":"string","description":"With `payment_requires_action`: the plan the org is on once it's paid"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"With `payment_requires_action`: how often the org pays once it's paid"}}}]},"Invoice":{"type":"object","properties":{"id":{"type":"string","description":"Stripe's invoice id","example":"in_1Abc"},"number":{"type":["string","null"],"description":"The invoice's number, or null while it's a draft","example":"SYNQ-0001"},"status":{"type":["string","null"],"description":"Stripe's: `open`, `paid`, `uncollectible` or `void`","example":"paid"},"currency":{"type":"string","description":"The invoice's currency, ISO 4217, lowercase","example":"usd"},"total_cents":{"type":"string","pattern":"^-?\\d+$","description":"Its total, in cents of `currency`, as an integer string; below 0 when credits exceed the charges","example":"2500"},"amount_due_cents":{"type":"string","pattern":"^\\d+$","description":"What is left to pay, in cents of `currency`, as an integer string","example":"2500"},"created":{"type":"string","format":"date-time","description":"When Stripe made the invoice","example":"2026-10-04T16:00:00.000Z"},"period_start":{"type":"string","format":"date-time","description":"The start of the period it bills"},"period_end":{"type":"string","format":"date-time","description":"The end of the period it bills"},"hosted_invoice_url":{"type":["string","null"],"format":"uri","description":"Stripe's page for it"},"invoice_pdf":{"type":["string","null"],"format":"uri","description":"Stripe's PDF of it, or null while it's a draft"}},"required":["id","number","status","currency","total_cents","amount_due_cents","created","period_start","period_end","hosted_invoice_url","invoice_pdf"]},"PlanChangeRequest":{"type":"object","properties":{"plan":{"type":"string","description":"A plan with a price (`GET /v1/plans`), or the free plan, which ends the paid one at the end of its period. The plan the org is on, at the cadence it pays, keeps it: it calls off what waits for the period’s end (the plan’s end, or a move down)","example":"scale"},"interval":{"type":"string","enum":["month","year"],"default":"month","description":"How often the org pays on the new plan. `month` by default","example":"month"}},"required":["plan"],"additionalProperties":false},"PortalSession":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Stripe's customer portal: send the person here"}},"required":["url"]},"PortalRequest":{"type":"object","properties":{"return_url":{"type":"string","maxLength":2048,"format":"uri","description":"Where the portal’s back link goes","example":"https://app.example.com/settings/billing"},"flow":{"type":"string","enum":["payment_method_update"],"description":"Straight to one task: `payment_method_update` adds or changes the card, as a trial’s \"Add a card\" does, then sends the person back to `return_url`"}},"required":["return_url"],"additionalProperties":false},"InvoiceList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"},"description":"This page's invoices, newest first"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]},"Usage":{"type":"object","properties":{"month":{"type":"string","description":"The month counted, `YYYY-MM`, UTC","example":"2026-10"},"plan":{"type":"string","description":"The org's plan","example":"pro"},"monthly_active_users":{"$ref":"#/components/schemas/MonthlyActiveUsage"},"apps":{"type":"object","properties":{"count":{"type":"integer","description":"How many count toward the limit: every app the org made but `development`","example":1},"limit":{"type":["integer","null"],"description":"The plan's limit, or null for none","example":1},"development":{"type":"integer","description":"Its development app beside them, which doesn't count: 1 when it has one (an app whose redirect URIs are all on localhost, 127.0.0.1 or [::1]), else 0. A second one counts in `count`","example":1},"held_by":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PlanQuotaApp"},"description":"The apps in `count`, newest first, as a `plan_quota_exceeded` refusal's `held_by` names them: to make room, change one into the app you want (`PATCH /v1/orgs/{org}/brands/{brand}/apps/{app}`) or delete it (`DELETE`, the same path). Null when the plan has no limit, so nothing holds a place"}},"required":["count","limit","development","held_by"],"description":"Apps the org made itself, and the plan's limit (null: none). Apps that registered themselves never count"},"brands":{"type":"object","properties":{"count":{"type":"integer","description":"How many the org has"},"limit":{"type":["integer","null"],"description":"The plan's limit, or null for none"}},"required":["count","limit"],"description":"Its brands, counting any deleted in the last 30 days, and the plan's limit (null: none)"}},"required":["month","plan","monthly_active_users","apps","brands"]},"MonthlyActiveUsage":{"type":"object","properties":{"count":{"type":"integer","description":"Users of its brands who got tokens this month (signed in, or refreshed), including any deleted since","example":51200},"included":{"type":["integer","null"],"description":"The plan's allowance; null: no limit","example":50000},"over":{"type":"integer","description":"Above the allowance: billed at the plan’s overage price (`price.mau_overage_micros` in `GET /v1/plans`), or not billed on a plan with none, such as free Starter","example":1200}},"required":["count","included","over"]},"BillingState":{"type":"object","properties":{"plan":{"type":"string","description":"The org's plan","example":"pro"},"status":{"type":"string","x-extensible-enum":["free","trialing","active","past_due","canceling"],"description":"`free`: no subscription. `trialing`: on a trial, no charge yet. `active`: paying. `past_due`: a payment failed and Stripe is retrying. `canceling`: set to end at `cancel_at`, moving to the free plan then (cancelled in the billing portal, or moved to the free plan through `POST …/billing/plan`)","example":"trialing"},"interval":{"type":["string","null"],"x-extensible-enum":["month","year"],"description":"How often the org pays, or null without a subscription","example":"month"},"trial_ends_at":{"type":["string","null"],"format":"date-time","description":"While on a trial, canceling or not: when it ends","example":"2026-11-04T16:00:00.000Z"},"current_period_end":{"type":["string","null"],"format":"date-time","description":"When the org's current billing period ends, or null without a subscription"},"cancel_at":{"type":["string","null"],"format":"date-time","description":"While canceling: when the plan ends and the org moves to the free plan. Null otherwise","example":"2026-11-22T16:00:00.000Z"},"scheduled_change":{"type":["object","null"],"properties":{"plan":{"type":"string","description":"The plan the org moves to"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the org pays after it"},"at":{"type":"string","format":"date-time","description":"When the change applies"}},"required":["plan","interval","at"],"description":"A downgrade that applies at the end of the period paid for, or when a trial ends, which keeps its trial until then. Null while `canceling`: a plan set to end calls a waiting change off, so the two never wait together (`called_off_change`)"},"called_off_change":{"type":["object","null"],"properties":{"plan":{"type":"string","description":"The plan the org was to move to"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the org was to pay after it"}},"required":["plan","interval"],"description":"While `canceling`: the downgrade that was waiting when the plan was set to end, which that end called off. Renewing the plan brings it back, to apply at the period's end again: in the billing portal, or `POST …/billing/plan` with the plan the org is on. Null otherwise"},"card_on_file":{"type":["boolean","null"],"description":"While trialing: whether Stripe has a card to charge when the trial ends (without one the org moves to the free plan then). Null otherwise"},"payment_requires_action":{"type":["object","null"],"properties":{"hosted_invoice_url":{"type":"string","format":"uri","description":"Stripe's page for the payment's invoice: send the person who holds the card here. Their bank's check (3-D Secure) shows there, and once they confirm it Stripe takes the payment and the change applies","example":"https://invoice.stripe.com/i/acct_1Abc/test_YWNj"},"invoice":{"$ref":"#/components/schemas/Invoice"},"expires_at":{"type":"string","format":"date-time","description":"When the payment stops waiting: unconfirmed then, Stripe voids the invoice, nothing is charged and nothing changes. A day at most, or the trial's end if that comes sooner","example":"2026-11-17T16:00:00.000Z"},"change":{"type":"string","x-extensible-enum":["end_trial","change_plan"],"description":"What the payment does once it's confirmed: `end_trial` ends the trial now and pays for the plan (`POST …/billing/trial/end`); `change_plan` moves the org up to `plan`, billed every `interval` (`POST …/billing/plan`)","example":"change_plan"},"plan":{"type":"string","description":"The plan the org is on once it's paid","example":"scale"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the org pays once it's paid"}},"required":["hosted_invoice_url","invoice","expires_at","change","plan","interval"],"description":"A payment that waits for the person's bank to confirm it (3-D Secure), with Stripe's page to confirm it on: one that ends the trial now (`POST …/billing/trial/end`), or an upgrade's (`POST …/billing/plan`), as `change` says. The change applies once they confirm it. Null otherwise"},"trial_available":{"type":"boolean","description":"Whether the org is on a free plan, has no subscription and has never had a trial"}},"required":["plan","status","interval","trial_ends_at","current_period_end","cancel_at","scheduled_change","called_off_change","card_on_file","payment_requires_action","trial_available"]},"Trial":{"type":"object","properties":{"plan":{"type":"string","description":"The plan on trial","example":"pro"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the org pays once the trial ends"},"trial_ends_at":{"type":"string","format":"date-time","description":"When the trial ends and the plan is billed, unless the org cancels first","example":"2026-11-04T16:00:00.000Z"}},"required":["plan","interval","trial_ends_at"]},"TrialRequest":{"type":"object","properties":{"plan":{"type":"string","description":"A plan with trial days (`GET /v1/plans`)","example":"pro"},"interval":{"type":"string","enum":["month","year"],"default":"month","description":"How often the org pays once the trial ends. `month` by default","example":"month"}},"required":["plan"],"additionalProperties":false},"TrialEndPreview":{"type":"object","properties":{"plan":{"type":"string","description":"The plan on trial, paid for from today","example":"pro"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the org pays for it"},"currency":{"type":"string","description":"The amounts' currency, ISO 4217, lowercase","example":"usd"},"amount_due_today_cents":{"type":"string","pattern":"^\\d+$","description":"Charged today on the card, in cents of `currency`, as an integer string: Stripe's invoice for the plan's first period, nothing prorated","example":"2500"},"price_cents":{"type":"string","pattern":"^\\d+$","description":"The plan's price for the interval, in cents of `currency`, as an integer string: what each later period costs, before users over the allowance","example":"2500"},"next_charge_at":{"type":"string","format":"date-time","description":"When Stripe charges next: a period from today, since paying now moves the billing date to today","example":"2026-12-16T16:00:00.000Z"},"trial_ends_at":{"type":"string","format":"date-time","description":"The trial's own last day, which paying now replaces","example":"2026-11-29T16:00:00.000Z"},"card":{"type":["object","null"],"properties":{"brand":{"type":"string","description":"The card's brand, as Stripe names it: `visa`, `mastercard`, `amex`…","example":"visa"},"last4":{"type":"string","description":"The card number's last four digits","example":"4242"}},"required":["brand","last4"],"description":"The card Stripe charges today: its brand and last four digits. Null for another kind of payment method"}},"required":["plan","interval","currency","amount_due_today_cents","price_cents","next_charge_at","trial_ends_at","card"]},"TrialEnded":{"type":"object","properties":{"plan":{"type":"string","description":"The plan paid for from today","example":"pro"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the org pays for it"},"current_period_end":{"type":"string","format":"date-time","description":"The end of the period paid for today: when Stripe charges next","example":"2026-12-16T16:00:00.000Z"},"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["plan","interval","current_period_end","invoice"]},"PlanChangePreview":{"type":"object","properties":{"action":{"type":"string","x-extensible-enum":["current","keep","start_trial","checkout","upgrade","downgrade","cancel","contact_sales"],"description":"What moving to the plan takes: `current`, it is the org’s already and nothing waits to change it; `keep`, it is the org’s, and choosing it calls off what waits for the period’s end (the plan’s end, which renews it and brings back a downgrade that end called off, or a downgrade), `POST …/billing/plan`; `start_trial`, `POST …/billing/trial`; `checkout`, `POST …/billing/checkout`; `upgrade` (now, prorated, or on a trial with nothing prorated) or `downgrade` (at the period’s end, or the trial’s), `POST …/billing/plan`; `cancel`, ending the paid plan at the period’s end (or the trial’s) to move to the free plan, `POST …/billing/plan` with the free plan, as cancelling in the billing portal does; `contact_sales`, a plan sold by contract","example":"upgrade"},"plan":{"type":"string","description":"The plan previewed","example":"scale"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the org would pay"},"currency":{"type":"string","description":"The amounts' currency, ISO 4217, lowercase","example":"usd"},"amount_due_today_cents":{"type":"string","pattern":"^\\d+$","description":"Charged now, in cents of `currency`, as an integer string: prorated for an upgrade, the price at checkout, `0` for a trial or a downgrade","example":"17500"},"price_cents":{"type":["string","null"],"pattern":"^\\d+$","description":"The plan’s price for the interval, in cents of `currency`, as an integer string; null for a plan sold by contract","example":"20000"},"trial_days":{"type":["integer","null"],"description":"How long a trial of it lasts, or null when the org can’t start one","example":14},"applies":{"type":["string","null"],"x-extensible-enum":["now","at_period_end"],"description":"`now`, or `at_period_end` for a downgrade or a cancel (a trial’s end, on a trial); null when nothing changes"},"at":{"type":["string","null"],"format":"date-time","description":"When a downgrade or cancel applies"},"gains":{"type":"array","items":{"type":"string","x-extensible-enum":["auth.byo_connections","auth.custom_providers","integration.webhooks","branding.advanced_theme","branding.remove_powered_by","branding.default_avatars","auth.token_gating","branding.custom_email_domain","branding.custom_domain","integration.own_bots","team.brand_roles","team.sso","integration.audit_log_streams"]},"description":"The features the org gains"},"loses":{"type":"array","items":{"type":"string","x-extensible-enum":["auth.byo_connections","auth.custom_providers","integration.webhooks","branding.advanced_theme","branding.remove_powered_by","branding.default_avatars","auth.token_gating","branding.custom_email_domain","branding.custom_domain","integration.own_bots","team.brand_roles","team.sso","integration.audit_log_streams"]},"description":"The features the org loses"},"quotas":{"type":"object","properties":{"apps":{"type":"object","properties":{"from":{"type":["integer","null"],"description":"On the plan now"},"to":{"type":["integer","null"],"description":"On the plan previewed"}},"required":["from","to"],"description":"Null: no limit"},"brands":{"type":"object","properties":{"from":{"type":["integer","null"],"description":"On the plan now"},"to":{"type":["integer","null"],"description":"On the plan previewed"}},"required":["from","to"],"description":"Null: no limit"},"monthly_active_users":{"type":"object","properties":{"from":{"type":["integer","null"],"description":"On the plan now"},"to":{"type":["integer","null"],"description":"On the plan previewed"}},"required":["from","to"],"description":"Null: no limit"},"audit_retention_days":{"type":"object","properties":{"from":{"type":["integer","null"],"description":"On the plan now"},"to":{"type":["integer","null"],"description":"On the plan previewed"}},"required":["from","to"],"description":"How many days the audit log keeps entries; null: as long as the org needs"}},"required":["apps","brands","monthly_active_users","audit_retention_days"],"description":"The org's limits, and its audit log's keeping, on its plan now and on this one"},"over_limits":{"type":"array","items":{"type":"object","properties":{"quota":{"type":"string","x-extensible-enum":["apps","brands"],"description":"What it is over: `apps` or `brands`"},"count":{"type":"integer","description":"How many the org has"},"limit":{"type":"integer","description":"The plan's limit"}},"required":["quota","count","limit"]},"description":"What the org has above the plan’s limits: it keeps working, and the org can’t make more until it is under"}},"required":["action","plan","interval","currency","amount_due_today_cents","price_cents","trial_days","applies","at","gains","loses","quotas","over_limits"]},"PlanChangePreviewRequest":{"type":"object","properties":{"plan":{"type":"string","description":"The plan to preview moving to","example":"scale"},"interval":{"type":"string","enum":["month","year"],"default":"month","description":"How often the org would pay. `month` by default"}},"required":["plan"],"additionalProperties":false},"UpgradeRequest":{"type":"object","properties":{"id":{"type":"string","description":"The request's id","example":"upr_01h455vb4pex5vsknk084sn02q"},"plan":{"type":"string","description":"The plan asked for","example":"pro"},"interval":{"type":"string","x-extensible-enum":["month","year"],"description":"How often the member asked to pay"},"note":{"type":["string","null"],"description":"The member's note for the owners, or null"},"requested_by":{"type":"object","properties":{"email":{"type":["string","null"],"description":"Their email address, or null"},"name":{"type":["string","null"],"description":"Their name, or null"}},"required":["email","name"],"description":"Who asked"},"created":{"type":"string","format":"date-time","description":"When the member asked"}},"required":["id","plan","interval","note","requested_by","created"]},"UpgradeRequestCreate":{"type":"object","properties":{"plan":{"type":"string","description":"The plan to move to","example":"pro"},"interval":{"type":"string","enum":["month","year"],"default":"month","description":"How often to pay on the plan. `month` by default"},"note":{"type":"string","maxLength":500,"description":"For the owners, up to 500 characters"}},"required":["plan"],"additionalProperties":false},"UpgradeRequestPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UpgradeRequest"},"description":"This page's rows, in the list's order"},"next_cursor":{"type":["string","null"],"description":"Where the next page starts, or null on the last page."}},"required":["data","next_cursor"]}},"parameters":{}},"paths":{"/.well-known/oauth-protected-resource":{"get":{"operationId":"getManagementResourceMetadata","summary":"Discover the management API resource","description":"Public metadata for proactive discovery from the known management resource identifier (the API origin). Existing client eligibility, token audiences, org permissions and API key rules still apply. Management has no OAuth scopes to advertise. This document is separate from MCP metadata and is named by management authentication challenges.","security":[],"responses":{"200":{"description":"Public management resource metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementResourceMetadata"},"example":{"resource":"https://example.com","authorization_servers":["https://example.com"],"bearer_methods_supported":["header"],"resource_name":"Synq Management API"}}}}}}},"/v1/plans":{"get":{"operationId":"listPlans","x-permission":"none","summary":"List the plans","description":"Every plan, cheapest first: its features, quotas and price. Public: it needs no credential.","security":[],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"The plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanPage"},"example":{"data":[{"code":"pro","name":"Pro","features":[{"feature":"integration.webhooks","status":"available"}],"quotas":{"apps":10,"development_apps":1,"brands":3,"monthly_active_users":50000,"audit_retention_days":30},"price":{"currency":"usd","monthly_cents":"2500","annual_cents":"25000","mau_overage_micros":"5000","trial_days":14},"contact_sales":false}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests from this address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/provider-scopes":{"get":{"operationId":"listProviderScopes","x-permission":"none","summary":"List the extra scopes a brand may ask the providers for","description":"Every scope beyond Synq’s own minimum that a brand may ask an upstream sign-in provider for, provider by provider in Synq’s order, from each provider’s reviewed list: what it shares in plain words, whether it needs your own app there, how what it grants reaches you, and whether it can be asked for today. Anything not listed is refused (`scope_not_allowed`). Public: it needs no credential.","security":[],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"description":"Only this provider’s scopes","example":"telegram"},"required":false,"description":"Only this provider’s scopes","name":"provider","in":"query"}],"responses":{"200":{"description":"The extra scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderScopePage"},"example":{"data":[{"provider":"telegram","scope":"telegram:bot_access","description":"Let {brand}’s Telegram bot send you messages","needs_own_app":true,"delivery":"grant","status":"available","account_types":null,"source_url":"https://core.telegram.org/bots/telegram-login"}],"next_cursor":"string"}}}},"400":{"description":"A limit, cursor or provider that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests from this address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs":{"get":{"operationId":"listOrgs","x-permission":"none","summary":"List the orgs the caller can act in","description":"An API key's own org; a person's orgs, those they are a member of. Needs no permission.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of orgs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgPage"},"example":{"data":[{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"acme","name":"Acme","default_brand_id":"brd_01h455vb4pex5vsknk084sn02q","plan":"starter","created_at":"2026-10-01T12:00:00.000Z","disabled_at":null,"disabled_reason":null}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createOrg","x-permission":"none","summary":"Make an org","description":"Makes an org with its default brand, or with none (`first_brand: false`) for a brand moving in from another org, and makes the caller its owner. Only a person can: an API key acts in its own org. It wants a verified, non-disposable email address (`email_unverified` or `org_creation_closed`). Where Synq isn't open for sign-up, only the people it lets in can (`org_creation_closed`), and one person owns a limited number of free orgs (`org_quota_exceeded`; orgs on a paid plan don't count, an org on a trial does). Recorded as `org.created`.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCreate"},"example":{"name":"Acme","slug":"acme","issuer_slug":"acme","first_brand":true}}}},"responses":{"201":{"description":"The new org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"acme","name":"Acme","default_brand_id":"brd_01h455vb4pex5vsknk084sn02q","plan":"starter","created_at":"2026-10-01T12:00:00.000Z","disabled_at":null,"disabled_reason":null}}}},"400":{"description":"A body that is not valid, or a slug in the wrong format or reserved","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key, which acts in its own org only; a person whose email address isn't verified; a person Synq doesn't take tenants from here; or one who owns as many free orgs as one person may","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A slug another org or brand has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/org-allowance":{"get":{"operationId":"getOrgAllowance","x-permission":"none","summary":"Read whether the caller may make another org","description":"Whether `POST /v1/orgs` would make the caller an org now, and if not, why: the cap on the free orgs one person owns, counting free orgs deleted in the last 30 days, where orgs on a paid plan don't count and an org on a trial does (`org_quota_exceeded`, with when a slot frees up), or Synq's sign-up policy (`org_creation_closed`, `email_unverified`). For a page that offers a new org only when making one would work. Making one still checks everything again. Only a person has one: an API key acts in its own org. Needs no permission.","security":[{"bearer":[]}],"responses":{"200":{"description":"The caller's allowance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAllowance"},"example":{"can_create":false,"refusal":"org_quota_exceeded","limit":3,"owned":3,"next_slot_at":"2026-11-29T12:00:00.000Z","counted_orgs":[{"id":"org_01h455vb4pex5vsknk084sn02q","name":"Acme","slug":"acme","plan":"starter","on_trial":false,"yours":true,"deleted_at":null,"counts_until":null}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key, which acts in its own org only","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}":{"get":{"operationId":"getOrg","summary":"Read an org","description":"Needs `org.read`, which every member has.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"200":{"description":"The org","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"acme","name":"Acme","default_brand_id":"brd_01h455vb4pex5vsknk084sn02q","plan":"starter","created_at":"2026-10-01T12:00:00.000Z","disabled_at":null,"disabled_reason":null}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateOrg","summary":"Change an org","description":"Its name, its slug or its default brand: making another brand the default is how the old default can be deleted on its own. Needs `org.edit`. Recorded as `org.updated`. Its brands' issuer slugs never change.","security":[{"bearer":[]}],"x-permission":"org.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUpdate"},"example":{"name":"Acme","slug":"acme","default_brand_id":"brd_01JXA9K1Q2W3E4R5T6Y7U8I9O0"}}}},"responses":{"200":{"description":"The org, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"acme","name":"Acme","default_brand_id":"brd_01h455vb4pex5vsknk084sn02q","plan":"starter","created_at":"2026-10-01T12:00:00.000Z","disabled_at":null,"disabled_reason":null}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A slug another org has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteOrg","summary":"Delete an org","description":"At once, nothing serves it: not its routes, its API keys or its brands' issuers. A paid plan ends with it: its Stripe subscription is canceled at once, with nothing prorated and no final invoice, so the rest of the period isn't refunded and nothing more is charged. It is purged 30 days later, and its issuer slugs are never used again. Needs `org.delete`, which only the owner has. Recorded as `org.deleted`.","security":[{"bearer":[]}],"x-permission":"org.delete","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/slugs/{slug}":{"get":{"operationId":"checkSlug","x-permission":"none","summary":"Check a slug","description":"Whether an org could take it as its slug, and a brand as its issuer slug. A new org needs both, unless it names its default brand's issuer slug.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","maxLength":100,"description":"The slug to check, as typed: any string, and the answer says why one can’t be","example":"acme"},"required":true,"description":"The slug to check, as typed: any string, and the answer says why one can’t be","name":"slug","in":"path"}],"responses":{"200":{"description":"Whether it is free","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlugAvailability"},"example":{"slug":"acme","org":{"available":true,"reason":"format"},"issuer":{"available":true,"reason":"format"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/claimable-orgs":{"post":{"operationId":"createClaimableOrg","x-permission":"none","summary":"Make a claimable org","description":"What `npx synqauth init` calls: an org with its default brand and one development app, made with no account and no credential, so a developer can sign someone in to their app on their laptop before signing up. Nobody is its member, so nothing can change it but claiming it.\n\nUntil someone claims it with `claim.url` (or `POST /v1/claimable-orgs/claim`), its app takes https redirect URIs on a loopback address only, its brand takes 25 users and little email, and its sign-in pages say it is a development sign-in nobody has claimed. Unclaimed after 7 days, it is deleted.\n\nOnly where Synq makes claimable orgs and is open for sign-up (`org_creation_closed` otherwise), and a few a day from one address. Recorded as `org.created` (`metadata.claimable`) and `app.created`, by `anonymous`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimableOrgCreate"},"example":{"name":"acme-web","app_type":"web","redirect_uris":["https://localhost:3000/api/auth/callback"],"post_logout_redirect_uris":[]}}}},"responses":{"201":{"description":"The claimable org, its app and how to claim it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimableOrgMade"},"example":{"org":{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"dev-k3v9q2m7xa","name":"acme-web"},"issuer":"https://dev-k3v9q2m7xa.auth.synq.build","app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","client_secret":"string","app_type":"web","redirect_uris":["https://app.acme.example"]},"claim":{"token":"synq_claim_…","url":"https://app.acme.example","expires_at":"2026-10-21T12:00:00.000Z"},"limits":{"users":25}}}}},"400":{"description":"A body that is not valid, or a redirect URI that is not https on a loopback address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Synq doesn't make claimable orgs here, or isn't open for sign-up","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many from this address, or from everyone at once","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/claimable-orgs/lookup":{"post":{"operationId":"lookUpClaimableOrg","x-permission":"none","summary":"Read what a claim token would claim","description":"The org a claim token names, while it can be claimed: for the page that asks before claiming. A person only; the token is in the body, never the URL. `into_orgs` lists the orgs the caller may claim it into instead, as a new brand (`POST /v1/claimable-orgs/claim-into`), each with its room for one more.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimToken"},"example":{"claim_token":"synq_claim_…"}}}},"responses":{"200":{"description":"What the token would claim","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimableOrgView"},"example":{"org":{"id":"string","slug":"acme","name":"Acme"},"issuer":"string","apps":0,"users":0,"expires_at":"2026-10-21T12:00:00.000Z","into_orgs":[{"id":"org_01h455vb4pex5vsknk084sn02q","name":"Acme","slug":"acme","role":"owner","plan":"pro","brands":2,"brand_limit":3,"refusal":null}]}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person claims an org","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No org this token can claim: claimed already, expired or never made","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/claimable-orgs/claim":{"post":{"operationId":"claimOrg","x-permission":"none","summary":"Claim a claimable org","description":"Makes the caller the owner of the org a claim token names: from then on it is an org like any other, on its plan's limits, and its sign-in pages no longer say it is unclaimed. Like making an org, it wants a person with a verified email address (`email_unverified`), where Synq takes tenants from them (`org_creation_closed`), owning fewer free orgs than one person may (`org_quota_exceeded`; orgs on a paid plan don't count). The token works once. Recorded as `org.claimed`. To add it to an org the caller has instead, as a brand, `POST /v1/claimable-orgs/claim-into`.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimToken"},"example":{"claim_token":"synq_claim_…"}}}},"responses":{"200":{"description":"The org, now the caller’s","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Org"},"example":{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"acme","name":"Acme","default_brand_id":"brd_01h455vb4pex5vsknk084sn02q","plan":"starter","created_at":"2026-10-01T12:00:00.000Z","disabled_at":null,"disabled_reason":null}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key; a person whose email address isn't verified; a person Synq doesn't take tenants from here; or one who owns as many free orgs as one person may","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No org this token can claim: claimed already, expired or never made","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/claimable-orgs/claim-into":{"post":{"operationId":"claimIntoOrg","x-permission":"none","summary":"Claim a claimable org into an org you have, as a brand","description":"The other way to claim what `npx synqauth init` made: instead of becoming an org of its own, its brand joins `org`, an org the caller owns or is an admin of, as a new brand, with its apps, keys and users. Its id, issuer, client ids, secrets and signing keys stay the same, so the app's `.env.local` keeps working and its users stay signed in; its development limits go, and the org's plan's apply. The development org, left with no brand, closes: deleted, and purged 30 days on. `POST /v1/claimable-orgs/lookup` lists the orgs it can join (`into_orgs`).\n\nA person only, the org's owner or an admin (`forbidden` otherwise; an org they aren't a member of is `not_found`), with the claim token, and with room under the org's plan for another brand (`plan_quota_exceeded`, naming the org, its plan and the one with room). A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. The token works once: a used or expired one is `not_found`. Recorded in the org's log as `brand.claimed` (from `npx synqauth init`), also the event of its All brands endpoints, and in the development org's as `org.deleted` (`reason: claimed_into_org`).","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimIntoOrg"},"example":{"claim_token":"synq_claim_…","org":"org_01h455vb4pex5vsknk084sn02q"}}}},"responses":{"200":{"description":"The brand, now one of your org’s","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimedIntoOrg"},"example":{"org":{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"acme","name":"Acme"},"brand":{"id":"brd_01h455vb4pex5vsknk084sn02q","name":"acme-web","issuer_slug":"dev-k3v9q2m7xa","issuer":"https://dev-k3v9q2m7xa.auth.synq.build","is_default":false},"development_org":{"id":"org_01h455vb4pex5vsknk084sn02r","slug":"dev-k3v9q2m7xa"}}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key; a person who isn't the org's owner or an admin, or signed in more than 5 minutes ago; or an org whose plan has no room for another brand","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No org this token can claim (claimed already, expired or never made), or no org of yours with that id","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Something keeps the brand from moving into the org (`reason` says what, `detail` the fix)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An org that can't take a brand: Synq's own, or one Synq disabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The brand can't be sealed again for your org here just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands":{"get":{"operationId":"listBrands","summary":"List an org's brands","description":"Oldest first: the brands the credential holds a brand role in, which is every brand for one with a role on All brands. Needs `org.brands.view` in each brand listed.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of brands","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandPage"},"example":{"data":[{"id":"brd_01h455vb4pex5vsknk084sn02q","org_id":"org_01h455vb4pex5vsknk084sn02q","issuer_slug":"acme","issuer":"https://acme.auth.synq.build","custom_domain_issuer":"https://login.acme.com","name":"Acme","is_default":true,"sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"logo_url":"https://app.acme.example","icon_url":"https://app.acme.example","primary_color":"#4f46e5","background_color":"#ffffff","support_email":"help@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createBrand","summary":"Make a brand","description":"A new user pool with its own issuer. The org's own apps at sign-in providers sign it in too, so each must register its callback: `warnings` says so (`org_provider_apps_need_redirect_uri`), naming each. Needs `org.brands.edit`, and room under the org's plan (403 `plan_quota_exceeded`, naming the plan that has room in `required_plan`). A brand deleted in the last 30 days still takes its place: its issuer slug is held until it's purged. Recorded as `brand.created`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandCreate"},"example":{"name":"Acme","sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"primary_color":"#4f46e5","background_color":"#4f46e5","support_email":"ana@example.com","privacy_policy_url":"https://acme.example/privacy","terms_of_service_url":"https://acme.example/privacy","issuer_slug":"acme-games"}}}},"responses":{"201":{"description":"The new brand, and what needs doing now it is made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandCreated"},"example":{"id":"brd_01h455vb4pex5vsknk084sn02q","org_id":"org_01h455vb4pex5vsknk084sn02q","issuer_slug":"acme","issuer":"https://acme.auth.synq.build","custom_domain_issuer":"https://login.acme.com","name":"Acme","is_default":true,"sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"logo_url":"https://app.acme.example","icon_url":"https://app.acme.example","primary_color":"#4f46e5","background_color":"#ffffff","support_email":"help@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"org_provider_apps_need_redirect_uri","message":"string"}]}}}},"400":{"description":"A body that is not valid, or an issuer slug in the wrong format or reserved","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan allows no more brands","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An issuer slug another brand has, or had","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}":{"get":{"operationId":"getBrand","summary":"Read a brand","description":"Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The brand","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"},"example":{"id":"brd_01h455vb4pex5vsknk084sn02q","org_id":"org_01h455vb4pex5vsknk084sn02q","issuer_slug":"acme","issuer":"https://acme.auth.synq.build","custom_domain_issuer":"https://login.acme.com","name":"Acme","is_default":true,"sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"logo_url":"https://app.acme.example","icon_url":"https://app.acme.example","primary_color":"#4f46e5","background_color":"#ffffff","support_email":"help@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateBrand","summary":"Change a brand","description":"Its name, branding, links, sign-up switch and built-in ways to sign in; never its issuer slug. Needs `org.brands.edit`. Recorded as `brand.updated`; send null to clear a setting.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUpdate"},"example":{"name":"Acme","sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"primary_color":"#4f46e5","background_color":"#4f46e5","support_email":"ana@example.com","privacy_policy_url":"https://acme.example/privacy","terms_of_service_url":"https://acme.example/privacy","issuer_slug":"acme"}}}},"responses":{"200":{"description":"The brand, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"},"example":{"id":"brd_01h455vb4pex5vsknk084sn02q","org_id":"org_01h455vb4pex5vsknk084sn02q","issuer_slug":"acme","issuer":"https://acme.auth.synq.build","custom_domain_issuer":"https://login.acme.com","name":"Acme","is_default":true,"sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"logo_url":"https://app.acme.example","icon_url":"https://app.acme.example","primary_color":"#4f46e5","background_color":"#ffffff","support_email":"help@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An issuer slug, which never changes","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteBrand","summary":"Delete a brand","description":"Its issuer stops at once; it is purged 30 days later, with its users and apps, and its issuer slug is never used again. The org's default brand can't be deleted: make another brand the default first (`default_brand_id` on `PATCH /v1/orgs/{org}`), or, for the org's only brand, delete the org. Needs `org.brands.edit` across the org, an org role's: a brand's own roles can't delete it. Recorded as `brand.deleted`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org's default brand, or its only one","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/logo":{"delete":{"operationId":"deleteBrandLogo","summary":"Remove a brand's logo","description":"Its logo file is kept a while for email already sent, then deleted. Needs `org.brands.edit`. Recorded as `brand.updated`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The brand, without a logo","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"},"example":{"id":"brd_01h455vb4pex5vsknk084sn02q","org_id":"org_01h455vb4pex5vsknk084sn02q","issuer_slug":"acme","issuer":"https://acme.auth.synq.build","custom_domain_issuer":"https://login.acme.com","name":"Acme","is_default":true,"sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"logo_url":"https://app.acme.example","icon_url":"https://app.acme.example","primary_color":"#4f46e5","background_color":"#ffffff","support_email":"help@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/icon":{"delete":{"operationId":"deleteBrandIcon","summary":"Remove a brand's icon","description":"Its bots and pages show its logo again where they showed the icon. The file is kept a while for bot messages already posted, then deleted. Needs `org.brands.edit`. Recorded as `brand.updated`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The brand, without an icon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"},"example":{"id":"brd_01h455vb4pex5vsknk084sn02q","org_id":"org_01h455vb4pex5vsknk084sn02q","issuer_slug":"acme","issuer":"https://acme.auth.synq.build","custom_domain_issuer":"https://login.acme.com","name":"Acme","is_default":true,"sign_up_enabled":true,"sign_in_cancels_deletion":true,"breached_password_check":true,"show_last_used":true,"link_conflicts":"move","merge_empty_accounts":true,"move_proved_identities":true,"link_reauth_window":7200,"existing_account_prompt":true,"wallet_name_usernames":true,"logo_url":"https://app.acme.example","icon_url":"https://app.acme.example","primary_color":"#4f46e5","background_color":"#ffffff","support_email":"help@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/transfer-preview":{"get":{"operationId":"previewBrandTransfer","summary":"Preview moving a brand to another org","description":"What moves with the brand to another org and what changes, from its own org's side, before asking: its users, apps, issuer, domains, communities and bots, whose app each sign-in provider uses now, and what blocks a move now (`blockers`, each with its fix). It shows nothing of any target: the target's owner sees its plan's side when the request reaches it. With `to_org` naming an org you own too, as a person, it is the target's side as well (its plan's gaps, its room, every blocker, with `new_default_brand` and `close_from_org` as the request would choose them) and `preview_hash`, which `move_now` names to move the brand at once; for any other org it stays the brand's side alone. Needs `org.brands.view`. A request waits 7 days for the target's owner, who accepts it (the brand moves) or declines it; either side's owner may cancel it until then.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org the brand would go to. When you own it too, as a person, the answer is the target's side as well, its plan's gaps, its room and its blockers, with `preview_hash`, which `move_now` names; otherwise it is the brand's own side alone, as without it","example":"org_01h455vb4pex5vsknk084sn02q"},"required":false,"description":"The org the brand would go to. When you own it too, as a person, the answer is the target's side as well, its plan's gaps, its room and its blockers, with `preview_hash`, which `move_now` names; otherwise it is the brand's own side alone, as without it","name":"to_org","in":"query"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"With `to_org`, when the brand is its org's default and not its last: the org's brand that would become its default, as the request names it","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":false,"description":"With `to_org`, when the brand is its org's default and not its last: the org's brand that would become its default, as the request names it","name":"new_default_brand","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"With `to_org`, when the brand is its org's last: `true` previews closing the org with the move, as the request asks it","example":"false"},"required":false,"description":"With `to_org`, when the brand is its org's last: `true` previews closing the org with the move, as the request asks it","name":"close_from_org","in":"query"}],"responses":{"200":{"description":"What a move would carry and change, from the brand's org's side, and the target's for an org you own too","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransferOwnPreview"},"example":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0},"to_org":{"id":"string","name":"Acme"},"preview_hash":"string"}}}},"400":{"description":"A query that is not valid, or `to_org` naming the brand’s own org","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or no such brand in it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An org you own that can't take a brand now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/transfers":{"post":{"operationId":"requestBrandTransfer","summary":"Ask to move a brand to another org","description":"Asks the target org's owner to take the brand, with its users, apps, issuer, domains and communities, all unchanged. You confirm that the target becomes responsible for the brand's users' data (`confirm_data_responsibility`). A default brand names the org's new default (`new_default_brand`); the org's last brand goes only with `close_from_org`, which closes the org with the move, as deleting it does. The request waits 7 days, one at a time per brand. Needs `org.brands.transfer`. Only an owner of the org, as a person, signed in within the last 5 minutes: an API key never asks, decides or cancels a move. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. Refused with `brand_transfer_blocked` (409, `reason` saying what, `detail` the fix) or `transfer_target_unavailable` (422). Recorded as `brand.transfer_requested` in both orgs' logs, each also their webhooks' event. A request waits 7 days for the target's owner, who accepts it (the brand moves) or declines it; either side's owner may cancel it until then. When you own the target org too, `move_now: true` with the `preview_hash` of `GET …/transfer-preview?to_org=…` moves the brand at once instead: the request is made and accepted as you, in one step and one fresh sign-in, recorded as `brand.transfer_requested` and `brand.transfer_accepted` in both orgs' logs, and answered `accepted`. Accepting's refusals apply to it (`transfer_preview_changed` and the rest, as `POST …/accept` says), and any refusal leaves no request waiting. Anyone but the owner of both orgs gets 403 `forbidden` for it.","security":[{"bearer":[]}],"x-permission":"org.brands.transfer","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransferCreate"},"example":{"to_org":"string","confirm_data_responsibility":true,"new_default_brand":"string","close_from_org":true,"move_now":true,"preview_hash":"9f2c6a8e1b7d4c3a5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5"}}}},"responses":{"201":{"description":"The request, waiting for the target; with `move_now`, accepted: the brand moved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransfer"},"example":{"id":"string","brand":{"id":"string","name":"Acme"},"from_org":{"id":"string","name":"Acme"},"to_org":{"id":"string","name":"Acme"},"direction":"outgoing","status":"pending","requested_by":"string","requested_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","cancelled_by":"from","new_default_brand_id":"string","close_from_org":true,"data_responsibility_statement":"string","preview":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0}},"preview_hash":"string","reason":"string","from_org_empty":true,"notice":{"requested_at":"2026-10-21T12:00:00.000Z","sent_at":"2026-10-21T12:00:00.000Z","recipients":0}}}}},"400":{"description":"A body that is not valid, a new default that is not one of its brands, or `move_now` without `preview_hash`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.transfer, isn't the org's owner as a person, or signed in more than 5 minutes ago; or `move_now` from someone who doesn't own the target org too","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or no such brand in it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Something keeps the brand from moving now: `reason` says what, `detail` the fix; with `move_now`, also a preview that changed since it was read, or the target would hold too many token gates","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An org that can't take a brand","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"With `move_now`: the brand's own sign-in apps or bot can't be sealed again for the target org here just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brand-transfers":{"get":{"operationId":"listBrandTransfers","summary":"List an org's brand moves","description":"The requests to move one of its brands to another org (`outgoing`) and to take another org's brand (`incoming`), oldest first, each with its preview while it waits. Ended ones are kept 30 days. Needs `org.brands.view`. A request waits 7 days for the target's owner, who accepts it (the brand moves) or declines it; either side's owner may cancel it until then.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransferPage"},"example":{"data":[{"id":"string","brand":{"id":"string","name":"Acme"},"from_org":{"id":"string","name":"Acme"},"to_org":{"id":"string","name":"Acme"},"direction":"outgoing","status":"pending","requested_by":"string","requested_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","cancelled_by":"from","new_default_brand_id":"string","close_from_org":true,"data_responsibility_statement":"string","preview":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0}},"preview_hash":"string","reason":"string","from_org_empty":true,"notice":{"requested_at":"2026-10-21T12:00:00.000Z","sent_at":"2026-10-21T12:00:00.000Z","recipients":0}}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brand-transfers/{transfer}":{"get":{"operationId":"getBrandTransfer","summary":"Get a brand move","description":"A request to move a brand, as the org in the path sees it. While it waits, `preview` says what moves and what changes: on the target's side with its plan's gaps (`plan_changes`), its room and `preview_hash`, which accepting names. Needs `org.brands.view`. A request waits 7 days for the target's owner, who accepts it (the brand moves) or declines it; either side's owner may cancel it until then.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^btr_[0-9a-hjkmnp-tv-z]{26}$","description":"The request's id","example":"btr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The request's id","name":"transfer","in":"path"}],"responses":{"200":{"description":"The request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransfer"},"example":{"id":"string","brand":{"id":"string","name":"Acme"},"from_org":{"id":"string","name":"Acme"},"to_org":{"id":"string","name":"Acme"},"direction":"outgoing","status":"pending","requested_by":"string","requested_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","cancelled_by":"from","new_default_brand_id":"string","close_from_org":true,"data_responsibility_statement":"string","preview":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0}},"preview_hash":"string","reason":"string","from_org_empty":true,"notice":{"requested_at":"2026-10-21T12:00:00.000Z","sent_at":"2026-10-21T12:00:00.000Z","recipients":0}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or no such request to or from it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brand-transfers/{transfer}/decline":{"post":{"operationId":"declineBrandTransfer","summary":"Decline a brand move","description":"The target org's owner declines a request to take another org's brand: it ends, and nothing moves. Declining it again answers the same. Needs `org.brands.transfer`. Only an owner of the org, as a person, signed in within the last 5 minutes: an API key never asks, decides or cancels a move. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. A request that ended otherwise is `brand_transfer_ended` (409). Recorded as `brand.transfer_declined` in both orgs' logs, each also their webhooks' event.","security":[{"bearer":[]}],"x-permission":"org.brands.transfer","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^btr_[0-9a-hjkmnp-tv-z]{26}$","description":"The request's id","example":"btr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The request's id","name":"transfer","in":"path"}],"responses":{"200":{"description":"The declined request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransfer"},"example":{"id":"string","brand":{"id":"string","name":"Acme"},"from_org":{"id":"string","name":"Acme"},"to_org":{"id":"string","name":"Acme"},"direction":"outgoing","status":"pending","requested_by":"string","requested_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","cancelled_by":"from","new_default_brand_id":"string","close_from_org":true,"data_responsibility_statement":"string","preview":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0}},"preview_hash":"string","reason":"string","from_org_empty":true,"notice":{"requested_at":"2026-10-21T12:00:00.000Z","sent_at":"2026-10-21T12:00:00.000Z","recipients":0}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.transfer, isn't the org's owner as a person, or signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or no such request to it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request ended already: accepted, cancelled or expired","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brand-transfers/{transfer}/accept":{"post":{"operationId":"acceptBrandTransfer","summary":"Accept a brand move","description":"The target org's owner takes another org's brand, as the request's preview showed it: the brand moves at once, with its users (signed in, the same `sub`), apps (the same client ids and secrets), issuer, domains, communities, bots and token gates. You confirm that your org becomes responsible for the brand's users' data (`confirm_data_responsibility`), and name the `preview_hash` you read: if what moves or changes is no longer what it showed, nothing moves (`transfer_preview_changed`, 409). From the move, the old org's API keys, endpoints and members stop reaching the brand, and yours with All brands reach it; it arrives as one of your brands, your default only if you have none. When it was its org's last and that org's owner chose `close_from_org`, that org closes with the move, as deleting it does. Its custom domains enter a 14-day grace if your plan lacks them. Accepting it again answers the same. Needs `org.brands.transfer`. Only an owner of the org, as a person, signed in within the last 5 minutes: an API key never asks, decides or cancels a move. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. Refused with `plan_quota_exceeded` (403) when your plan has no room for another brand, `brand_transfer_blocked` (409, `reason` saying what, `detail` the fix) while something blocks it, and `brand_transfer_ended` (409) for a request that ended. Recorded as `brand.transfer_accepted` in both orgs' logs (yours is the \"moved from\" entry, naming `from_org` and `transfer`), each also the event of that org's All brands endpoints.","security":[{"bearer":[]}],"x-permission":"org.brands.transfer","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^btr_[0-9a-hjkmnp-tv-z]{26}$","description":"The request's id","example":"btr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The request's id","name":"transfer","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransferAccept"},"example":{"confirm_data_responsibility":true,"preview_hash":"9f2c6a8e1b7d4c3a5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5"}}}},"responses":{"200":{"description":"The accepted request: the brand is your org's","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransfer"},"example":{"id":"string","brand":{"id":"string","name":"Acme"},"from_org":{"id":"string","name":"Acme"},"to_org":{"id":"string","name":"Acme"},"direction":"outgoing","status":"pending","requested_by":"string","requested_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","cancelled_by":"from","new_default_brand_id":"string","close_from_org":true,"data_responsibility_statement":"string","preview":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0}},"preview_hash":"string","reason":"string","from_org_empty":true,"notice":{"requested_at":"2026-10-21T12:00:00.000Z","sent_at":"2026-10-21T12:00:00.000Z","recipients":0}}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.transfer, isn't the org's owner as a person, or signed in more than 5 minutes ago; or the org's plan has no room for another brand","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or no such request to it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The preview changed since it was read, something blocks the move (`reason` says what, `detail` the fix), the org would hold too many token gates, or the request ended already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An org that can't take a brand now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The brand's own sign-in apps or bot can't be sealed again for your org here just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brand-transfers/{transfer}/notice":{"post":{"operationId":"sendBrandTransferNotice","summary":"Email a moved brand's users","description":"Once a brand moved to this org, its owner has Synq tell the brand's users: who runs it now and is responsible for their data, that nothing changes for them, and the brand's privacy policy, from the brand's own sender, to each user with a verified address who may use their account and whom Synq may email. Once: asking again answers the same and sends nothing more. It goes out in the background, in batches within the notice's own mail budget, so the brand's sign-in codes never wait on it; the request's `notice` says when the last went and how many it reached. It can be asked for while the request is kept, 30 days after the move. Needs `org.brands.transfer`. Only an owner of the org, as a person, signed in within the last 5 minutes: an API key never asks, decides or cancels a move. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. A request that wasn't accepted, or whose brand isn't this org's any more, is `conflict` (409). Recorded as `brand.transfer_notice_sent` in this org's log once the last goes, also its webhooks' event.","security":[{"bearer":[]}],"x-permission":"org.brands.transfer","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^btr_[0-9a-hjkmnp-tv-z]{26}$","description":"The request's id","example":"btr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The request's id","name":"transfer","in":"path"}],"responses":{"202":{"description":"The request, with its notice on its way","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransfer"},"example":{"id":"string","brand":{"id":"string","name":"Acme"},"from_org":{"id":"string","name":"Acme"},"to_org":{"id":"string","name":"Acme"},"direction":"outgoing","status":"pending","requested_by":"string","requested_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","cancelled_by":"from","new_default_brand_id":"string","close_from_org":true,"data_responsibility_statement":"string","preview":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0}},"preview_hash":"string","reason":"string","from_org_empty":true,"notice":{"requested_at":"2026-10-21T12:00:00.000Z","sent_at":"2026-10-21T12:00:00.000Z","recipients":0}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.transfer, isn't the org's owner as a person, or signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or no such request to it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request wasn't accepted, or its brand isn't this org's any more","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Synq sends no background email here just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brand-transfers/{transfer}/cancel":{"post":{"operationId":"cancelBrandTransfer","summary":"Cancel a brand move","description":"An owner of either org cancels a request before it is decided: it ends, and nothing moves. Cancelling it again from the same side answers the same. Needs `org.brands.transfer`. Only an owner of the org, as a person, signed in within the last 5 minutes: an API key never asks, decides or cancels a move. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. A request that ended otherwise is `brand_transfer_ended` (409). Recorded as `brand.transfer_cancelled` in both orgs' logs (`cancelled_by`: `from` or `to`; Synq's staff can cancel one too, as `staff` with a reason), each also their webhooks' event.","security":[{"bearer":[]}],"x-permission":"org.brands.transfer","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^btr_[0-9a-hjkmnp-tv-z]{26}$","description":"The request's id","example":"btr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The request's id","name":"transfer","in":"path"}],"responses":{"200":{"description":"The cancelled request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTransfer"},"example":{"id":"string","brand":{"id":"string","name":"Acme"},"from_org":{"id":"string","name":"Acme"},"to_org":{"id":"string","name":"Acme"},"direction":"outgoing","status":"pending","requested_by":"string","requested_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","cancelled_by":"from","new_default_brand_id":"string","close_from_org":true,"data_responsibility_statement":"string","preview":{"users":0,"monthly_active_users":0,"apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"}],"apps_total":0,"issuer":"string","custom_domains":["acme.example"],"sending_domain":"acme.example","sending_domains":["mail.acme.com"],"discord_servers":[{"id":"string","name":"Acme"}],"telegram_groups":[{"id":"string","title":"string"}],"own_bots":[{"id":"string","platform":"discord","name":"Acme"}],"sign_in_providers":[{"provider":"google","app_now":"brand","app_after":"brand"}],"stays_as_set":{"terms_of_service_url":"https://app.acme.example","privacy_policy_url":"https://app.acme.example"},"blockers":[{"reason":"transfer_pending","detail":"string"}],"roles_ending":{"members":0,"invitations":0},"plan_changes":[{"feature":"string","effect":"string"}],"apps_over_quota":{"apps":0,"limit":0}},"preview_hash":"string","reason":"string","from_org_empty":true,"notice":{"requested_at":"2026-10-21T12:00:00.000Z","sent_at":"2026-10-21T12:00:00.000Z","recipients":0}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.transfer, isn't the org's owner as a person, or signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or no such request to or from it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The request ended already: accepted, declined or expired","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/theme":{"get":{"operationId":"getBrandTheme","summary":"Read a brand's theme","description":"How its hosted pages look beyond its logo and colors. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The theme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTheme"},"example":{"font":"humanist","surface_color":"#ffffff","glow_color":"#3c1253","button_style":"pill","card_radius":0,"card_shadow":"none","heading":"string","heading_font":"rubik","heading_case":"upper","muted_color":"#b8a5c9","background_image_url":"https://app.acme.example","background_blur":0,"powered_by":true,"powered_by_choice":null,"powered_by_default":true,"default_avatar_style":"aura","default_avatars":[{"file_id":"fil_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example"}],"not_shown":[]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateBrandTheme","summary":"Change a brand's theme","description":"Changes the settings sent and keeps the rest; null unsets one. Settings only: raw CSS, or anything else, is refused. Advanced settings need a plan with the advanced theme, and hiding \"Powered by Synq\" a plan that allows it; unsetting either, or keeping \"Powered by Synq\", needs neither. Needs `org.brands.edit`. Recorded as `brand.updated`, each setting as `theme.<name>`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandThemeUpdate"},"example":{"font":"system","surface_color":"#ffffff","glow_color":"#ffffff","button_style":"pill","card_radius":0,"card_shadow":"none","heading":"Welcome back","heading_font":"rubik","heading_case":"upper","muted_color":"#ffffff","background_blur":0,"default_avatar_style":"aura","powered_by":true}}}},"responses":{"200":{"description":"The theme, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTheme"},"example":{"font":"humanist","surface_color":"#ffffff","glow_color":"#3c1253","button_style":"pill","card_radius":0,"card_shadow":"none","heading":"string","heading_font":"rubik","heading_case":"upper","muted_color":"#b8a5c9","background_image_url":"https://app.acme.example","background_blur":0,"powered_by":true,"powered_by_choice":null,"powered_by_default":true,"default_avatar_style":"aura","default_avatars":[{"file_id":"fil_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example"}],"not_shown":[]}}}},"400":{"description":"A body that is not valid, such as CSS","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan has no advanced theme or doesn't let the brand hide Powered by Synq","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/theme/preview":{"post":{"operationId":"previewBrandTheme","summary":"Preview a brand's theme","description":"The brand's pages' look with these settings on top of its theme, saving nothing, as values: the look @synq/sign-in-ui and @synq/member-ui draw the pages in. It shows whatever the plan allows or not, and `needs` names what saving it would need. `…/sign-in-page/preview` draws the sign-in page in a draft theme. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandThemeUpdate"},"example":{"font":"system","surface_color":"#ffffff","glow_color":"#ffffff","button_style":"pill","card_radius":0,"card_shadow":"none","heading":"Welcome back","heading_font":"rubik","heading_case":"upper","muted_color":"#ffffff","background_blur":0,"default_avatar_style":"aura","powered_by":true}}}},"responses":{"200":{"description":"The look, and what saving it needs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandThemePreview"},"example":{"look":{"brand":{"name":"Acme","support_email":"ana@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","unclaimed":true},"primary_color":"string","background_color":"string","theme":{"font":"system","heading_font":"system","heading_case":"upper","surface_color":"string","muted_color":"string","glow_color":"string","button_style":"pill","card_radius":0,"card_shadow":"none","background_image_url":"https://app.acme.example","background_blur":0},"logo":{"url":"https://app.acme.example","width":0,"height":0},"phone_background_url":"https://app.acme.example","icon":"string","powered_by":true},"needs":[]}}}},"400":{"description":"A body that is not valid, such as CSS","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/theme/default-avatars/{file}":{"delete":{"operationId":"deleteBrandDefaultAvatar","summary":"Remove one of a brand’s default avatars","description":"The people who had it each get another of the set; everyone else keeps theirs. Needs `org.brands.edit`, on any plan: a set kept on a plan without `branding.default_avatars` can still be pruned. Recorded as `brand.updated`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^fil_[0-9a-hjkmnp-tv-z]{26}$","description":"The default avatar's file","example":"fil_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The default avatar's file","name":"file","in":"path"}],"responses":{"200":{"description":"The theme, without it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTheme"},"example":{"font":"humanist","surface_color":"#ffffff","glow_color":"#3c1253","button_style":"pill","card_radius":0,"card_shadow":"none","heading":"string","heading_font":"rubik","heading_case":"upper","muted_color":"#b8a5c9","background_image_url":"https://app.acme.example","background_blur":0,"powered_by":true,"powered_by_choice":null,"powered_by_default":true,"default_avatar_style":"aura","default_avatars":[{"file_id":"fil_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example"}],"not_shown":[]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/theme/background":{"delete":{"operationId":"deleteBrandBackground","summary":"Remove a brand's background image","description":"Needs `org.brands.edit`, on any plan. Recorded as `brand.updated`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The theme, without a background image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandTheme"},"example":{"font":"humanist","surface_color":"#ffffff","glow_color":"#3c1253","button_style":"pill","card_radius":0,"card_shadow":"none","heading":"string","heading_font":"rubik","heading_case":"upper","muted_color":"#b8a5c9","background_image_url":"https://app.acme.example","background_blur":0,"powered_by":true,"powered_by_choice":null,"powered_by_default":true,"default_avatar_style":"aura","default_avatars":[{"file_id":"fil_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example"}],"not_shown":[]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/member-profile":{"get":{"operationId":"getMemberProfile","summary":"Read a brand's member profile settings","description":"Where the member profile is, which sections it shows, its copy, and which of the brand’s Discord servers and Telegram groups it lists. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The member profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberProfile"},"example":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","urls":["https://acme.auth.synq.build/me"],"sections":{"wallets":true,"communities":true,"linked_accounts":true},"copy":{"sign_in_line":"To {goal}, sign in to your {brand} account.","finish_button":"Finish verification with {platform}"},"copy_defaults":{"sign_in_line":"To {goal}, sign in to your {brand} account.","finish_button":"Finish verification with {platform}"},"communities":[{"id":"dsv_01h455vb4pex5vsknk084sn02q","type":"discord_server","name":"Mollyverse","public":true,"gated":true,"listed":true,"listed_by":"brand"}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateMemberProfile","summary":"Change a brand's member profile settings","description":"Shows or hides Wallets, Communities and Linked accounts, and sets the copy (null puts Synq’s back); what is left out stays. Each line is one line of plain text with only its own placeholders (400 at the field with the fix otherwise). Which servers and groups it lists is each one’s own `listed`. Needs `org.integrations.edit`. Recorded as `brand.updated`, each setting as `member_profile.<name>`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberProfileUpdate"},"example":{"sections":{"wallets":true,"communities":true,"linked_accounts":true},"copy":{"sign_in_line":"To {goal}, sign in to your {brand} account.","finish_button":"Finish verification with {platform}"}}}}},"responses":{"200":{"description":"The member profile, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberProfile"},"example":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","urls":["https://acme.auth.synq.build/me"],"sections":{"wallets":true,"communities":true,"linked_accounts":true},"copy":{"sign_in_line":"To {goal}, sign in to your {brand} account.","finish_button":"Finish verification with {platform}"},"copy_defaults":{"sign_in_line":"To {goal}, sign in to your {brand} account.","finish_button":"Finish verification with {platform}"},"communities":[{"id":"dsv_01h455vb4pex5vsknk084sn02q","type":"discord_server","name":"Mollyverse","public":true,"gated":true,"listed":true,"listed_by":"brand"}]}}}},"400":{"description":"A line that is too long, or names a placeholder it can’t use","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/member-profile/preview":{"post":{"operationId":"previewMemberProfile","summary":"Preview a brand's member profile","description":"The member profile with these settings on top of what’s saved, saving nothing: the dashboard’s live phone preview. A made-up member arrives from Discord or Telegram (`from`, Discord where the brand has a server) to the brand’s real servers, groups and gates, with sample numbers and no chain read. Answers the brand’s look and the page’s view as values, which @synq/member-ui draws as members get it. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberProfilePreviewInput"},"example":{"sections":{"wallets":true,"communities":true,"linked_accounts":true},"copy":{"sign_in_line":"To {goal}, sign in to your {brand} account.","finish_button":"Finish verification with {platform}"},"communities":[{"id":"string","listed":true}],"from":"discord"}}}},"responses":{"200":{"description":"The look and the view","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberProfilePreview"},"example":{"look":{"brand":{"name":"Acme","support_email":"ana@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","unclaimed":true},"primary_color":"string","background_color":"string","theme":{"font":"system","heading_font":"system","heading_case":"upper","surface_color":"string","muted_color":"string","glow_color":"string","button_style":"pill","card_radius":0,"card_shadow":"none","background_image_url":"https://app.acme.example","background_blur":0},"logo":{"url":"https://app.acme.example","width":0,"height":0},"phone_background_url":"https://app.acme.example","icon":"string","powered_by":true},"view":{"brand_name":"string","members_called":{"plural":"string","singular":"string"},"person":{"name":"Acme","initials":"string","signed_in_with":"string","avatar":{"kind":"image","url":"https://app.acme.example"}},"purpose":{"platform":"discord","place":"string","labels":["string"],"external_name":"string","other_account":"string","linked":true,"conditions":[{"text":"string","status":"met","skipped":true,"ratio":0,"have":{"held":"string","need":"string","symbol":"string"},"shortfall":{"kind":null,"amount":null,"symbol":null},"period":"string","until":"string"}],"heading":"string","state":"done","missing":[{"text":"string","status":"met","skipped":true,"ratio":0,"have":{"held":"string","need":"string","symbol":"string"},"shortfall":{"kind":null,"amount":null,"symbol":null},"period":"string","until":"string"}],"alternatives":true,"until":"string","window":{"ends_at":"2026-10-21T12:00:00.000Z","time_zone":"string","verified":true,"left":{"kind":null,"days":null}},"given":["string"],"pending":true,"now":{"label":"string","state":"yours","note":{"kind":null,"shortfall":null},"at":"string","lost_reason":"stopped_qualifying","back":true,"qualifies_again":true,"admin_muted":true},"back_url":"https://app.acme.example"},"gates":[{"id":"string","name":"Acme","status":"met","where":[{"platform":"discord","label":"string"}],"conditions":[{"text":"string","status":"met","skipped":true,"ratio":0,"have":{"held":"string","need":"string","symbol":"string"},"shortfall":{"kind":null,"amount":null,"symbol":null},"period":"string","until":"string"}],"mode":"all","glow":true}],"wallets":[{"id":"string","address":"string","app":"string"}],"communities":[{"id":"string","platform":"discord","name":"Acme","members":0,"join_url":"https://app.acme.example","gated":true,"purpose":true,"roles":[{"label":"string","state":"yours","note":{"kind":null,"shortfall":null},"at":"string","lost_reason":"stopped_qualifying","back":true,"qualifies_again":true,"admin_muted":true}],"in_group":"member","window":{"ends_at":"2026-10-21T12:00:00.000Z","time_zone":"string","verified":true,"left":{"kind":null,"days":null}},"updates_url":"https://app.acme.example"}],"links":[{"method":"string","icon":"string","value":"string","identity_id":"idn_01h455vb4pex5vsknk084sn02q","signed_in_with":true,"community":true}],"wallet_count":0}}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/community-messages":{"get":{"operationId":"listCommunityMessages","summary":"List a brand's words for its bots","description":"Every message Synq's Telegram and Discord bots send about the brand's groups, servers and roles, Telegram's then Discord's, in the dashboard's order (`platform` for one platform's): the brand's text (null for Synq's), Synq's wording, the fill-ins each takes with an example in the brand's own names, what each must name, its longest, and the buttons Synq attaches whatever it says. `…/community-messages/frame` has the brand's look and the Verify button. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["telegram","discord"],"description":"Only this platform’s messages: `telegram` or `discord`"},"required":false,"description":"Only this platform’s messages: `telegram` or `discord`","name":"platform","in":"query"}],"responses":{"200":{"description":"The messages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityMessagePage"},"example":{"data":[{"platform":"telegram","message":"announcement","label":"string","description":"string","section":"window","sent":"group","text":"string","default":"string","fill_ins":[{"name":"group","description":"string","example":"Acme Holders","optional":true}],"required":[["deadline"]],"max_length":0,"limit":0,"buttons":["Verify with Synq","Open my profile"],"embed":true}],"next_cursor":"string"}}}},"400":{"description":"A limit, cursor or platform that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateCommunityMessages","summary":"Change a brand's words for its bots","description":"Sets the text of each message sent (null, or Synq's wording itself, puts Synq's back) and keeps the rest. A text is plain words and line breaks, `**bold**` its only formatting: Synq escapes the rest for Telegram's HTML and Discord's markdown, so it shows as typed. It may use only its message's fill-ins (`{group}`; `{Group}` starts with a capital), must use those its message needs (a message about the deadline names `{deadline}`), and must stay within the platform's longest message with its longest fill-ins; 400 at the field otherwise, with what is wrong and the fix. Synq keeps the frame, whatever the text says: the brand's name, \"Powered by Synq\" as its plan shows it, the window's countdown line and every button, the Verify button among them. `verify_button` names that button (`{brand}` filled in) and needs a plan with `branding.remove_powered_by` (403 `plan_feature_unavailable` otherwise); on any other plan the button says \"Verify with Synq\". `members_called` is what the brand calls its members, for every message's `{members}` (`{Members}` with a capital) and `{member}`, its member profile and the dashboard's counts: `plural`, and `singular` (left out: the plural with one final s off, or as it is without one), each at most 24 characters on one line; null, or members and member, puts Synq's back. Answers the Verify button, the brand's word for its members and the messages the request named. A changed Verify message or button redraws the brand's Discord Verify messages in place. Messages go with the new words from the next one sent; a Telegram window's pinned announcement takes them at its daily update. Needs `org.integrations.edit`. Recorded as `brand.updated`, each change as `community_messages.<platform>.<message>`, `community_messages.verify_button`, `members_called` or `member_called`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityMessagesUpdate"},"example":{"verify_button":"Verify with {brand}","members_called":{"plural":"comrods","singular":"comrod"},"messages":{"telegram":{"announcement":"string","reminder_monthly":"string","reminder_d60":"string","reminder_d45":"string","reminder_d30":"string","reminder_d21":"string","reminder_d14":"string","reminder_d7":"string","reminder_d3":"string","reminder_d1":"string","reminder_h3":"string","names":"string","personal":"string","extended":"string","closing":"string","announcement_closed":"string","announcement_cancelled":"string","join_requested":"string","approved":"string","not_yet":"string","declined":"string","grace_started":"string","muted":"string","removed":"string","unmuted":"string","qualified_again":"string","lapse_soon":"string","muted_not_verified":"string","removed_not_verified":"string","verify_to_join":"string","verify_here":"string","verified_here":"string","ask_to_join_first":"string","not_gated":"string","banned_here":"string","muted_here":"string"},"discord":{"announcement":"string","reminder_monthly":"string","reminder_d60":"string","reminder_d45":"string","reminder_d30":"string","reminder_d21":"string","reminder_d14":"string","reminder_d7":"string","reminder_d3":"string","reminder_d1":"string","reminder_h3":"string","names":"string","extended":"string","closing":"string","announcement_closed":"string","announcement_cancelled":"string","verify_message":"string","link_reply":"string","verified":"string","not_met":"string","recognized":"string","grace":"string","removed":"string","not_verified":"string","qualified_again":"string","lapse_soon":"string"}}}}}},"responses":{"200":{"description":"The Verify button, the brand’s word for its members, and the messages the request named, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityMessagesChanged"},"example":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","verify_button":{"text":"Verify with {brand}","shown":"Verify with Synq","default":"Verify with Synq","renamable":true,"max_length":0},"members_called":{"plural":"comrods","singular":"comrod","default":{"plural":"comrods","singular":"comrod"},"max_length":0},"messages":[{"platform":"telegram","message":"announcement","label":"string","description":"string","section":"window","sent":"group","text":"string","default":"string","fill_ins":[{"name":"group","description":"string","example":"Acme Holders","optional":true}],"required":[["deadline"]],"max_length":0,"limit":0,"buttons":["Verify with Synq","Open my profile"],"embed":true}]}}}},"400":{"description":"A text with a fill-in its message doesn’t take, without one it needs, with a stray brace or unclosed bold, or too long; a word for members that is empty, too long or more than one line","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.integrations.edit, or the org’s plan can’t name the Verify button","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/community-messages/frame":{"get":{"operationId":"getCommunityMessageFrame","summary":"Read what Synq keeps around a brand's words, and its word for its members","description":"The brand's look as its bots draw it (its name, logo, accent color, and whether its messages end \"Powered by Synq\"), the Verify button (the brand's text, what it says now, and whether the org's plan lets it name it: `branding.remove_powered_by`, Scale and Enterprise), and what the brand calls its members, plural and singular, which every message's `{members}` and `{member}`, its member profile and the dashboard's counts say. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The frame","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityMessageFrame"},"example":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","look":{"name":"Acme","logo_url":"https://app.acme.example","icon_url":"https://app.acme.example","accent_color":"#7c3aed","powered_by":true},"verify_button":{"text":"Verify with {brand}","shown":"Verify with Synq","default":"Verify with Synq","renamable":true,"max_length":0},"members_called":{"plural":"comrods","singular":"comrod","default":{"plural":"comrods","singular":"comrod"},"max_length":0}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-preview":{"post":{"operationId":"createSignInPreview","summary":"Try a brand's sign-in","description":"A link that opens the brand's hosted sign-in page as Synq's own preview app, so you sign in as one of its users before writing any code. With `app_id`, the page names that app, as its own sign-in does. The page the sign-in comes back to, on the brand's issuer, says who signed in and links back to `return_path` on Synq's dashboard. The link works once, within 10 minutes; preview sign-ins count for no monthly active user. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPreviewRequest"},"example":{"return_path":"/orgs/org_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"}}}},"responses":{"201":{"description":"The link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPreview"},"example":{"url":"https://acme.auth.synq.build/sign-in-preview/start/9yG3…","expires_at":"2026-10-21T12:10:00.000Z"}}}},"400":{"description":"A return path that is not a path on Synq’s dashboard, or an app id that is not one","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org or brand, or one the credential may not act in, or no such app in the brand","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-page":{"get":{"operationId":"getBrandSignInPage","summary":"Read a brand's sign-in page","description":"Where each way to sign in goes (shown first, under More ways, or off, and for whom), what follows the email address, and what people coming back see. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The sign-in page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPage"},"example":{"methods":[{"method":"google","name":"Google","kind":"provider","placement":"shown","off_for":null,"available":true,"link_only":false,"community_links":false,"icon_url":null}],"max_shown":4,"email":{"password":true,"code":true,"lead":"password"},"returning":"last_only"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateBrandSignInPage","summary":"Change a brand's sign-in page","description":"Changes the parts sent and keeps the rest. At most 4 ways shown first (`too_many_shown`) and at least one way to sign in on (`no_way_to_sign_in`). Turning a way off takes effect everywhere at once: read `GET …/sign-in-page/impact` first to see who it affects. Needs `org.brands.edit`. Recorded as `brand.updated`, each part as `sign_in_page.<part>`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPageUpdate"},"example":{"methods":[{"method":"google","placement":"shown","off_for":"everyone"}],"place":[{"method":"discord","placement":"shown","position":1}],"email":{"password":true,"code":true,"lead":"password"},"returning":"last_only"}}}},"responses":{"200":{"description":"The sign-in page, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPage"},"example":{"methods":[{"method":"google","name":"Google","kind":"provider","placement":"shown","off_for":null,"available":true,"link_only":false,"community_links":false,"icon_url":null}],"max_shown":4,"email":{"password":true,"code":true,"lead":"password"},"returning":"last_only"}}}},"400":{"description":"A body that is not valid: a method left out, named twice or not the brand’s, an `off_for` without `off`, or an email step with nothing on or led by one that is off","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"More than 4 ways shown first (`too_many_shown`), no way to sign in left on (`no_way_to_sign_in`), or a provider that signs this brand in only through an app the tenant brings (Matrica) put on with none brought (`own_app_required`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-page/impact":{"get":{"operationId":"getBrandSignInPageImpact","summary":"Who each way to sign in affects","description":"For each way to sign in, how many of the brand's people have it as a way in, and how many of them have no other way in: what turning it off would do, before it's turned off. Counts only, never who. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"Each way, and who it affects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPageImpact"},"example":{"methods":[{"method":"google","people":1,"no_other_way_in":0}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-page/preview":{"post":{"operationId":"previewBrandSignInPage","summary":"Preview a brand's sign-in page","description":"The brand's hosted sign-in page in any state (a new visitor, someone coming back whose device last used a given way, or the step after the email address with an address), with draft theme and sign-in page settings on top of the brand's, saving nothing. Answers the brand's look and the page's view as values, which @synq/sign-in-ui draws as visitors get it, and what saving the theme needs. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPagePreviewRequest"},"example":{"theme":{"font":"system","surface_color":"#ffffff","glow_color":"#ffffff","button_style":"pill","card_radius":0,"card_shadow":"none","heading":"Welcome back","heading_font":"rubik","heading_case":"upper","muted_color":"#ffffff","background_blur":0,"default_avatar_style":"aura","powered_by":true},"sign_in_page":{"methods":[{"method":"google","placement":"shown","off_for":"everyone"}],"place":[{"method":"discord","placement":"shown","position":1}],"email":{"password":true,"code":true,"lead":"password"},"returning":"last_only"},"view":{"visitor":"returning","last_used":"google","step":"email","email":"ada@example.com","screen":"sign-in"}}}}},"responses":{"200":{"description":"The look, the view, and what saving the theme needs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInPagePreview"},"example":{"look":{"brand":{"name":"Acme","support_email":"ana@acme.example","privacy_policy_url":"https://app.acme.example","terms_of_service_url":"https://app.acme.example","unclaimed":true},"primary_color":"string","background_color":"string","theme":{"font":"system","heading_font":"system","heading_case":"upper","surface_color":"string","muted_color":"string","glow_color":"string","button_style":"pill","card_radius":0,"card_shadow":"none","background_image_url":"https://app.acme.example","background_blur":0},"logo":{"url":"https://app.acme.example","width":0,"height":0},"phone_background_url":"https://app.acme.example","icon":"string","powered_by":true},"view":{"screen":"sign-in","step":"start","heading":"string","methods":[{"method":"google","name":"Google","kind":"provider","placement":"shown","off_for":null,"icon_url":null}],"email":{"address":"you@example.com","password":true,"code":true,"lead":"password"},"returning":"last_only","last_used":null},"needs":[]}}}},"400":{"description":"A body that is not valid: a draft the sign-in page or theme would refuse, a returning visitor without a way they last used that is on (or a way last used for a new one), or the email step on a page with no email way","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A draft with more than 4 ways shown first (`too_many_shown`), or none on (`no_way_to_sign_in`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/files":{"post":{"operationId":"createUpload","summary":"Start an upload","description":"Authorizes one upload for a purpose and answers where to PUT its bytes: a URL signed for 5 minutes, for exactly this type and length, straight to Synq's storage. Then call `…/finalize`. A brand has at most 5 uploads of a purpose waiting at once. `theme_background` needs a plan with the advanced theme (`branding.advanced_theme`), and `default_avatar` a plan with default avatars of the brand's own (`branding.default_avatars`, Pro and up). Needs `org.brands.edit`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUpload"},"example":{"purpose":"brand_logo","content_type":"image/png","content_length":48213}}}},"responses":{"201":{"description":"The pending file, and where its bytes go","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"},"example":{"id":"fil_01h455vb4pex5vsknk084sn02q","purpose":"brand_logo","status":"ready","visibility":"public","url":"https://app.acme.example","content_type":"image/webp","size":0,"width":0,"height":0,"sha256":"string","rejected_reason":"type","declared_type":"string","declared_size":0,"expires_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","ready_at":"2026-10-21T12:00:00.000Z","upload":{"method":"PUT","url":"https://app.acme.example","headers":{"content-type":"image/png"},"expires_at":"2026-10-21T12:00:00.000Z"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan has no advanced theme (a background) or no default avatars of the brand's own (a default avatar)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The brand has as many uploads of this purpose waiting as it may, or 24 default avatars already (`upload_limit_reached`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Longer than the purpose takes: 2 MiB for a logo, 2 MiB for an icon, 5 MiB for a background, 2 MiB for a default avatar","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"A type the purpose doesn’t take","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No storage for files is set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/files/{file}/finalize":{"post":{"operationId":"finalizeUpload","summary":"Finish an upload","description":"Once its bytes are PUT: Synq reads them back, knows them by their first bytes (PNG, JPEG, WebP or GIF; never SVG), checks their length and dimensions, and re-encodes them, so nothing of the original but its pixels is kept (no EXIF, GPS or anything hidden after the image). Then the file is what it is for: a `brand_logo` the brand's `logo_url`, a `brand_icon` its `icon_url`, a `theme_background` its theme's `background_image_url`, a `default_avatar` one more of its theme's `default_avatars` (a plan with `branding.default_avatars`, checked again here), recorded as `brand.updated`, and the file as `file.uploaded`. A refused file is `file.rejected`, and nothing of it is kept. Finalizing a file again answers the same. Needs `org.brands.edit`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^fil_[0-9a-hjkmnp-tv-z]{26}$","description":"The file's id","example":"fil_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The file's id","name":"file","in":"path"}],"responses":{"200":{"description":"The file, ready","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"},"example":{"id":"fil_01h455vb4pex5vsknk084sn02q","purpose":"brand_logo","status":"ready","visibility":"public","url":"https://app.acme.example","content_type":"image/webp","size":0,"width":0,"height":0,"sha256":"string","rejected_reason":"type","declared_type":"string","declared_size":0,"expires_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","ready_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan has no advanced theme (a background) or no default avatars of the brand's own (a default avatar)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Nothing was uploaded to its URL yet (`upload_incomplete`), or the brand’s default avatars are full (`upload_limit_reached`): remove one and finalize again","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Not finalized within the hour (`upload_expired`): start another","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Not what its purpose takes (`file_rejected`): `reason` says why","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No storage for files is set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/files/{file}":{"get":{"operationId":"getFile","summary":"Get a file","description":"Its state, and where it is read once ready. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^fil_[0-9a-hjkmnp-tv-z]{26}$","description":"The file's id","example":"fil_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The file's id","name":"file","in":"path"}],"responses":{"200":{"description":"The file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"},"example":{"id":"fil_01h455vb4pex5vsknk084sn02q","purpose":"brand_logo","status":"ready","visibility":"public","url":"https://app.acme.example","content_type":"image/webp","size":0,"width":0,"height":0,"sha256":"string","rejected_reason":"type","declared_type":"string","declared_size":0,"expires_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","ready_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No storage for files is set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/logo-suggestion":{"get":{"operationId":"getLogoSuggestion","summary":"Suggest a logo from your website","description":"Finds a bitmap icon on the signed-in customer’s verified work-email domain, through bounded public HTTPS requests. Returns a sanitized WebP and its primary color for confirmation. Never uploads or applies it: use the existing file upload and brand settings routes only after the person agrees. Free-mail domains get no suggestion. Needs `org.brands.edit`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"An optional logo to confirm, with no stored changes","content":{"application/json":{"schema":{"type":"object","properties":{"suggestion":{"type":["object","null"],"properties":{"source":{"type":"string","format":"uri","description":"The website it was found on"},"image":{"type":"string","maxLength":2000000,"description":"The logo, as a data URL, to upload if the person confirms it"},"primary_color":{"type":"string","pattern":"^#[0-9a-f]{6}$","description":"The logo’s main color, `#rrggbb`, to offer as the brand’s primary color"}},"required":["source","image","primary_color"],"description":"The logo found, or null when none was"}},"required":["suggestion"]},"example":{"suggestion":{"source":"https://example.com","image":"string","primary_color":"string"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such brand in this organization","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/stats":{"get":{"operationId":"getBrandStats","summary":"Read a brand's numbers","description":"A brand at a glance: its users, its monthly active users this month (the count the org's usage adds up toward its plan), its sign-ins started and finished and its new users over the last 7 days in UTC (finished over started is its sign-in success), and how many people signed in through each of its apps this month. Sign-ins through Synq's sign-in preview are a developer trying the page, and count in none of them. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The brand's numbers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandStats"},"example":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","month":"2026-11","users":1280,"monthly_active_users":312,"sign_ins_last_7_days":940,"sign_ins_started_last_7_days":1010,"new_users_last_7_days":48,"apps":[{"app_id":"app_01h455vb4pex5vsknk084sn02q","users_signed_in":120}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such brand in this organization","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/notices/{notice}":{"get":{"operationId":"getBrandNotice","summary":"Read whether you hid a notice","description":"Whether the calling person hid `notice` (`setup_checklist`, the brand overview’s \"Finish setting up\" checklist, `website_logo_prompt`, its \"Use your website’s logo\" prompt, or `nextjs_app`, the \"Make your Next.js app\" card after onboarding) for themselves on the brand's pages in Synq's dashboard, and when. Theirs alone: the org's other members see what they haven't hidden themselves. A person's credential only. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","enum":["setup_checklist","website_logo_prompt","nextjs_app"],"description":"The notice: `setup_checklist`, the brand overview’s \"Finish setting up\" checklist, `website_logo_prompt`, its \"Use your website’s logo\" prompt, or `nextjs_app`, the \"Make your Next.js app\" card after onboarding","example":"setup_checklist"},"required":true,"description":"The notice: `setup_checklist`, the brand overview’s \"Finish setting up\" checklist, `website_logo_prompt`, its \"Use your website’s logo\" prompt, or `nextjs_app`, the \"Make your Next.js app\" card after onboarding","name":"notice","in":"path"}],"responses":{"200":{"description":"Whether the person hid it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandNotice"},"example":{"notice":"setup_checklist","hidden":true,"hidden_at":"2026-11-09T23:30:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.view in this brand, or is an API key (`forbidden`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such brand in this organization","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/notices/{notice}/hide":{"post":{"operationId":"hideBrandNotice","summary":"Hide a notice for yourself","description":"Hides `notice` (`setup_checklist`, the brand overview’s \"Finish setting up\" checklist, `website_logo_prompt`, its \"Use your website’s logo\" prompt, or `nextjs_app`, the \"Make your Next.js app\" card after onboarding) on the brand's pages in Synq's dashboard for the calling person, on every device. Only for them: the org's other members still see it. Hiding it skips nothing it lists, and nothing brings it back; hiding it again keeps the first time. A person's credential only. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","enum":["setup_checklist","website_logo_prompt","nextjs_app"],"description":"The notice: `setup_checklist`, the brand overview’s \"Finish setting up\" checklist, `website_logo_prompt`, its \"Use your website’s logo\" prompt, or `nextjs_app`, the \"Make your Next.js app\" card after onboarding","example":"setup_checklist"},"required":true,"description":"The notice: `setup_checklist`, the brand overview’s \"Finish setting up\" checklist, `website_logo_prompt`, its \"Use your website’s logo\" prompt, or `nextjs_app`, the \"Make your Next.js app\" card after onboarding","name":"notice","in":"path"}],"responses":{"200":{"description":"Hidden for the person","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandNotice"},"example":{"notice":"setup_checklist","hidden":true,"hidden_at":"2026-11-09T23:30:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.view in this brand, or is an API key (`forbidden`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such brand in this organization","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/notices/{notice}":{"get":{"operationId":"getPersonNotice","x-permission":"none","summary":"Read whether you hid a notice of your own","description":"Whether the calling person hid `notice` for themselves on the pages about no org in Synq's dashboard, such as `add_passkey`, the \"Add a passkey\" to-do on their account’s page, and when. A person's credential only.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["add_passkey"],"description":"The notice: `add_passkey`, the \"Add a passkey\" to-do on their account’s page","example":"add_passkey"},"required":true,"description":"The notice: `add_passkey`, the \"Add a passkey\" to-do on their account’s page","name":"notice","in":"path"}],"responses":{"200":{"description":"Whether the person hid it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotice"},"example":{"notice":"add_passkey","hidden":true,"hidden_at":"2026-11-11T08:30:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person hides something, for themselves","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/notices/{notice}/hide":{"post":{"operationId":"hidePersonNotice","x-permission":"none","summary":"Hide a notice of your own","description":"Hides `notice` for the calling person on the pages about no org in Synq's dashboard, on every device, such as `add_passkey`, the \"Add a passkey\" to-do on their account’s page. Hiding it skips nothing, and nothing brings it back; hiding it again keeps the first time. A person's credential only.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["add_passkey"],"description":"The notice: `add_passkey`, the \"Add a passkey\" to-do on their account’s page","example":"add_passkey"},"required":true,"description":"The notice: `add_passkey`, the \"Add a passkey\" to-do on their account’s page","name":"notice","in":"path"}],"responses":{"200":{"description":"Hidden for the person","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonNotice"},"example":{"notice":"add_passkey","hidden":true,"hidden_at":"2026-11-11T08:30:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person hides something, for themselves","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/email":{"get":{"operationId":"getBrandEmail","summary":"Read how a brand's email goes out","description":"Where replies to the email the brand's users get go, and `effective`: exactly who the next one is from and where its replies go. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The brand's email settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandEmail"},"example":{"sender":{"email_domain_id":"edm_01h455vb4pex5vsknk084sn02q","local_part":"no-reply","name":"Acme"},"reply_to":{"address":"support@acme.com","status":"confirmed"},"effective":{"from":{"name":"Acme via Synq","address":"notifications@mail.synq.build"},"reply_to":"support@acme.com","kind":"fallback","fallback_reason":"no_domain"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateBrandEmail","summary":"Change how a brand's email goes out","description":"Who its email is from: one of the brand's own sending domains, on a plan with `branding.custom_email_domain` (it is used once the domain is verified, and `<brand> via Synq` meanwhile and whenever the plan or the domain stops allowing it), the part before the @ and the name, on every plan. Sets where replies to the brand's email go, on every plan, and keeps what isn't sent. A new reply-to address waits until someone who reads it opens the link Synq emails it (`status: pending_confirmation`); the caller's own verified address, and one on a sending domain the org verified, are confirmed at once. Needs `org.brands.edit`. Recorded as `brand.updated`, and the confirmation as `brand.reply_to_confirmed`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandEmailUpdate"},"example":{"sender":{"email_domain_id":"string","local_part":"hello","name":"Acme"},"reply_to":"support@acme.com"}}}},"responses":{"200":{"description":"The brand's email settings, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandEmail"},"example":{"sender":{"email_domain_id":"edm_01h455vb4pex5vsknk084sn02q","local_part":"no-reply","name":"Acme"},"reply_to":{"address":"support@acme.com","status":"confirmed"},"effective":{"from":{"name":"Acme via Synq","address":"notifications@mail.synq.build"},"reply_to":"support@acme.com","kind":"fallback","fallback_reason":"no_domain"}}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan doesn't send from its own domain (`sender.email_domain_id`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Synq can't email the reply-to address to confirm it (`email_undeliverable`): it bounced or marked Synq's email as spam before. Nothing was kept; use another","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No way to send email is set up here, or the confirmation couldn't be sent: the address waits, and `POST …/email/reply-to/confirmation` sends it again","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/email/preview":{"get":{"operationId":"previewBrandEmail","summary":"Preview a brand's next sign-in email","description":"The sign-in code email the brand's users get next, drawn exactly as it is sent now, from its saved settings: its subject, who it is from and where replies go (`effective`), and the whole HTML document, with a sample code and a link that goes nowhere. It sends nothing. Render `html` only in a sandboxed iframe (`srcdoc`, with neither `allow-scripts` nor `allow-same-origin`) under the returned `content_security_policy`, never inline. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The email, and its policy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandEmailPreview"},"example":{"subject":"Your code to sign in to Acme","effective":{"from":{"name":"Acme via Synq","address":"notifications@mail.synq.build"},"reply_to":"support@acme.com","kind":"fallback","fallback_reason":"no_domain"},"html":"string","content_security_policy":"default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/email/reply-to/confirmation":{"post":{"operationId":"resendReplyToConfirmation","summary":"Send a brand's reply-to confirmation again","description":"A new link to confirm the reply-to address that waits for one; the old link stops working. At most 5 a day for a brand. Needs `org.brands.edit`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"202":{"description":"Sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandEmail"},"example":{"sender":{"email_domain_id":"edm_01h455vb4pex5vsknk084sn02q","local_part":"no-reply","name":"Acme"},"reply_to":{"address":"support@acme.com","status":"confirmed"},"effective":{"from":{"name":"Acme via Synq","address":"notifications@mail.synq.build"},"reply_to":"support@acme.com","kind":"fallback","fallback_reason":"no_domain"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"No reply-to address waits for a confirmation","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Synq can't email this address (`email_undeliverable`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No way to send email is set up here, or the email couldn't be sent","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/email/test":{"post":{"operationId":"sendTestEmail","summary":"Send a test of a brand's email","description":"A sample of the brand's email, from exactly who its next one is from and with its reply-to, to the calling person's own verified address: never another. A person only, since an API key has no address. At most 5 an hour. Needs `org.brands.edit`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"202":{"description":"Sent: what it carried","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandEmail"},"example":{"sender":{"email_domain_id":"edm_01h455vb4pex5vsknk084sn02q","local_part":"no-reply","name":"Acme"},"reply_to":{"address":"support@acme.com","status":"confirmed"},"effective":{"from":{"name":"Acme via Synq","address":"notifications@mail.synq.build"},"reply_to":"support@acme.com","kind":"fallback","fallback_reason":"no_domain"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, is an API key, or its person has no verified email address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No way to send email is set up here, or the email couldn't be sent","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/email-domains":{"get":{"operationId":"listBrandEmailDomains","summary":"List a brand's sending domains","description":"The domains the brand's email can come from, each with its DNS records and state. Needs `org.emailDomains.view` in the brand, on any plan.","security":[{"bearer":[]}],"x-permission":"org.emailDomains.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of sending domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainPage"},"example":{"data":[{"id":"edm_01h455vb4pex5vsknk084sn02q","domain":"mail.acme.com","status":"pending_dns","records":[{"purpose":"dkim","type":"TXT","host":"20261006120000pm._domainkey.mail.acme.com","value":"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ…","required":true,"status":"unchecked","seen":"string"}],"problem":"record_missing","brand":"brd_01h455vb4pex5vsknk084sn02q","in_use":true,"verified_at":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createBrandEmailDomain","summary":"Add a sending domain to a brand","description":"A domain the brand's email can come from, on a plan with `branding.custom_email_domain` (Pro and up). It belongs to the brand alone, and moves with it to another org. Synq registers it with its email provider at once and answers the DNS records to publish; when it can't yet, the domain is `pending_setup` and its records appear once it can. A name is held by one org at a time. At most 10 a day, and 10 in all across the org's brands. Needs `org.emailDomains.edit` in the brand. Recorded as `email_domain.created`.","security":[{"bearer":[]}],"x-permission":"org.emailDomains.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainCreate"},"example":{"domain":"mail.acme.com"}}}},"responses":{"201":{"description":"The domain, and the records to publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"},"example":{"id":"edm_01h455vb4pex5vsknk084sn02q","domain":"mail.acme.com","status":"pending_dns","records":[{"purpose":"dkim","type":"TXT","host":"20261006120000pm._domainkey.mail.acme.com","value":"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ…","required":true,"status":"unchecked","seen":"string"}],"problem":"record_missing","brand":"brd_01h455vb4pex5vsknk084sn02q","in_use":true,"verified_at":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.emailDomains.edit in the brand, or the org's plan doesn't send from its own domain","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The name is held (`email_domain_unavailable`): by another brand of this org, named in `detail` and by `brand_id` (`reason: another_brand`), by another org, never named (`another_org`), or by this brand already (`this_brand`), with a subdomain to add instead in `suggested_domain`; or the org has 10 across its brands (`email_domain_limit_reached`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/EmailDomainProblem"}}}},"422":{"description":"Not a domain Synq sends from (`email_domain_invalid`, with its `reason`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/email-domains/{domain}":{"get":{"operationId":"getBrandEmailDomain","summary":"Read a brand's sending domain","description":"Its records, and what Synq last saw at each. Needs `org.emailDomains.view` in the brand, on any plan.","security":[{"bearer":[]}],"x-permission":"org.emailDomains.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^edm_[0-9a-hjkmnp-tv-z]{26}$","description":"The sending domain's id","example":"edm_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The sending domain's id","name":"domain","in":"path"}],"responses":{"200":{"description":"The domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"},"example":{"id":"edm_01h455vb4pex5vsknk084sn02q","domain":"mail.acme.com","status":"pending_dns","records":[{"purpose":"dkim","type":"TXT","host":"20261006120000pm._domainkey.mail.acme.com","value":"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ…","required":true,"status":"unchecked","seen":"string"}],"problem":"record_missing","brand":"brd_01h455vb4pex5vsknk084sn02q","in_use":true,"verified_at":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteBrandEmailDomain","summary":"Delete a brand's sending domain","description":"Its name is free at once, and Synq removes it from its email provider. Refused while the brand's email is set to come from it. On any plan, so an org that moved down can clean up. Needs `org.emailDomains.edit` in the brand. Recorded as `email_domain.deleted`.","security":[{"bearer":[]}],"x-permission":"org.emailDomains.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^edm_[0-9a-hjkmnp-tv-z]{26}$","description":"The sending domain's id","example":"edm_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The sending domain's id","name":"domain","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The brand's email is set to come from it (`email_domain_in_use`): pick another of its domains, or none, first","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/email-domains/{domain}/check":{"post":{"operationId":"checkBrandEmailDomain","summary":"Check a brand's sending domain now","description":"Looks at the domain again now rather than at its next scheduled check: registers it if it is still `pending_setup`, else looks its records up and, when they are all there and Postmark agrees, verifies it. Once a minute for a domain. Needs `org.emailDomains.edit` in the brand and a plan with `branding.custom_email_domain`.","security":[{"bearer":[]}],"x-permission":"org.emailDomains.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^edm_[0-9a-hjkmnp-tv-z]{26}$","description":"The sending domain's id","example":"edm_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The sending domain's id","name":"domain","in":"path"}],"responses":{"202":{"description":"The domain as the check left it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"},"example":{"id":"edm_01h455vb4pex5vsknk084sn02q","domain":"mail.acme.com","status":"pending_dns","records":[{"purpose":"dkim","type":"TXT","host":"20261006120000pm._domainkey.mail.acme.com","value":"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQ…","required":true,"status":"unchecked","seen":"string"}],"problem":"record_missing","brand":"brd_01h455vb4pex5vsknk084sn02q","in_use":true,"verified_at":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.emailDomains.edit in the brand, or the org's plan doesn't send from its own domain","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/domains":{"get":{"operationId":"listOrgDomains","summary":"List an org's verified domains","description":"The domains the org proved it owns, or is proving, with the TXT record each needs. Needs `org.sso.view` across the org, on any plan.","security":[{"bearer":[]}],"x-permission":"org.sso.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDomainPage"},"example":{"data":[{"id":"odm_01h455vb4pex5vsknk084sn02q","domain":"acme.com","status":"pending","verification":{"type":"TXT","host":"_synq-verification.acme.com","value":"synq-verification=k7q2m5x9a3b4c6d8e2f7g5h3j9k4m2n6"},"problem":"record_not_found","verified_at":"2026-10-21T12:00:00.000Z","failing_until":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createOrgDomain","summary":"Add a domain to verify","description":"A domain the org proves it owns, so its people can sign in through its own identity provider: on a plan with `team.sso` (Enterprise). It starts `pending`, with the TXT record to publish; then verify it. Several orgs may add a name, and the first to prove it holds it. At most 10 added a day, and 20 in all. Needs `org.sso.edit` across the org. Recorded as `org_domain.created`.","security":[{"bearer":[]}],"x-permission":"org.sso.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDomainCreate"},"example":{"domain":"acme.com"}}}},"responses":{"201":{"description":"The domain, and the record to publish","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDomain"},"example":{"id":"odm_01h455vb4pex5vsknk084sn02q","domain":"acme.com","status":"pending","verification":{"type":"TXT","host":"_synq-verification.acme.com","value":"synq-verification=k7q2m5x9a3b4c6d8e2f7g5h3j9k4m2n6"},"problem":"record_not_found","verified_at":"2026-10-21T12:00:00.000Z","failing_until":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.sso.edit across the org, or the org's plan has no team sign-in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org has this domain already (`org_domain_exists`), or has 20 (`org_domain_limit_reached`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Not a domain one org can own (`org_domain_invalid`, with its `reason`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/domains/{domain}":{"get":{"operationId":"getOrgDomain","summary":"Read a verified domain","description":"Its status, its TXT record and what Synq saw at the last check. Needs `org.sso.view` across the org, on any plan.","security":[{"bearer":[]}],"x-permission":"org.sso.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^odm_[0-9a-hjkmnp-tv-z]{26}$","description":"The domain's id","example":"odm_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The domain's id","name":"domain","in":"path"}],"responses":{"200":{"description":"The domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDomain"},"example":{"id":"odm_01h455vb4pex5vsknk084sn02q","domain":"acme.com","status":"pending","verification":{"type":"TXT","host":"_synq-verification.acme.com","value":"synq-verification=k7q2m5x9a3b4c6d8e2f7g5h3j9k4m2n6"},"problem":"record_not_found","verified_at":"2026-10-21T12:00:00.000Z","failing_until":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteOrgDomain","summary":"Delete a verified domain","description":"The org no longer holds the name, and another org may prove it at once. Its people are no longer sent to the org's identity provider by their address. On any plan, so an org that moved down can clean up. Needs `org.sso.edit` across the org. Recorded as `org_domain.deleted`.","security":[{"bearer":[]}],"x-permission":"org.sso.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^odm_[0-9a-hjkmnp-tv-z]{26}$","description":"The domain's id","example":"odm_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The domain's id","name":"domain","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/domains/{domain}/verify":{"post":{"operationId":"verifyOrgDomain","summary":"Verify a domain now","description":"Reads the domain's TXT record through public DNS now. When every public resolver that answers sees it, and no other org holds the name, the domain is `verified`; otherwise it stays as it was, and `problem` says why. A verified domain is also read again every day. Six times a minute for a domain. Needs `org.sso.edit` across the org and a plan with `team.sso`. Recorded as `org_domain.verified` when it verifies.","security":[{"bearer":[]}],"x-permission":"org.sso.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^odm_[0-9a-hjkmnp-tv-z]{26}$","description":"The domain's id","example":"odm_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The domain's id","name":"domain","in":"path"}],"responses":{"200":{"description":"The domain as the check left it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDomain"},"example":{"id":"odm_01h455vb4pex5vsknk084sn02q","domain":"acme.com","status":"pending","verification":{"type":"TXT","host":"_synq-verification.acme.com","value":"synq-verification=k7q2m5x9a3b4c6d8e2f7g5h3j9k4m2n6"},"problem":"record_not_found","verified_at":"2026-10-21T12:00:00.000Z","failing_until":"2026-10-21T12:00:00.000Z","last_checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.sso.edit across the org, or the org's plan has no team sign-in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Another org proved it owns the name first (`org_domain_verified_elsewhere`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/custom-domain":{"get":{"operationId":"getCustomDomain","summary":"Read a brand's custom domain","description":"Its DNS record, what Synq last saw there, its certificate and whether it answers yet. Needs `org.brands.view`, on any plan.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The custom domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"},"example":{"id":"cdm_01h455vb4pex5vsknk084sn02q","hostname":"login.acme.com","status":"pending_dns","issuer":"https://login.acme.com","dns_records":[{"type":"CNAME","name":"login.acme.com","relative_name":"login","value":"cd-k7m2q4x9w3p5r8t6.domains.synq.build","status":"pending","found":null}],"ssl":{"status":"pending","expires_at":"2026-10-21T12:00:00.000Z"},"problems":[{"code":"cname_not_found","detail":"other.example.net"}],"verified_at":"2026-10-21T12:00:00.000Z","activated_at":"2026-10-21T12:00:00.000Z","grace_ends_at":"2026-10-21T12:00:00.000Z","checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Custom domains aren’t set up here (`service_unavailable`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createCustomDomain","summary":"Add a custom domain to a brand","description":"A subdomain the org owns, such as `login.acme.com`, where the brand's issuer will also answer, on a plan with `branding.custom_domain` (Pro and up). Add the one CNAME record the answer names; Synq checks it, issues a certificate, and the domain goes live on its own, usually within minutes. The brand's own issuer keeps working: the domain is a second issuer, with the same users, apps and keys. One per brand. Needs `org.brands.edit`. Recorded as `brand.custom_domain_added`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainCreate"},"example":{"dry_run":true,"hostname":"login.acme.com"}}}},"responses":{"200":{"description":"A dry run: the hostname can be added now; nothing was changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainPreview"},"example":{"dry_run":true,"hostname":"login.acme.com"}}}},"201":{"description":"The custom domain, and the record to add","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"},"example":{"id":"cdm_01h455vb4pex5vsknk084sn02q","hostname":"login.acme.com","status":"pending_dns","issuer":"https://login.acme.com","dns_records":[{"type":"CNAME","name":"login.acme.com","relative_name":"login","value":"cd-k7m2q4x9w3p5r8t6.domains.synq.build","status":"pending","found":null}],"ssl":{"status":"pending","expires_at":"2026-10-21T12:00:00.000Z"},"problems":[{"code":"cname_not_found","detail":"other.example.net"}],"verified_at":"2026-10-21T12:00:00.000Z","activated_at":"2026-10-21T12:00:00.000Z","grace_ends_at":"2026-10-21T12:00:00.000Z","checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan doesn't include custom domains","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The brand has a custom domain already (`custom_domain_exists`), or another brand proved the hostname first and holds it (`hostname_taken`). A brand that only asked for a hostname holds nothing: the one whose DNS record proves it gets it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Not a hostname a custom domain can have: `invalid_hostname`, `apex_not_supported`, `reserved_hostname`, `hostname_denied` or `hostname_not_allowed_here`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Custom domains aren’t set up here (`service_unavailable`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteCustomDomain","summary":"Remove a brand's custom domain","description":"It stops answering at once, and Synq takes it out of Cloudflare: every app that signs in with its issuer stops working, while the brand's own issuer goes on. Once it has served, the hostname is kept from other brands for 30 days. Needs `org.brands.edit`, on any plan. Recorded as `brand.custom_domain_removed`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"202":{"description":"The custom domain, being removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"},"example":{"id":"cdm_01h455vb4pex5vsknk084sn02q","hostname":"login.acme.com","status":"pending_dns","issuer":"https://login.acme.com","dns_records":[{"type":"CNAME","name":"login.acme.com","relative_name":"login","value":"cd-k7m2q4x9w3p5r8t6.domains.synq.build","status":"pending","found":null}],"ssl":{"status":"pending","expires_at":"2026-10-21T12:00:00.000Z"},"problems":[{"code":"cname_not_found","detail":"other.example.net"}],"verified_at":"2026-10-21T12:00:00.000Z","activated_at":"2026-10-21T12:00:00.000Z","grace_ends_at":"2026-10-21T12:00:00.000Z","checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Custom domains aren’t set up here (`service_unavailable`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/custom-domain/verify":{"post":{"operationId":"verifyCustomDomain","summary":"Check a brand's custom domain now","description":"Looks at its DNS and certificate now rather than at the next scheduled check, and carries it on as far as it can go. Once a minute for a domain. Needs `org.brands.edit` and a plan with `branding.custom_domain`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"responses":{"200":{"description":"The custom domain as the check left it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"},"example":{"id":"cdm_01h455vb4pex5vsknk084sn02q","hostname":"login.acme.com","status":"pending_dns","issuer":"https://login.acme.com","dns_records":[{"type":"CNAME","name":"login.acme.com","relative_name":"login","value":"cd-k7m2q4x9w3p5r8t6.domains.synq.build","status":"pending","found":null}],"ssl":{"status":"pending","expires_at":"2026-10-21T12:00:00.000Z"},"problems":[{"code":"cname_not_found","detail":"other.example.net"}],"verified_at":"2026-10-21T12:00:00.000Z","activated_at":"2026-10-21T12:00:00.000Z","grace_ends_at":"2026-10-21T12:00:00.000Z","checked_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan doesn't include custom domains","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Custom domains aren’t set up here (`service_unavailable`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-providers":{"get":{"operationId":"listSignInProviders","summary":"List a brand's sign-in providers","description":"Every upstream provider Synq signs people in through, whether the brand offers it, and how, in Synq's order of providers, a page at a time (50 by default). Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of the brand's sign-in providers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProviderPage"},"example":{"data":[{"provider":"google","link_by_email":true,"hosted_domain":"acme.example","microsoft_tenant":"organizations","use":"sign_in","keep_tokens":true,"kept_claims":["locale"],"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","updated_at":"2026-10-21T12:00:00.000Z"},"signs_in_through":"brand","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","offered":true,"synq_app":true,"scopes":{"minimum":["openid","profile"],"extra":["phone","telegram:bot_access"],"source":"org","asked":["openid","profile","phone","telegram:bot_access"],"inactive":[{"scope":"telegram:bot_access","reason":"scope_needs_own_app"}]}}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-providers/{provider}":{"patch":{"operationId":"updateSignInProvider","summary":"Change how a brand signs in with a provider","description":"Link by email or not, limit Google to one Workspace domain and Microsoft to work and school accounts or one directory, make it a provider people only link (`use`), keep people's tokens there for your server (`keep_tokens`, through your own app alone, 422 `own_app_required` without one; turning it on wants a person's sign-in from the last 5 minutes, 403 `fresh_sign_in_required`) and the claims to keep (`kept_claims`); turning it on or off is `POST …/enable` and `…/disable`. Needs `org.brands.edit`. Recorded as `brand.updated`, naming each setting as `sign_in_providers.<provider>.<setting>` (`keep_tokens` as `keeps_provider_access`, since an audit entry never names a credential, with `identities_cleared` when turning it off deleted some); send null to clear one.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProviderUpdate"},"example":{"link_by_email":true,"hosted_domain":"acme.example","microsoft_tenant":"string","use":"sign_in","keep_tokens":true,"kept_claims":["string"]}}}},"responses":{"200":{"description":"The provider at the brand, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProvider"},"example":{"provider":"google","link_by_email":true,"hosted_domain":"acme.example","microsoft_tenant":"organizations","use":"sign_in","keep_tokens":true,"kept_claims":["locale"],"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","updated_at":"2026-10-21T12:00:00.000Z"},"signs_in_through":"brand","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","offered":true,"synq_app":true,"scopes":{"minimum":["openid","profile"],"extra":["phone","telegram:bot_access"],"source":"org","asked":["openid","profile","phone","telegram:bot_access"],"inactive":[{"scope":"telegram:bot_access","reason":"scope_needs_own_app"}]}}}}},"400":{"description":"A body that is not valid, or a setting the provider has no use for","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or a person turning keep_tokens on hasn’t signed in in the last 5 minutes: `fresh_sign_in_required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"keep_tokens without the brand’s or org’s own app at the provider: `own_app_required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-providers/{provider}/scopes":{"put":{"operationId":"setBrandProviderScopes","summary":"Set a brand's extra scopes at a sign-in provider","description":"What the brand's sign-ins and links ask the provider for beyond Synq's minimum, which is always asked for first: the whole list, replacing the org's there entirely (an empty list asks for nothing extra at this brand). Each scope it adds must be on the provider's list at `GET /v1/provider-scopes` and `available` (422 `scope_not_allowed` or `scope_unavailable`); one that needs your own app needs the brand's own app or the org's there (422 `scope_needs_own_app`; at GitHub, an OAuth App), and adding one wants a plan with `auth.byo_connections` (403 `plan_feature_unavailable`). A scope the brand asks for already, its own or its org's, stays even where it can't be sent now, listed in `inactive`; keeping or taking scopes away never needs the plan. The hosted pages say what each asks for in plain words, and what the person granted is on their identity and in `linked_accounts`. Needs `org.brands.edit`. Recorded as `brand.updated`, naming `sign_in_providers.<provider>.scopes`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderScopesInput"},"example":{"scopes":["phone","telegram:bot_access"]}}}},"responses":{"200":{"description":"The provider at the brand, with its scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProvider"},"example":{"provider":"google","link_by_email":true,"hosted_domain":"acme.example","microsoft_tenant":"organizations","use":"sign_in","keep_tokens":true,"kept_claims":["locale"],"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","updated_at":"2026-10-21T12:00:00.000Z"},"signs_in_through":"brand","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","offered":true,"synq_app":true,"scopes":{"minimum":["openid","profile"],"extra":["phone","telegram:bot_access"],"source":"org","asked":["openid","profile","phone","telegram:bot_access"],"inactive":[{"scope":"telegram:bot_access","reason":"scope_needs_own_app"}]}}}}},"400":{"description":"A body that is not valid, or a scope that is one of Synq’s own minimum (`validation_failed`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or the org's plan doesn't let it bring its own apps, which a scope it adds needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A scope off the provider’s list (`scope_not_allowed`), not available yet (`scope_unavailable`), or one that needs your own app at the provider where there is none (`scope_needs_own_app`), each named in `errors` by its pointer, such as `/scopes/2`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Sign-in providers aren’t set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteBrandProviderScopes","summary":"Clear a brand's own extra scopes at a sign-in provider","description":"The brand goes back to the org's extra scopes there, or Synq's minimum alone where the org keeps none. Needs `org.brands.edit`. Recorded as `brand.updated`, naming `sign_in_providers.<provider>.scopes`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"responses":{"200":{"description":"The provider at the brand, with the scopes it asks for now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProvider"},"example":{"provider":"google","link_by_email":true,"hosted_domain":"acme.example","microsoft_tenant":"organizations","use":"sign_in","keep_tokens":true,"kept_claims":["locale"],"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","updated_at":"2026-10-21T12:00:00.000Z"},"signs_in_through":"brand","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","offered":true,"synq_app":true,"scopes":{"minimum":["openid","profile"],"extra":["phone","telegram:bot_access"],"source":"org","asked":["openid","profile","phone","telegram:bot_access"],"inactive":[{"scope":"telegram:bot_access","reason":"scope_needs_own_app"}]}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/custom-sign-in-providers":{"get":{"operationId":"listCustomSignInProviders","summary":"List a brand's own sign-in providers","description":"The OpenID Connect and OAuth 2.0 providers the brand added, in the order they were added, a page at a time (50 by default): each one's settings, the redirect URI its app registers and its app's client id, never a secret. Synq's own providers are at `…/sign-in-providers`. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of the brand's own providers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProviderPage"},"example":{"data":[{"id":"custom-acme-guild","type":"oidc","name":"Acme","icon":"string","issuer":"string","endpoints":{"authorization":"string","token":"string","userinfo":"string"},"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","token_endpoint_auth_method":"client_secret_basic","updated_at":"2026-10-21T12:00:00.000Z"},"redirect_uri":"https://acme.auth.synq.build/federation/custom-acme-guild/callback","scopes":["string"],"claims":{"subject":"string","name":"Acme","handle":"string","picture":"string","email":"ana@acme.example","email_verified":"string"},"email_authoritative":true,"use":"sign_in","keep_tokens":true,"kept_claims":["string"],"offered":true,"created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createCustomSignInProvider","summary":"Add a sign-in provider of the brand’s own","description":"An OpenID Connect issuer (`type: oidc`, discovered from `issuer`) or an OAuth 2.0 server (`type: oauth2`, at the `endpoints` you name), through your own app there, whose `redirect_uri` the answer names. Every URL is https on the public internet (422 `provider_url_unsafe`), and Synq reaches the provider only from its own server. Synq asks the provider first, so nothing it refuses is kept: it reads the discovery document (422 `provider_discovery_failed`) and tries the app's id and secret at the token endpoint (422 `connection_rejected`, 503 while it can't be reached). Sign-ins use state, PKCE (S256) and, for OpenID Connect, a nonce and the ID token's signature, as with Synq's providers. Its email addresses are unverified unless `email_authoritative`. It is off until `POST …/enable`. At most 20 per brand (409 `conflict`); an id the brand has is 409 `sign_in_provider_exists`. Needs `org.connections.edit` and a plan with `auth.custom_providers`, Scale and up (403 `plan_feature_unavailable`, naming the plan that has it). A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. Recorded as `brand.updated` with `provider` and each setting under `custom_sign_in_provider.`, never the secret.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProviderCreate"},"example":{"client_id":"app_01h455vb4pex5vsknk084sn02q","client_secret":"string","token_endpoint_auth_method":"client_secret_basic","id":"custom-acme-guild","type":"oidc","name":"Acme Guild","icon":"string","issuer":"https://id.acme-guild.example","endpoints":{"authorization":"string","token":"string","userinfo":"string"},"scopes":["string"],"claims":{"subject":"string","name":"Acme","handle":"string","picture":"string","email":"ana@acme.example","email_verified":"string"},"email_authoritative":true,"use":"sign_in","keep_tokens":true,"kept_claims":["string"]}}}},"responses":{"201":{"description":"The provider, added and off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProvider"},"example":{"id":"custom-acme-guild","type":"oidc","name":"Acme","icon":"string","issuer":"string","endpoints":{"authorization":"string","token":"string","userinfo":"string"},"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","token_endpoint_auth_method":"client_secret_basic","updated_at":"2026-10-21T12:00:00.000Z"},"redirect_uri":"https://acme.auth.synq.build/federation/custom-acme-guild/callback","scopes":["string"],"claims":{"subject":"string","name":"Acme","handle":"string","picture":"string","email":"ana@acme.example","email_verified":"string"},"email_authoritative":true,"use":"sign_in","keep_tokens":true,"kept_claims":["string"],"offered":true,"created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.connections.edit, the org's plan doesn't include its own OpenID Connect and OAuth 2.0 providers (Scale and up), or a person signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An id the brand has already (`sign_in_provider_exists`), or as many providers as a brand keeps (`conflict`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An address Synq never reaches (`provider_url_unsafe`: not https, or off the public internet), an issuer whose discovery document can't be read or doesn't name it (`provider_discovery_failed`), or an app the provider refused (`connection_rejected`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The provider can't be reached to check the app","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/custom-sign-in-providers/{provider}":{"get":{"operationId":"getCustomSignInProvider","summary":"Get one of a brand's own sign-in providers","description":"Its settings, the redirect URI its app registers and its client id, never a secret. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","example":"custom-acme-guild","description":"The brand's own provider's id"},"required":true,"description":"The brand's own provider's id","name":"provider","in":"path"}],"responses":{"200":{"description":"The provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProvider"},"example":{"id":"custom-acme-guild","type":"oidc","name":"Acme","icon":"string","issuer":"string","endpoints":{"authorization":"string","token":"string","userinfo":"string"},"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","token_endpoint_auth_method":"client_secret_basic","updated_at":"2026-10-21T12:00:00.000Z"},"redirect_uri":"https://acme.auth.synq.build/federation/custom-acme-guild/callback","scopes":["string"],"claims":{"subject":"string","name":"Acme","handle":"string","picture":"string","email":"ana@acme.example","email_verified":"string"},"email_authoritative":true,"use":"sign_in","keep_tokens":true,"kept_claims":["string"],"offered":true,"created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateCustomSignInProvider","summary":"Change one of a brand's own sign-in providers","description":"Its name and icon, an OAuth 2.0 provider's endpoints (where the app is asked again), the scopes, the claims it is read by, whether its email is authoritative, what it is for (`use`), and the tokens and claims kept (`keep_tokens` on wants a person's sign-in from the last 5 minutes, 403 `fresh_sign_in_required`). Its id, kind and issuer never change: add another provider instead. Its app is `PUT …/app`; turning it on or off is `POST …/enable` and `…/disable`. Needs `org.brands.edit`. Recorded as `brand.updated`, naming each setting under `custom_sign_in_provider.` (`keep_tokens` as `keeps_provider_access`, with `identities_cleared` when turning it off deleted some).","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","example":"custom-acme-guild","description":"The brand's own provider's id"},"required":true,"description":"The brand's own provider's id","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProviderUpdate"},"example":{"name":"Acme Guild","icon":"string","endpoints":{"authorization":"string","token":"string","userinfo":"string"},"scopes":["string"],"claims":{"subject":"string","name":"Acme","handle":"string","picture":"string","email":"ana@acme.example","email_verified":"string"},"email_authoritative":true,"use":"sign_in","keep_tokens":true,"kept_claims":["string"]}}}},"responses":{"200":{"description":"The provider, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProvider"},"example":{"id":"custom-acme-guild","type":"oidc","name":"Acme","icon":"string","issuer":"string","endpoints":{"authorization":"string","token":"string","userinfo":"string"},"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","token_endpoint_auth_method":"client_secret_basic","updated_at":"2026-10-21T12:00:00.000Z"},"redirect_uri":"https://acme.auth.synq.build/federation/custom-acme-guild/callback","scopes":["string"],"claims":{"subject":"string","name":"Acme","handle":"string","picture":"string","email":"ana@acme.example","email_verified":"string"},"email_authoritative":true,"use":"sign_in","keep_tokens":true,"kept_claims":["string"],"offered":true,"created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid, or a setting its kind has no use for","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or a person turning keep_tokens on hasn’t signed in in the last 5 minutes: `fresh_sign_in_required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An address Synq never reaches (`provider_url_unsafe`: not https, or off the public internet), an issuer whose discovery document can't be read or doesn't name it (`provider_discovery_failed`), or an app the provider refused (`connection_rejected`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The provider can't be reached to check the app","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteCustomSignInProvider","summary":"Delete one of a brand's own sign-in providers","description":"Deletes it, its app's sealed secret and every linked account there: people keep their accounts and their other ways in, and someone whose only way in it was signs in no more until the tenant gives them another. It comes off every app's list of ways (`sign_in_methods`) that names it, each recorded as that app's `app.updated`; while an app takes no other way, the delete is refused (409 `sign_in_method_in_use`, naming them in `apps`) and nothing changes. Its id is free again, and a provider made with it starts with nobody, is on no app's list and is off on the brand's sign-in page. The brand's last way to sign in that's on can't be deleted (422 `no_way_to_sign_in`). Needs `org.connections.edit`. Recorded as `brand.updated` with `deleted`, `identities_removed` and, where apps named it, `apps_updated`.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","example":"custom-acme-guild","description":"The brand's own provider's id"},"required":true,"description":"The brand's own provider's id","name":"provider","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An app takes no other way to sign in (`sign_in_method_in_use`, naming them in `apps`): give it another, or let it take every way the brand offers, first","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/SignInMethodInUseProblem"}}}},"422":{"description":"It is the last way to sign in on the brand’s page (`no_way_to_sign_in`): put another way on first","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/custom-sign-in-providers/{provider}/app":{"put":{"operationId":"setCustomSignInProviderApp","summary":"Replace the app one of a brand's own sign-in providers signs in through","description":"A new client id and secret at the provider, asked first as making it does, so nothing it refuses is kept (422 `connection_rejected`, 503 while it can't be reached). The app must register the provider's `redirect_uri`. Needs `org.connections.edit` and a plan with `auth.custom_providers`, Scale and up (403 `plan_feature_unavailable`). A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. Recorded as `brand.updated` with `app_replaced`, naming its client id, never the secret.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","example":"custom-acme-guild","description":"The brand's own provider's id"},"required":true,"description":"The brand's own provider's id","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProviderAppInput"},"example":{"client_id":"app_01h455vb4pex5vsknk084sn02q","client_secret":"string","token_endpoint_auth_method":"client_secret_basic"}}}},"responses":{"200":{"description":"The provider, with its new app","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomSignInProvider"},"example":{"id":"custom-acme-guild","type":"oidc","name":"Acme","icon":"string","issuer":"string","endpoints":{"authorization":"string","token":"string","userinfo":"string"},"app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","token_endpoint_auth_method":"client_secret_basic","updated_at":"2026-10-21T12:00:00.000Z"},"redirect_uri":"https://acme.auth.synq.build/federation/custom-acme-guild/callback","scopes":["string"],"claims":{"subject":"string","name":"Acme","handle":"string","picture":"string","email":"ana@acme.example","email_verified":"string"},"email_authoritative":true,"use":"sign_in","keep_tokens":true,"kept_claims":["string"],"offered":true,"created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.connections.edit, the org's plan doesn't include its own OpenID Connect and OAuth 2.0 providers (Scale and up), or a person signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"An address Synq never reaches (`provider_url_unsafe`: not https, or off the public internet), an issuer whose discovery document can't be read or doesn't name it (`provider_discovery_failed`), or an app the provider refused (`connection_rejected`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The provider can't be reached to check the app","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/sign-in-providers":{"get":{"operationId":"listOrgProviderApps","summary":"List the org's own apps at the sign-in providers","description":"One per provider, in Synq’s order of providers, a page at a time (50 by default): the org’s own app there (its client id), or null, and the redirect URIs an app there registers, one per live brand: each brand’s own callback, on its issuer’s host. Never a secret. Each brand’s list (`…/brands/{brand}/sign-in-providers`) says which app it signs in through, and its own redirect URI. Needs `org.connections.view`.","security":[{"bearer":[]}],"x-permission":"org.connections.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of the org’s apps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderAppPage"},"example":{"data":[{"provider":"google","app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uris":["https://acme.auth.synq.build/federation/google/callback","https://acme-games.auth.synq.build/federation/google/callback"],"updated_at":"2026-10-21T12:00:00.000Z"},"redirect_uris":["https://acme.auth.synq.build/federation/google/callback","https://acme-games.auth.synq.build/federation/google/callback"],"scopes":{"minimum":["openid","profile"],"extra":["phone"],"inactive":[{"scope":"telegram:bot_access","reason":"scope_needs_own_app"}]}}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/sign-in-providers/{provider}/app":{"put":{"operationId":"setOrgProviderApp","summary":"Set the org’s own app at a sign-in provider","description":"The app is the org’s, for every brand without its own. The app at the provider must register every one of `redirect_uris` exactly: each live brand’s own callback, on its issuer’s host. A brand made later adds its own, which the answer that makes it names. Checks the client id and secret with the provider first (a token request it refuses for the code, not the app, when it takes them), then keeps them in place of any before. Microsoft's needs Entra's `auth_time` optional claim turned on, or a fresh sign-in through it is refused. Apple takes no `client_secret`: send its Services ID as `client_id` with `team_id`, `key_id` and the `.p8` `private_key`, from which Synq signs each client secret it sends Apple. Apple delivers mail to private relay addresses only from domains registered with the app, so register the domain Synq sends your brands' email from (the domain of their sender address) under Sign in with Apple for Email Communication, or Synq's email to people who hid their address bounces. Every other provider takes `client_id` and `client_secret`. Recorded as `org.updated` (or `brand.updated`) with the client id, never the secret. 422 `connection_rejected` when the provider refuses the app; 503 when it can't be reached; at most 10 a minute per org (429). Needs `org.connections.edit`, and a plan with `auth.byo_connections` (403 `plan_feature_unavailable` otherwise, naming the plan in `required_plan`); forgetting one never does. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAppInput"},"example":{"client_id":"app_01h455vb4pex5vsknk084sn02q","client_secret":"string","team_id":"A1B2C3D4E5","key_id":"F6G7H8I9J0","private_key":"string","app_type":"oauth_app"}}}},"responses":{"200":{"description":"The app, kept, with every redirect URI it registers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWideProviderApp"},"example":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uris":["https://acme.auth.synq.build/federation/google/callback","https://acme-games.auth.synq.build/federation/google/callback"],"updated_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.connections.edit, the org's plan doesn't let it bring its own apps, or a person signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The provider refused the app (`connection_rejected`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The provider can’t be reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteOrgProviderApp","summary":"Forget the org’s own app at a sign-in provider","description":"The brand signs in through the org’s app, else Synq’s. Recorded as `org.updated` (or `brand.updated`). Needs `org.connections.edit`.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"responses":{"204":{"description":"Forgotten"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-providers/{provider}/app":{"put":{"operationId":"setBrandProviderApp","summary":"Set a brand’s own app at a sign-in provider","description":"The app is the brand’s own, which wins over the org’s. The app at the provider must register `redirect_uri` exactly: the brand’s own callback, on its issuer’s host. Checks the client id and secret with the provider first (a token request it refuses for the code, not the app, when it takes them), then keeps them in place of any before. Microsoft's needs Entra's `auth_time` optional claim turned on, or a fresh sign-in through it is refused. Apple takes no `client_secret`: send its Services ID as `client_id` with `team_id`, `key_id` and the `.p8` `private_key`, from which Synq signs each client secret it sends Apple. Apple delivers mail to private relay addresses only from domains registered with the app, so register the domain Synq sends your brands' email from (the domain of their sender address) under Sign in with Apple for Email Communication, or Synq's email to people who hid their address bounces. Every other provider takes `client_id` and `client_secret`. Recorded as `org.updated` (or `brand.updated`) with the client id, never the secret. 422 `connection_rejected` when the provider refuses the app; 503 when it can't be reached; at most 10 a minute per org (429). Needs `org.connections.edit`, and a plan with `auth.byo_connections` (403 `plan_feature_unavailable` otherwise, naming the plan in `required_plan`); forgetting one never does. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAppInput"},"example":{"client_id":"app_01h455vb4pex5vsknk084sn02q","client_secret":"string","team_id":"A1B2C3D4E5","key_id":"F6G7H8I9J0","private_key":"string","app_type":"oauth_app"}}}},"responses":{"200":{"description":"The app, kept, with the redirect URI it registers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderApp"},"example":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uri":"https://acme.auth.synq.build/federation/google/callback","updated_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.connections.edit, the org's plan doesn't let it bring its own apps, or a person signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The provider refused the app (`connection_rejected`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The provider can’t be reached","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteBrandProviderApp","summary":"Forget a brand’s own app at a sign-in provider","description":"The brand signs in through the org’s app, else Synq’s. Recorded as `org.updated` (or `brand.updated`). Needs `org.connections.edit`.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"responses":{"204":{"description":"Forgotten"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/sign-in-providers/{provider}/scopes":{"put":{"operationId":"setOrgProviderScopes","summary":"Set the org's extra scopes at a sign-in provider","description":"What every brand of the org that keeps none of its own asks the provider for beyond Synq’s minimum, which is always asked for first: the whole list, replacing the one before. Each scope it adds must be on the provider’s list at `GET /v1/provider-scopes` and `available` (422 `scope_not_allowed` or `scope_unavailable`); one that needs your own app needs the org’s own app there (422 `scope_needs_own_app`), and adding one wants a plan with `auth.byo_connections` (403 `plan_feature_unavailable`). A scope the org asks for already stays even where it can’t be sent now, listed in `inactive`; keeping or taking scopes away never needs the plan. A brand’s own list (`PUT …/brands/{brand}/sign-in-providers/{provider}/scopes`) replaces the org’s there. Needs `org.connections.edit`. Recorded as `org.updated`, naming `sign_in_providers.<provider>.scopes`.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderScopesInput"},"example":{"scopes":["phone","telegram:bot_access"]}}}},"responses":{"200":{"description":"The provider in the org’s list, with its extra scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProviderApp"},"example":{"provider":"google","app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"oauth_app","redirect_uris":["https://acme.auth.synq.build/federation/google/callback","https://acme-games.auth.synq.build/federation/google/callback"],"updated_at":"2026-10-21T12:00:00.000Z"},"redirect_uris":["https://acme.auth.synq.build/federation/google/callback","https://acme-games.auth.synq.build/federation/google/callback"],"scopes":{"minimum":["openid","profile"],"extra":["phone"],"inactive":[{"scope":"telegram:bot_access","reason":"scope_needs_own_app"}]}}}}},"400":{"description":"A body that is not valid, or a scope that is one of Synq’s own minimum (`validation_failed`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.connections.edit, or the org's plan doesn't let it bring its own apps, which a scope it adds needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A scope off the provider’s list (`scope_not_allowed`), not available yet (`scope_unavailable`), or one that needs your own app at the provider where there is none (`scope_needs_own_app`), each named in `errors` by its pointer, such as `/scopes/2`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteOrgProviderScopes","summary":"Clear the org's extra scopes at a sign-in provider","description":"The org’s brands that keep none of their own ask the provider for Synq’s minimum alone. Needs `org.connections.edit`. Recorded as `org.updated`, naming `sign_in_providers.<provider>.scopes`.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","enum":["google","github","microsoft","apple","facebook","x","discord","telegram","matrica"],"example":"google","description":"The sign-in provider"},"required":true,"description":"The sign-in provider","name":"provider","in":"path"}],"responses":{"204":{"description":"Cleared"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps":{"get":{"operationId":"listApps","summary":"List a brand's apps","description":"Oldest first, with those that registered themselves. Needs `org.apps.view`.","security":[{"bearer":[]}],"x-permission":"org.apps.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of apps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppPage"},"example":{"data":[{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme","app_type":"web","source":"dashboard","first_party":true,"own_ui_sign_in":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"disabled":true,"development":true,"redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example","backchannel_logout_session_required":true,"client_uri":"https://app.acme.example","logo_uri":"https://app.acme.example","policy_uri":"https://app.acme.example","tos_uri":"https://app.acme.example","initiate_login_uri":"https://app.acme.example","jwks_uri":"https://app.acme.example","token_endpoint_auth_method":"client_secret_basic","pkce_optional":true,"spa_refresh_tokens":true,"refresh_token_reuse_window_seconds":0,"previous_secret_expires_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"loopback_redirect_uris","message":"string"}]}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createApp","summary":"Make an app","description":"A web, SPA, native or machine app of the brand. A web or machine app's secret is in the response, this once; only its hash is kept. Needs `org.apps.edit`, and room under the org's plan (403 `plan_quota_exceeded`, naming the apps that hold its places in `held_by` and the plan that has room in `required_plan`). Apps that registered themselves don't count, and neither does the org's development app: its first app whose redirect URIs are all on localhost, 127.0.0.1 or [::1], beside the plan's apps on every plan (Starter allows 1 app, plus a development app). Recorded as `app.created`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppCreate"},"example":{"name":"Acme web","app_type":"web","redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example/auth/backchannel-logout","backchannel_logout_session_required":true,"client_uri":"https://example.com","logo_uri":"https://example.com","policy_uri":"https://example.com","tos_uri":"https://example.com","initiate_login_uri":"https://shop.acme.example/login","jwks_uri":"https://example.com","token_endpoint_auth_method":"client_secret_basic","first_party":true,"pkce_optional":true,"own_ui_sign_in":true,"spa_refresh_tokens":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"refresh_token_reuse_window_seconds":30}}}},"responses":{"201":{"description":"The new app, with its secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppWithSecret"},"example":{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme","app_type":"web","source":"dashboard","first_party":true,"own_ui_sign_in":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"disabled":true,"development":true,"redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example","backchannel_logout_session_required":true,"client_uri":"https://app.acme.example","logo_uri":"https://app.acme.example","policy_uri":"https://app.acme.example","tos_uri":"https://app.acme.example","initiate_login_uri":"https://app.acme.example","jwks_uri":"https://app.acme.example","token_endpoint_auth_method":"client_secret_basic","pkce_optional":true,"spa_refresh_tokens":true,"refresh_token_reuse_window_seconds":0,"previous_secret_expires_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"loopback_redirect_uris","message":"string"}],"client_secret":"string"}}}},"400":{"description":"Settings that are not valid for this app","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.apps.edit, or the org's plan allows no more apps","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}":{"get":{"operationId":"getApp","summary":"Read an app","description":"Never its secret. Needs `org.apps.view`.","security":[{"bearer":[]}],"x-permission":"org.apps.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"responses":{"200":{"description":"The app","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"},"example":{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme","app_type":"web","source":"dashboard","first_party":true,"own_ui_sign_in":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"disabled":true,"development":true,"redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example","backchannel_logout_session_required":true,"client_uri":"https://app.acme.example","logo_uri":"https://app.acme.example","policy_uri":"https://app.acme.example","tos_uri":"https://app.acme.example","initiate_login_uri":"https://app.acme.example","jwks_uri":"https://app.acme.example","token_endpoint_auth_method":"client_secret_basic","pkce_optional":true,"spa_refresh_tokens":true,"refresh_token_reuse_window_seconds":0,"previous_secret_expires_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"loopback_redirect_uris","message":"string"}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateApp","summary":"Change an app","description":"Its name, URIs, links and settings; never its type, and never whether it is on (`POST …/enable` and `…/disable`). Send null to clear a link. A redirect URI that isn't on localhost, 127.0.0.1 or [::1] makes the org's development app count toward its plan's apps, so it needs room there (403 `plan_quota_exceeded`, naming the apps that hold its places in `held_by`). Needs `org.apps.edit`. Recorded as `app.updated`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppUpdate"},"example":{"name":"Acme","redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example/auth/backchannel-logout","backchannel_logout_session_required":true,"client_uri":"https://example.com","logo_uri":"https://example.com","policy_uri":"https://example.com","tos_uri":"https://example.com","initiate_login_uri":"https://shop.acme.example/login","jwks_uri":"https://example.com","token_endpoint_auth_method":"client_secret_basic","first_party":true,"pkce_optional":true,"own_ui_sign_in":true,"spa_refresh_tokens":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"refresh_token_reuse_window_seconds":30}}}},"responses":{"200":{"description":"The app, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"},"example":{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme","app_type":"web","source":"dashboard","first_party":true,"own_ui_sign_in":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"disabled":true,"development":true,"redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example","backchannel_logout_session_required":true,"client_uri":"https://app.acme.example","logo_uri":"https://app.acme.example","policy_uri":"https://app.acme.example","tos_uri":"https://app.acme.example","initiate_login_uri":"https://app.acme.example","jwks_uri":"https://app.acme.example","token_endpoint_auth_method":"client_secret_basic","pkce_optional":true,"spa_refresh_tokens":true,"refresh_token_reuse_window_seconds":0,"previous_secret_expires_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"loopback_redirect_uris","message":"string"}]}}}},"400":{"description":"Settings that are not valid for this app","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.apps.edit, or the org's development app was given a redirect URI off this computer and its plan allows no more apps","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteApp","summary":"Delete an app","description":"At once: it signs no one in and gets no tokens. An app an API names as its own client can't be deleted until the API names another. Needs `org.apps.edit`. Recorded as `app.deleted`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An API's own client","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/quickstart":{"get":{"operationId":"getAppQuickstart","summary":"Read an app's quickstart","description":"What to install and the values to set to sign people in with the app, filled in with its own: its issuer, client_id and redirect URI. For a web app, `@synqauth/nextjs`'s route mount, and the redirect URI to add when it has none of the mount's; for a SPA, `@synqauth/js`; for a native app, the values for its OpenID Connect library; for machine and agent apps, client credentials. Never its secret: a placeholder says where it was shown. Needs `org.apps.view`.","security":[{"bearer":[]}],"x-permission":"org.apps.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"responses":{"200":{"description":"The quickstart","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppQuickstart"},"example":{"app_id":"app_01h455vb4pex5vsknk084sn02q","app_type":"web","issuer":"string","blocks":[{"title":"Install","file":".env.local","code":"pnpm add @synqauth/nextjs @synqauth/react","note":"string"}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/enable":{"post":{"operationId":"enableApp","summary":"Enable an app","description":"Turns the app on: it signs people in and gets tokens again, with its settings as they were. Needs `org.apps.edit`. Recorded as `app.updated`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The app, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"},"example":{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme","app_type":"web","source":"dashboard","first_party":true,"own_ui_sign_in":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"disabled":true,"development":true,"redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example","backchannel_logout_session_required":true,"client_uri":"https://app.acme.example","logo_uri":"https://app.acme.example","policy_uri":"https://app.acme.example","tos_uri":"https://app.acme.example","initiate_login_uri":"https://app.acme.example","jwks_uri":"https://app.acme.example","token_endpoint_auth_method":"client_secret_basic","pkce_optional":true,"spa_refresh_tokens":true,"refresh_token_reuse_window_seconds":0,"previous_secret_expires_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"loopback_redirect_uris","message":"string"}]}}}},"400":{"description":"Settings that are not valid for this app","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/disable":{"post":{"operationId":"disableApp","summary":"Disable an app","description":"Turns the app off: it signs no one in and gets no tokens until it is enabled again, and its settings stay as they are. Needs `org.apps.edit`. Recorded as `app.updated`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The app, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"},"example":{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme","app_type":"web","source":"dashboard","first_party":true,"own_ui_sign_in":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"disabled":true,"development":true,"redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example","backchannel_logout_session_required":true,"client_uri":"https://app.acme.example","logo_uri":"https://app.acme.example","policy_uri":"https://app.acme.example","tos_uri":"https://app.acme.example","initiate_login_uri":"https://app.acme.example","jwks_uri":"https://app.acme.example","token_endpoint_auth_method":"client_secret_basic","pkce_optional":true,"spa_refresh_tokens":true,"refresh_token_reuse_window_seconds":0,"previous_secret_expires_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"loopback_redirect_uris","message":"string"}]}}}},"400":{"description":"Settings that are not valid for this app","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/rotate-secret":{"post":{"operationId":"rotateAppSecret","summary":"Rotate an app's secret","description":"A new secret, in the response this once. The current one keeps working for `overlap_seconds`, so the app can be redeployed with the new one first. Needs `org.apps.edit`. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. The one exception is the first new secret of an app the person made since they signed in, which that sign-in was already handed a secret for: onboarding makes the app and shows its secret later. Recorded as `app.secret_rotated`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretRotation"},"example":{"overlap_seconds":86400}}}},"responses":{"200":{"description":"The app, with its new secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppWithSecret"},"example":{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme","app_type":"web","source":"dashboard","first_party":true,"own_ui_sign_in":true,"sign_in_methods":["email","custom-acme-guild"],"test_sign_ins":true,"sign_in_claims":true,"disabled":true,"development":true,"redirect_uris":["https://app.acme.example"],"post_logout_redirect_uris":["https://app.acme.example"],"backchannel_logout_uri":"https://app.acme.example","backchannel_logout_session_required":true,"client_uri":"https://app.acme.example","logo_uri":"https://app.acme.example","policy_uri":"https://app.acme.example","tos_uri":"https://app.acme.example","initiate_login_uri":"https://app.acme.example","jwks_uri":"https://app.acme.example","token_endpoint_auth_method":"client_secret_basic","pkce_optional":true,"spa_refresh_tokens":true,"refresh_token_reuse_window_seconds":0,"previous_secret_expires_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","warnings":[{"code":"loopback_redirect_uris","message":"string"}],"client_secret":"string"}}}},"400":{"description":"An overlap that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.apps.edit, or a person signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An app without a secret: a public app, or one that signs its own JWTs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/setup-code":{"post":{"operationId":"createAppSetupCode","summary":"Make a setup code for npx synqauth init","description":"A code, shown once, that `npx synqauth init --code <code>` sets a Next.js project up with: it adds the project's https loopback addresses to this app and takes a new secret for it, once, within 60 minutes (`POST /v1/setup-codes/redeem`). It is what the dashboard's \"Make your Next.js app\" shows after onboarding, so init uses the app onboarding made instead of a claimable org. A new code takes the place of the app's last one.\n\nFor the brand's own web apps that keep a secret and are on (`conflict` otherwise, saying why). Needs `org.apps.edit`, as rotating its secret does, and the same fresh sign-in: A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. The one exception is the app's first new secret, from the sign-in that made it, as onboarding's. Making one changes nothing until it's used, so it records nothing; using it records `app.updated` and `app.secret_rotated` as the person who made it.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"201":{"description":"The setup code, this once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSetupCode"},"example":{"code":"synq_setup_…","expires_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.apps.edit, or a person signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, brand or app, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An app init can't set up: not a web app with a secret, not the brand's own, or turned off","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/setup-codes/redeem":{"post":{"operationId":"redeemSetupCode","x-permission":"none","summary":"Set a project up with a setup code","description":"What `npx synqauth init --code <code>` calls, with no credential but the code (`POST …/apps/{app}/setup-code` made it): the app gets the project's https loopback redirect and post-logout URIs it lacks (`app.updated`), up to the 20 an app holds, and a new secret (`app.secret_rotated`), both recorded as the person who made the code. The secret it had keeps working for a day, as a rotation's does. The answer is the brand's issuer and the app's keys, for the project's `.env.local`, this once.\n\nThe code works once, within 60 minutes, and only while whoever made it may still change the app: a used, expired or unknown one, one whose app, brand or org is gone or disabled, or one whose maker left the org, was removed, lost `org.apps.edit` or had their sessions there ended (an API key: was revoked or expired) is `not_found`. An app that can't be set up now (not a web app with a secret, not the brand's own, turned off) is `conflict`, and the code stays unused.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupCodeRedeem"},"example":{"code":"synq_setup_…","redirect_uris":["https://localhost:3000/api/auth/callback"],"post_logout_redirect_uris":[]}}}},"responses":{"200":{"description":"The brand's issuer and the app's keys, this once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemedSetupCode"},"example":{"org":{"id":"org_01h455vb4pex5vsknk084sn02q","slug":"acme","name":"Acme"},"brand":{"id":"string","name":"Acme"},"issuer":"https://acme.auth.synq.build","app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","client_secret":"string","name":"Acme","redirect_uris":["https://app.acme.example"]}}}}},"400":{"description":"A body that is not valid, or an address that is not https on loopback","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No app this code sets up: used, expired, unknown or gone, or its maker can't change the app any more","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An app init can't set up now, or one with as many redirect URIs as it holds","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests from this address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/setup-email":{"post":{"operationId":"sendAppSetupEmail","summary":"Email yourself an app's setup","description":"Emails the calling person's own verified address a link to the app's setup on Synq's dashboard, to open on the computer where the app's code is: what the dashboard's \"Email me the setup\" does on a phone. The email holds the link alone, never a key or a secret: the dashboard shows those after the person signs in. A person only, since an API key has no address. At most 5 an hour for each person. Needs `org.apps.view`.","security":[{"bearer":[]}],"x-permission":"org.apps.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"202":{"description":"Sent: where to, and the link it carries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSetupEmail"},"example":{"to":"ada@example.com","setup_url":"https://dashboard.synq.build/orgs/org_01h455vb4pex5vsknk084sn02q/get-started?brand=brd_01h455vb4pex5vsknk084sn02r&app=app_01h455vb4pex5vsknk084sn02s"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.apps.view, is an API key, or its person has no verified email address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, brand or app, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Synq can't email the person's address: it bounced or was marked as spam before, or this environment emails only Synq's team","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"The person asked for 5 in the last hour, or too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No way to send email is set up here, or the email couldn't be sent","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/approval-requests":{"post":{"operationId":"createApprovalRequest","summary":"Ask for a change, made at once or approved by the person in the dashboard","description":"A change that widens who can get in or changes where sign-ins go, asked for from an MCP host: a new brand with a permanent issuer slug (`brand.create`), an app's redirect URIs (`app.redirect_uris`), a way to sign in an app takes or stops taking, or its test sign-ins (`app.sign_in_method`), a new app (`app.create`), an invitation (`org.invite`) an API key (`org.api_key`), or dashboard configuration (`configuration.update`: themes, brand email, APIs/scopes, token gates, sending domains and file finalization). Reads what is there as the caller and answers with `preview`, what it does in plain words, and its `hash`. A change the org's plan can't take is refused now, as approving would refuse it (403 `plan_feature_unavailable`, or `plan_quota_exceeded` for a new app or brand), naming the plan that allows it and how to move there, so nobody is asked to approve what can't be made. By default a change is made at once, answering `approved` with `applied_at_once` (recorded as `approval_request.applied`, and the change as its route records it, naming this request and the MCP host's app), and a refusal is the change's own route's, with nothing left waiting. It waits instead, and nothing changes until the same person approves it at `approve_url` in the dashboard within 15 minutes, where the org requires approval for every AI agent change or the person asks to approve theirs (`GET …/agent-approvals`), and whatever either says for money, people, sign-in security and a secret shown once (`asks_because`). Some changes always ask, and take a sign-in from the last 5 minutes to approve: money and people (billing and plans, inviting or removing members, roles, API keys, deleting or moving a brand) and sign-in security (an app’s redirect and sign-out addresses and how it proves itself, custom sign-in, sending and verified domains, turning a sign-in protection off, such as the breached-password check or PKCE, turning a token gate off, deleting it or taking a place off it, and loosening account linking). So does a change that makes a secret only you should see (a web or machine app’s client secret, a webhook’s signing secret), which shows once, on its approval page. People only, never an API key. Needs `org.read`, and asking needs the permission the change does: `org.apps.edit` for apps and the ways they take, `org.members.edit` for an invitation, `org.apiKeys.edit` (and every permission the key would hold) for an API key. Recorded as `approval_request.created`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestCreate"},"example":{"kind":"app.redirect_uris","brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q","redirect_uris":["https://app.acme.example"]}}}},"responses":{"201":{"description":"The request: made at once, or awaiting approval where approvals are on or the change always asks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"},"example":{"id":"apr_01h455vb4pex5vsknk084sn02q","kind":"app.redirect_uris","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"change":{"redirect_uris":["https://acme.example/callback"]},"title":"Make a token gate","preview":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback.","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"changes":[{"kind":"app.redirect_uris","operation":"string","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"title":"string","preview":"string","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","resource_id":"string"}}],"hash":"9f2c6a…","status":"awaiting_approval","reason":"string","last_refusal":{"code":"plan_feature_unavailable","detail":"string","at":"2026-10-21T12:00:00.000Z"},"asked_from":"string","asked_from_name":"Claude","approve_url":"https://app.acme.example","applied_at_once":false,"asks_because":"sign_in_security","fresh_sign_in":false,"relied_on_sign_in":{"signed_in_at":"2026-10-21T12:00:00.000Z","within_window":false},"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","invite_id":"inv_01h455vb4pex5vsknk084sn02q","key_id":"string","resource_id":"string"},"expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid, or a redirect URI the app may not have","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key, a credential that lacks the permission the change needs, a change the org's plan can't take (`plan_feature_unavailable`, `plan_quota_exceeded`), or a change made at once that its route refuses","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A way to sign in that is on or off already, or that the app takes or doesn’t already, or a change made at once that conflicts with what is there","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A change made at once that fails its route’s checks","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A change made at once that a service it needs couldn’t take just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"listApprovalRequests","summary":"List your approval requests","description":"The changes the calling person asked for from an MCP host, newest first, each as `GET …/approval-requests/{request}` answers it: what it does, its status and, while it waits, its `approve_url`. `status=awaiting_approval` lists those still waiting for them to decide (the dashboard's \"Waiting for you\"); left out, every status. Only the person's own: only they decide them. One about a brand they hold no role in any more isn't listed. An API key asks for none, so its list is empty. Needs `org.read`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["awaiting_approval","approved","declined","expired","cancelled"],"description":"Only requests with this status, such as `awaiting_approval` for those still waiting; every status when left out","example":"awaiting_approval"},"required":false,"description":"Only requests with this status, such as `awaiting_approval` for those still waiting; every status when left out","name":"status","in":"query"}],"responses":{"200":{"description":"The person's requests, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestPage"},"example":{"data":[{"id":"apr_01h455vb4pex5vsknk084sn02q","kind":"app.redirect_uris","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"change":{"redirect_uris":["https://acme.example/callback"]},"title":"Make a token gate","preview":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback.","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"changes":[{"kind":"app.redirect_uris","operation":"string","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"title":"string","preview":"string","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","resource_id":"string"}}],"hash":"9f2c6a…","status":"awaiting_approval","reason":"string","last_refusal":{"code":"plan_feature_unavailable","detail":"string","at":"2026-10-21T12:00:00.000Z"},"asked_from":"string","asked_from_name":"Claude","approve_url":"https://app.acme.example","applied_at_once":false,"asks_because":"sign_in_security","fresh_sign_in":false,"relied_on_sign_in":{"signed_in_at":"2026-10-21T12:00:00.000Z","within_window":false},"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","invite_id":"inv_01h455vb4pex5vsknk084sn02q","key_id":"string","resource_id":"string"},"expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"400":{"description":"A limit, cursor or status that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/approval-requests/{request}/changes":{"post":{"operationId":"addApprovalRequestChange","summary":"Add a change to an approval request still waiting","description":"Adds a change, asked for as `POST …/approval-requests` asks for one, to one of the person's own requests still waiting for them, so they approve the whole plan once, at its `approve_url`. It becomes a bundle (`kind: bundle`) whose `changes` approving makes in order, all or none, with a new `hash`, so a page that showed it before is refused until it is read again; it waits 15 minutes again from now, with at most 20 changes. An invitation, an API key, a new brand and a change that makes a secret only the person should see (a web or machine app's, a new webhook's) each go on a page of their own, and can't be added or added to (409 `conflict`). Approving a bundle wants a sign-in from the last 5 minutes when any change it holds is about money, people or sign-in security. Its plan is checked as `POST …/approval-requests` checks it, with what a trial or plan change the request holds moves the org to counted, since approving makes that first. A change that doesn't always ask is made at once instead, as `POST …/approval-requests` makes it (201), and the request it names stays as it was, unless the org requires approval or the person asks to approve theirs, or only the plan a trial or plan change the request holds moves the org to takes it: that one joins the bundle, to be made after the move. People only, never an API key. Needs `org.read`, and the permission the change does. Recorded as `approval_request.change_added`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^apr_[0-9a-hjkmnp-tv-z]{26}$","description":"The approval request's id","example":"apr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The approval request's id","name":"request","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestCreate"},"example":{"kind":"app.redirect_uris","brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q","redirect_uris":["https://app.acme.example"]}}}},"responses":{"200":{"description":"The request, now a bundle that holds the change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"},"example":{"id":"apr_01h455vb4pex5vsknk084sn02q","kind":"app.redirect_uris","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"change":{"redirect_uris":["https://acme.example/callback"]},"title":"Make a token gate","preview":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback.","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"changes":[{"kind":"app.redirect_uris","operation":"string","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"title":"string","preview":"string","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","resource_id":"string"}}],"hash":"9f2c6a…","status":"awaiting_approval","reason":"string","last_refusal":{"code":"plan_feature_unavailable","detail":"string","at":"2026-10-21T12:00:00.000Z"},"asked_from":"string","asked_from_name":"Claude","approve_url":"https://app.acme.example","applied_at_once":false,"asks_because":"sign_in_security","fresh_sign_in":false,"relied_on_sign_in":{"signed_in_at":"2026-10-21T12:00:00.000Z","within_window":false},"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","invite_id":"inv_01h455vb4pex5vsknk084sn02q","key_id":"string","resource_id":"string"},"expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"201":{"description":"The change made at once, where approvals are off and it doesn’t always ask","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"},"example":{"id":"apr_01h455vb4pex5vsknk084sn02q","kind":"app.redirect_uris","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"change":{"redirect_uris":["https://acme.example/callback"]},"title":"Make a token gate","preview":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback.","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"changes":[{"kind":"app.redirect_uris","operation":"string","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"title":"string","preview":"string","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","resource_id":"string"}}],"hash":"9f2c6a…","status":"awaiting_approval","reason":"string","last_refusal":{"code":"plan_feature_unavailable","detail":"string","at":"2026-10-21T12:00:00.000Z"},"asked_from":"string","asked_from_name":"Claude","approve_url":"https://app.acme.example","applied_at_once":false,"asks_because":"sign_in_security","fresh_sign_in":false,"relied_on_sign_in":{"signed_in_at":"2026-10-21T12:00:00.000Z","within_window":false},"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","invite_id":"inv_01h455vb4pex5vsknk084sn02q","key_id":"string","resource_id":"string"},"expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key, another person’s request, a credential that lacks the permission the change needs, a change the org's plan can't take, even after a trial or plan change the request holds (`plan_feature_unavailable`, `plan_quota_exceeded`), or a change made at once that its route refuses","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A request decided, expired or changed meanwhile, one that holds as many changes as a bundle may, or a change that goes on a page of its own","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A change made at once that fails its route’s checks","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A change made at once that a service it needs couldn’t take just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/approval-requests/{request}":{"get":{"operationId":"getApprovalRequest","summary":"Read an approval request","description":"Its target, the change, its preview and whether it was approved, declined or expired, and what approving made. The MCP host reads it to see what the person decided. Needs `org.read`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^apr_[0-9a-hjkmnp-tv-z]{26}$","description":"The approval request's id","example":"apr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The approval request's id","name":"request","in":"path"}],"responses":{"200":{"description":"The request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"},"example":{"id":"apr_01h455vb4pex5vsknk084sn02q","kind":"app.redirect_uris","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"change":{"redirect_uris":["https://acme.example/callback"]},"title":"Make a token gate","preview":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback.","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"changes":[{"kind":"app.redirect_uris","operation":"string","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"title":"string","preview":"string","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","resource_id":"string"}}],"hash":"9f2c6a…","status":"awaiting_approval","reason":"string","last_refusal":{"code":"plan_feature_unavailable","detail":"string","at":"2026-10-21T12:00:00.000Z"},"asked_from":"string","asked_from_name":"Claude","approve_url":"https://app.acme.example","applied_at_once":false,"asks_because":"sign_in_security","fresh_sign_in":false,"relied_on_sign_in":{"signed_in_at":"2026-10-21T12:00:00.000Z","within_window":false},"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","invite_id":"inv_01h455vb4pex5vsknk084sn02q","key_id":"string","resource_id":"string"},"expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/approval-requests/{request}/approve":{"post":{"operationId":"approveApprovalRequest","summary":"Approve an approval request","description":"Makes the change as the person who asked, through the change's own route (recorded as that route records it, naming this request as `approval_id` and the MCP host's app as `act_client_id`), from the dashboard's app only, by that person only, within 15 minutes, once, and only with the `hash` the page showed (409 when the request isn't that one). A change to money, people or sign-in security (`fresh_sign_in`: billing and plans, members and invitations, roles, API keys, deleting or moving a brand, an app's addresses and how it proves itself, domains, a sign-in protection turned off) also wants a fresh sign-in: one from the last 5 minutes, or one an earlier approval relied on in the same dashboard session, until 2 hours after it (its approval window, `GET /v1/approval-window`), else 403 `fresh_sign_in_required` (sign in again with `max_age=300`). The request records the sign-in it relied on (`relied_on_sign_in`), and a sign-in from the last 5 minutes that it relied on opens that session's window. Each request is still approved on its own, with its own hash. The decision, database effect, result and audit commit together. A change its route refuses answers with that route's problem, and the request waits again. Email is queued durably with the decision and attempted after commit; temporary delivery failures retry for up to 24 hours without repeating the change. An unsent or permanently undeliverable invitation is revoked. Sending-domain registration resumes from pending_setup through background checks. Needs `org.read`; the change's own route needs its own permission. Recorded as `approval_request.approved`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^apr_[0-9a-hjkmnp-tv-z]{26}$","description":"The approval request's id","example":"apr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The approval request's id","name":"request","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestApproval"},"example":{"hash":"string"}}}},"responses":{"200":{"description":"The request, approved, and what it made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequestApproved"},"example":{"id":"apr_01h455vb4pex5vsknk084sn02q","kind":"app.redirect_uris","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"change":{"redirect_uris":["https://acme.example/callback"]},"title":"Make a token gate","preview":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback.","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"changes":[{"kind":"app.redirect_uris","operation":"string","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"title":"string","preview":"string","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","resource_id":"string"}}],"hash":"9f2c6a…","status":"awaiting_approval","reason":"string","last_refusal":{"code":"plan_feature_unavailable","detail":"string","at":"2026-10-21T12:00:00.000Z"},"asked_from":"string","asked_from_name":"Claude","approve_url":"https://app.acme.example","applied_at_once":false,"asks_because":"sign_in_security","fresh_sign_in":false,"relied_on_sign_in":{"signed_in_at":"2026-10-21T12:00:00.000Z","within_window":false},"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","invite_id":"inv_01h455vb4pex5vsknk084sn02q","key_id":"string","resource_id":"string"},"expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","secret":"string"}}}},"400":{"description":"The change is no longer valid for what it changes","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Another app than the dashboard, another person, a sign-in more than 5 minutes old with no approval window open in this session for a change that takes a fresh one, or a change its route refuses","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Decided already, expired, or not the request the page showed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"The change fails validation before approval commits","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Email isn't set up here: the request waits again. Delivery outages after commit are retried in the background","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/approval-requests/{request}/decline":{"post":{"operationId":"declineApprovalRequest","summary":"Decline an approval request","description":"Changes nothing. From the dashboard, by the person who asked. Needs `org.read`. Recorded as `approval_request.declined`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^apr_[0-9a-hjkmnp-tv-z]{26}$","description":"The approval request's id","example":"apr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The approval request's id","name":"request","in":"path"}],"responses":{"200":{"description":"The request, declined","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalRequest"},"example":{"id":"apr_01h455vb4pex5vsknk084sn02q","kind":"app.redirect_uris","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"change":{"redirect_uris":["https://acme.example/callback"]},"title":"Make a token gate","preview":"Set the redirect URIs of the web app “Acme web” in the brand “Acme” to 1 address. Adds https://acme.example/callback.","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"changes":[{"kind":"app.redirect_uris","operation":"string","target":{"brand_id":"brd_01h455vb4pex5vsknk084sn02q","app_id":"app_01h455vb4pex5vsknk084sn02q"},"title":"string","preview":"string","details":[{"field":"redirect_uris","label":"Redirect URIs","values":[{"text":"https://acme.example/callback","code":true,"tag":"new"}]}],"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","resource_id":"string"}}],"hash":"9f2c6a…","status":"awaiting_approval","reason":"string","last_refusal":{"code":"plan_feature_unavailable","detail":"string","at":"2026-10-21T12:00:00.000Z"},"asked_from":"string","asked_from_name":"Claude","approve_url":"https://app.acme.example","applied_at_once":false,"asks_because":"sign_in_security","fresh_sign_in":false,"relied_on_sign_in":{"signed_in_at":"2026-10-21T12:00:00.000Z","within_window":false},"result":{"app_id":"app_01h455vb4pex5vsknk084sn02q","invite_id":"inv_01h455vb4pex5vsknk084sn02q","key_id":"string","resource_id":"string"},"expires_at":"2026-10-21T12:00:00.000Z","decided_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Another app than the dashboard, or another person","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Decided already, or expired","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/agent-approvals":{"get":{"operationId":"getOrgAgentApprovals","summary":"Read how AI agents’ changes are approved in an org","description":"Whether the org requires approval for every change its members' AI agents ask for (`require_approval`, off by default), and how the calling person's are made there (`your_approvals`). Some changes always ask, and take a sign-in from the last 5 minutes to approve: money and people (billing and plans, inviting or removing members, roles, API keys, deleting or moving a brand) and sign-in security (an app’s redirect and sign-out addresses and how it proves itself, custom sign-in, sending and verified domains, turning a sign-in protection off, such as the breached-password check or PKCE, turning a token gate off, deleting it or taking a place off it, and loosening account linking). So does a change that makes a secret only you should see (a web or machine app’s client secret, a webhook’s signing secret), which shows once, on its approval page. Needs `org.read`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"200":{"description":"How the org’s AI agents’ changes are approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgentApprovals"},"example":{"require_approval":false,"your_approvals":"apply_at_once"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateOrgAgentApprovals","summary":"Require approval for every AI agent change in an org, or not","description":"Sets whether every change the org's members' AI agents ask for waits for the member to approve it in the dashboard. Off, the default, an ordinary change applies when it is asked, recorded as made by the agent for the member, unless the member asks to approve theirs. Some changes always ask, and take a sign-in from the last 5 minutes to approve: money and people (billing and plans, inviting or removing members, roles, API keys, deleting or moving a brand) and sign-in security (an app’s redirect and sign-out addresses and how it proves itself, custom sign-in, sending and verified domains, turning a sign-in protection off, such as the breached-password check or PKCE, turning a token gate off, deleting it or taking a place off it, and loosening account linking). So does a change that makes a secret only you should see (a web or machine app’s client secret, a webhook’s signing secret), which shows once, on its approval page. From the dashboard's app only, by a person: never an agent's to change. Turning it on asks every member at once; turning it off wants a sign-in from the last 5 minutes (403 `fresh_sign_in_required`: sign in again with `max_age=300`). Needs `org.sso.edit`. Recorded as `org.agent_approvals_updated`.","security":[{"bearer":[]}],"x-permission":"org.sso.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgentApprovalsUpdate"},"example":{"require_approval":true}}}},"responses":{"200":{"description":"How the org’s AI agents’ changes are approved now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAgentApprovals"},"example":{"require_approval":false,"your_approvals":"apply_at_once"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key, another app than the dashboard, a sign-in more than 5 minutes old to stop requiring approval, or a credential without org.sso.edit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/agent-approvals":{"get":{"operationId":"getAgentApprovals","x-permission":"none","summary":"Read whether you approve what your AI agents change","description":"The calling person's own setting, \"Ask me to approve what my agents change\" (`ask_to_approve`, off unless they turned it on). Each org's own `GET …/agent-approvals` says how their agents' changes are made there. A person's credential only.","security":[{"bearer":[]}],"responses":{"200":{"description":"Their setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentApprovals"},"example":{"ask_to_approve":false}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person has AI agents that ask them","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateAgentApprovals","x-permission":"none","summary":"Turn approving what your AI agents change on or off","description":"Sets the calling person's own \"Ask me to approve what my agents change\". On, each change their AI agents ask for waits for them to approve it in the dashboard, in every org of theirs. Off, the default, an ordinary change applies when it is asked, recorded in its org's audit log as made by that agent for them, except in an org that requires approval for every change. Some changes always ask, and take a sign-in from the last 5 minutes to approve: money and people (billing and plans, inviting or removing members, roles, API keys, deleting or moving a brand) and sign-in security (an app’s redirect and sign-out addresses and how it proves itself, custom sign-in, sending and verified domains, turning a sign-in protection off, such as the breached-password check or PKCE, turning a token gate off, deleting it or taking a place off it, and loosening account linking). So does a change that makes a secret only you should see (a web or machine app’s client secret, a webhook’s signing secret), which shows once, on its approval page. From the dashboard's app only: never an agent's to change. Turning it off wants a sign-in from the last 5 minutes (403 `fresh_sign_in_required`). Recorded as `member.agent_approvals_updated` in each org of theirs that doesn't require approval, where it changes anything.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentApprovalsUpdate"},"example":{"ask_to_approve":true}}}},"responses":{"200":{"description":"Their setting now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentApprovals"},"example":{"ask_to_approve":false}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key, another app than the dashboard, or a sign-in more than 5 minutes old to stop being asked","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/approval-window":{"get":{"operationId":"getApprovalWindow","x-permission":"none","summary":"Read whether you approve without signing in again","description":"The calling person's approval window, in the dashboard session the token comes from: once an approval relies on a fresh sign-in (a change to money, people or sign-in security takes one, as an approval request's `fresh_sign_in` says), their approvals in that same session skip signing in again until 2 hours after that sign-in (`window_seconds`), like GitHub's sudo mode. Each change still has its own approval page and its own Approve. It closes early when they sign out, the session ends, or they sign in again, and another device or session has its own. What wants a fresh sign-in outside an approval, such as making an API key on its own page, still wants one from the last 5 minutes. Only the dashboard approves, so another app's token never has one open. A person's credential only.","security":[{"bearer":[]}],"responses":{"200":{"description":"Their approval window in this session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalWindow"},"example":{"open":true,"signed_in_at":"2026-11-13T09:12:00.000Z","ends_at":"2026-11-13T11:12:00.000Z","window_seconds":7200}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person approves","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/connected-apps":{"get":{"operationId":"listConnectedApps","x-permission":"none","summary":"The apps connected to your Synq account","description":"The calling person's connected apps, oldest first, a page at a time (50 by default): Claude, ChatGPT and the other MCP hosts, and any other app that isn't Synq's own, that they signed in at Synq to act for them. Each says what it may do, in plain words, when they connected it, when it last got tokens, and how its changes are made in each of their orgs. A host stays connected for up to 30 days, as long as it's used at least every 14. A person's credential only.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of their connected apps","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAppPage"},"example":{"data":[{"id":"cns_01h455vb4pex5vsknk084sn02q","client_id":"https://claude.ai/oauth/mcp-oauth-client-metadata","name":"Claude","source":"metadata_document","published_on":"claude.ai","scopes":[{"name":"synq.read","description":"See your orgs as your role lets you: brands, apps, users, sign-in settings, token gates, communities, webhooks, billing and the audit log"}],"may_change":true,"approvals":[{"org_id":"org_01h455vb4pex5vsknk084sn02q","approvals":"apply_at_once"}],"connected_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","current":false}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person has apps connected to their account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/connected-apps/{connection}":{"delete":{"operationId":"disconnectApp","x-permission":"none","summary":"Disconnect an app from your Synq account","description":"Withdraws what the calling person allowed the app: its grants for them end with every refresh token they gave, so its next refresh is refused and it asks them to sign in and allow it again. Access tokens it already holds work until they expire, 10 minutes at most for Synq's MCP server. What it already changed stays changed. A person's credential only. Recorded as `user.consent_revoked` (`metadata.by`: `connected_apps`).","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","pattern":"^cns_[0-9a-hjkmnp-tv-z]{26}$","description":"The connection's id, from the list","example":"cns_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The connection's id, from the list","name":"connection","in":"path"}],"responses":{"204":{"description":"Disconnected"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person has apps connected to their account","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such connection of theirs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apis":{"get":{"operationId":"listApis","summary":"List a brand's APIs","description":"Oldest first. Needs `org.apis.view`.","security":[{"bearer":[]}],"x-permission":"org.apis.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of APIs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPage"},"example":{"data":[{"id":"api_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","identifier":"https://api.acme.example","name":"Acme","scopes":[{"name":"reports.read","description":"Read your reports"}],"access_token_ttl":0,"allow_third_party":true,"allow_user_api_keys":true,"client_id":"app_01h455vb4pex5vsknk084sn02q","identity_claims":["email_verified","linked_accounts"],"created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createApi","summary":"Register an API","description":"An API with its own audience: tokens asked for with `resource=<identifier>` name it alone. The OpenID scopes can't be defined. Needs `org.apis.edit`. Recorded as `api.created`.","security":[{"bearer":[]}],"x-permission":"org.apis.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCreate"},"example":{"identifier":"string","name":"Acme","scopes":[],"access_token_ttl":300,"allow_third_party":true,"identity_claims":["email"]}}}},"responses":{"201":{"description":"The new API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Api"},"example":{"id":"api_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","identifier":"https://api.acme.example","name":"Acme","scopes":[{"name":"reports.read","description":"Read your reports"}],"access_token_ttl":0,"allow_third_party":true,"allow_user_api_keys":true,"client_id":"app_01h455vb4pex5vsknk084sn02q","identity_claims":["email_verified","linked_accounts"],"created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A definition that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An identifier the brand already has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apis/{api}":{"get":{"operationId":"getApi","summary":"Read an API","description":"Needs `org.apis.view`.","security":[{"bearer":[]}],"x-permission":"org.apis.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^api_[0-9a-hjkmnp-tv-z]{26}$","description":"The API's id","example":"api_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API's id","name":"api","in":"path"}],"responses":{"200":{"description":"The API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Api"},"example":{"id":"api_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","identifier":"https://api.acme.example","name":"Acme","scopes":[{"name":"reports.read","description":"Read your reports"}],"access_token_ttl":0,"allow_third_party":true,"allow_user_api_keys":true,"client_id":"app_01h455vb4pex5vsknk084sn02q","identity_claims":["email_verified","linked_accounts"],"created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateApi","summary":"Change an API","description":"Its name, scopes, token lifetime, whether third-party apps may ask for it, and its own client; never its identifier. Needs `org.apis.edit`. Recorded as `api.updated`.","security":[{"bearer":[]}],"x-permission":"org.apis.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^api_[0-9a-hjkmnp-tv-z]{26}$","description":"The API's id","example":"api_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API's id","name":"api","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiUpdate"},"example":{"name":"Acme","scopes":[{"name":"reports.read","description":"Read your reports"}],"access_token_ttl":300,"allow_third_party":true,"allow_user_api_keys":true,"client_id":"app_01h455vb4pex5vsknk084sn02q","identity_claims":["email"]}}}},"responses":{"200":{"description":"The API, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Api"},"example":{"id":"api_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","identifier":"https://api.acme.example","name":"Acme","scopes":[{"name":"reports.read","description":"Read your reports"}],"access_token_ttl":0,"allow_third_party":true,"allow_user_api_keys":true,"client_id":"app_01h455vb4pex5vsknk084sn02q","identity_claims":["email_verified","linked_accounts"],"created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A definition that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteApi","summary":"Delete an API","description":"From then on, a request for it fails with `invalid_target`; tokens already issued for it live out their few minutes. Needs `org.apis.edit`. Recorded as `api.deleted`.","security":[{"bearer":[]}],"x-permission":"org.apis.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^api_[0-9a-hjkmnp-tv-z]{26}$","description":"The API's id","example":"api_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API's id","name":"api","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/apis":{"get":{"operationId":"listAppApiAccess","summary":"Which of the brand's APIs an app is limited to","description":"The scopes of each API the app may ask for, a page at a time (50 by default), in the order the APIs were registered. An app people sign in to may ask for any scope of an API not listed; a machine app, only for those listed. Needs `org.apps.view`.","security":[{"bearer":[]}],"x-permission":"org.apps.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of the app's access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAccessPage"},"example":{"data":[{"api_id":"api_01h455vb4pex5vsknk084sn02q","identifier":"string","scopes":["string"]}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/apps/{app}/apis/{api}":{"put":{"operationId":"setAppApiAccess","summary":"Set which of an API's scopes an app may ask for","description":"An app people sign in to is limited to these; a machine app gets tokens for this API with exactly these, and for no API it isn't given. Needs `org.apps.edit`. Recorded as `app.api_access_changed`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"},{"schema":{"type":"string","pattern":"^api_[0-9a-hjkmnp-tv-z]{26}$","description":"The API's id","example":"api_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API's id","name":"api","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppApiAccessUpdate"},"example":{"scopes":["string"]}}}},"responses":{"204":{"description":"Set"},"400":{"description":"A scope the API does not have","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteAppApiAccess","summary":"Lift an app's limit on an API","description":"An app people sign in to may then ask for any of its scopes; a machine app, for none. Needs `org.apps.edit`. Recorded as `app.api_access_changed`.","security":[{"bearer":[]}],"x-permission":"org.apps.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","example":"app_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The app's client_id: an `app_…` id, or the URL of the metadata document an app registered itself with","name":"app","in":"path"},{"schema":{"type":"string","pattern":"^api_[0-9a-hjkmnp-tv-z]{26}$","description":"The API's id","example":"api_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API's id","name":"api","in":"path"}],"responses":{"204":{"description":"Lifted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/api-keys":{"get":{"operationId":"listApiKeys","summary":"List an org's API keys","description":"Newest first, revoked ones too; never a key itself. Needs `org.apiKeys.view`.","security":[{"bearer":[]}],"x-permission":"org.apiKeys.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyPage"},"example":{"data":[{"id":"key_01h455vb4pex5vsknk084sn02q","name":"Acme","prefix":"sk_live_Ab3d","permissions":["string"],"brand_roles":[{"brand":"string","role":"string","permissions":["string"]}],"ip_allowlist":["string"],"expires_at":"2026-10-21T12:00:00.000Z","revoked_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_by":"string","created_at":"2026-10-21T12:00:00.000Z","replaced_by":"key_01h455vb4pex5vsknk084sn02q","replaces":"key_01h455vb4pex5vsknk084sn02q"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createApiKey","summary":"Make an API key","description":"`sk_live_…` in production, `sk_test_…` elsewhere, in this response only. Its permissions are at most the caller's own in the org, and in each brand it names in `brand_roles`. A key for All brands, `brand_roles` left out, is the owner's to make: refused for anyone else with `all_brands_owner_only`. Needs `org.apiKeys.edit` across the org, or in each brand it names. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. Recorded as `api_key.created`.","security":[{"bearer":[]}],"x-permission":"org.apiKeys.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"},"example":{"name":"Deploys","permissions":["org.read"],"expires_at":"2026-10-21T12:00:00.000Z","ip_allowlist":["string"],"brand_roles":[{"brand":"string","role":"brand_admin","permissions":["org.read"]}]}}}},"responses":{"201":{"description":"The new key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewApiKey"},"example":{"id":"key_01h455vb4pex5vsknk084sn02q","name":"Acme","prefix":"sk_live_Ab3d","permissions":["string"],"brand_roles":[{"brand":"string","role":"string","permissions":["string"]}],"ip_allowlist":["string"],"expires_at":"2026-10-21T12:00:00.000Z","revoked_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_by":"string","created_at":"2026-10-21T12:00:00.000Z","replaced_by":"key_01h455vb4pex5vsknk084sn02q","replaces":"key_01h455vb4pex5vsknk084sn02q","key":"string"}}}},"400":{"description":"A body that is not valid, or an expiry in the past","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.apiKeys.edit, or a permission it asks to give, or a person signed in more than 5 minutes ago; or, `all_brands_owner_only`, it asks for a key for All brands and isn’t the owner","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/api-keys/{key}":{"get":{"operationId":"getApiKey","summary":"Read an API key","description":"Never the key itself. Needs `org.apiKeys.view`.","security":[{"bearer":[]}],"x-permission":"org.apiKeys.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","description":"The API key's id, never the key itself","example":"key_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API key's id, never the key itself","name":"key","in":"path"}],"responses":{"200":{"description":"The key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"},"example":{"id":"key_01h455vb4pex5vsknk084sn02q","name":"Acme","prefix":"sk_live_Ab3d","permissions":["string"],"brand_roles":[{"brand":"string","role":"string","permissions":["string"]}],"ip_allowlist":["string"],"expires_at":"2026-10-21T12:00:00.000Z","revoked_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_by":"string","created_at":"2026-10-21T12:00:00.000Z","replaced_by":"key_01h455vb4pex5vsknk084sn02q","replaces":"key_01h455vb4pex5vsknk084sn02q"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"revokeApiKey","summary":"Revoke an API key","description":"At once: it gets 401 `api_key_revoked` from then on. Needs `org.apiKeys.edit`. Recorded as `api_key.revoked`.","security":[{"bearer":[]}],"x-permission":"org.apiKeys.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","description":"The API key's id, never the key itself","example":"key_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API key's id, never the key itself","name":"key","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/api-keys/{key}/rotate":{"post":{"operationId":"rotateApiKey","summary":"Rotate an API key","description":"A new key with the key's name, permissions, brand roles and IP allowlist, `sk_live_…` in production, `sk_test_…` elsewhere, in this response only. The key rotated keeps working for `overlap_seconds` beside it, as a rotated app secret does, so whatever uses it can switch first: its `expires_at` becomes the end of the overlap (never later than it was) and its `replaced_by` names the new key; after that it answers 401 `api_key_rotated`. When the key had an expiry, the new one's is as far from now as the key's was from its making. A key is rotated once: a revoked, expired or rotated one answers 409 `conflict`, and the next rotation is its replacement's, which ends an earlier key still in its overlap with the new overlap at the latest. Needs `org.apiKeys.edit` across the org, or in each brand the key works in, and everything the key holds, as making it does: a key for All brands is the owner's to rotate (`all_brands_owner_only`). A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. Recorded as `api_key.rotated`, and the old key's end as `api_key.expired` when it comes.","security":[{"bearer":[]}],"x-permission":"org.apiKeys.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","description":"The API key's id, never the key itself","example":"key_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The API key's id, never the key itself","name":"key","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRotation"},"example":{"overlap_seconds":86400}}}},"responses":{"201":{"description":"The new key, which replaces it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewApiKey"},"example":{"id":"key_01h455vb4pex5vsknk084sn02q","name":"Acme","prefix":"sk_live_Ab3d","permissions":["string"],"brand_roles":[{"brand":"string","role":"string","permissions":["string"]}],"ip_allowlist":["string"],"expires_at":"2026-10-21T12:00:00.000Z","revoked_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_by":"string","created_at":"2026-10-21T12:00:00.000Z","replaced_by":"key_01h455vb4pex5vsknk084sn02q","replaces":"key_01h455vb4pex5vsknk084sn02q","key":"string"}}}},"400":{"description":"An overlap that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.apiKeys.edit, or a permission the key holds, or a person signed in more than 5 minutes ago; or, `all_brands_owner_only`, the key is for All brands and the caller isn’t the owner","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A key that was revoked, has expired, or was rotated already: the `detail` says which, and what to do","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users":{"get":{"operationId":"listUsers","summary":"List or search a brand's users","description":"Newest first. Needs `org.users.view`.","security":[{"bearer":[]}],"x-permission":"org.users.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Part of an email, username or name, words of a name, or the start of a wallet address"},"required":false,"description":"Part of an email, username or name, words of a name, or the start of a wallet address","name":"q","in":"query"}],"responses":{"200":{"description":"A page of users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPage"},"example":{"data":[{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"400":{"description":"A query, limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createUser","summary":"Make a user","description":"A user with an email, who signs in with it by any email method. Needs `org.users.edit`. Recorded as `user.created`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"},"example":{"email":"ana@example.com","email_verified":false,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"https://example.com","locale":"string","metadata":{}}}}},"responses":{"201":{"description":"The new user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"},"example":{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","metadata":{},"identities":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"label":"string","primary":true,"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"sessions":[{"id":"string","signed_in_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","apps":["string"],"signed_in_apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme web","kind":"app"}],"via":"hosted"}]}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An email or username another user of the brand has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}":{"get":{"operationId":"getUser","summary":"Read a user","description":"With their identities (passkeys are at `…/passkeys`), wallets, live sessions and metadata. Needs `org.users.view`.","security":[{"bearer":[]}],"x-permission":"org.users.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"responses":{"200":{"description":"The user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"},"example":{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","metadata":{},"identities":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"label":"string","primary":true,"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"sessions":[{"id":"string","signed_in_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","apps":["string"],"signed_in_apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme web","kind":"app"}],"via":"hosted"}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateUser","summary":"Change a user","description":"Their profile, or the tenant's metadata (the whole object); null clears a field. Whether they are disabled changes through `POST …/disable` and `…/enable`. Needs `org.users.edit`. Recorded as `user.updated`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"},"example":{"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"https://example.com","locale":"string","metadata":{}}}}},"responses":{"200":{"description":"The user, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"},"example":{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","metadata":{},"identities":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"label":"string","primary":true,"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"sessions":[{"id":"string","signed_in_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","apps":["string"],"signed_in_apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme web","kind":"app"}],"via":"hosted"}]}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A username another user of the brand has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/enable":{"post":{"operationId":"enableUser","summary":"Enable a user","description":"Lets a disabled user sign in again. Needs `org.users.edit`. Recorded as `user.updated`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The user, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"},"example":{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","metadata":{},"identities":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"label":"string","primary":true,"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"sessions":[{"id":"string","signed_in_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","apps":["string"],"signed_in_apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme web","kind":"app"}],"via":"hosted"}]}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A username another user of the brand has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/disable":{"post":{"operationId":"disableUser","summary":"Disable a user","description":"Signs the user out at once, ending every session and grant, offline and device ones included, and they sign in no more until enabled. Each app the sessions had signed in to that registered a `backchannel_logout_uri` gets a logout token. Needs `org.users.edit`. Recorded as `user.updated`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The user, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"},"example":{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","metadata":{},"identities":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"label":"string","primary":true,"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"sessions":[{"id":"string","signed_in_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","apps":["string"],"signed_in_apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme web","kind":"app"}],"via":"hosted"}]}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A username another user of the brand has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/revoke-sessions":{"post":{"operationId":"revokeUserSessions","summary":"End a user's sessions","description":"Every session and every grant, offline and device ones included: their refresh tokens stop working, a sign-in already in flight is refused, and they sign in again. Each app the sessions had signed in to that registered a `backchannel_logout_uri` gets a logout token. JWT access tokens for the brand's APIs work until they expire (5 to 15 minutes). Needs `org.users.edit`. Recorded as `user.sessions_revoked`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"responses":{"200":{"description":"How many sessions ended","content":{"application/json":{"schema":{"type":"object","properties":{"sessions_ended":{"type":"integer","description":"How many sessions ended"}},"required":["sessions_ended"]},"example":{"sessions_ended":0}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/passkeys":{"get":{"operationId":"listUserPasskeys","summary":"List a user's passkeys","description":"Oldest first, a page at a time (50 by default): whether each is synced and backed up, how the browser reached it, and when it was made and last used. Never its public key or credential id. Needs `org.users.view`.","security":[{"bearer":[]}],"x-permission":"org.users.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of their passkeys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPasskeyPage"},"example":{"data":[{"id":"pky_01h455vb4pex5vsknk084sn02q","synced":true,"backed_up":true,"transports":["internal","hybrid"],"created_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/passkeys/{passkey}":{"delete":{"operationId":"deleteUserPasskey","summary":"Remove a user's passkey","description":"It stops signing them in at once, even when it was their last way to sign in: a stolen device's passkey has to be removable, and the tenant decides what comes next (another way in, or disabling the user). Sessions it signed in keep going: end them with `revoke-sessions`. Needs `org.users.edit`. Recorded as `user.passkey_removed`, `by: management_api`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"string","pattern":"^pky_[0-9a-hjkmnp-tv-z]{26}$","description":"The passkey's id","example":"pky_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The passkey's id","name":"passkey","in":"path"}],"responses":{"204":{"description":"Removed"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/deletion":{"post":{"operationId":"scheduleUserDeletion","summary":"Schedule a user's deletion","description":"The account is deleted 30 days later; it is signed out at once, every session and grant ended, offline and device ones included, and can’t sign in meanwhile. Each app the sessions had signed in to that registered a `backchannel_logout_uri` gets a logout token. Needs `org.users.edit`. Recorded as `user.deletion_scheduled`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"responses":{"200":{"description":"The user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"},"example":{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","metadata":{},"identities":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"label":"string","primary":true,"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"sessions":[{"id":"string","signed_in_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","apps":["string"],"signed_in_apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme web","kind":"app"}],"via":"hosted"}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The account has no way to sign in, so deletion cannot be canceled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"cancelUserDeletion","summary":"Cancel a user's deletion","description":"Needs `org.users.edit`. Refuses with 409 conflict if the account has no sign-in identity after its only method moved. Recorded as `user.deletion_cancelled`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"responses":{"200":{"description":"The user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetail"},"example":{"id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","email_verified":true,"username":"string","name":"Acme","given_name":"string","family_name":"string","picture":"string","picture_source":"linked:google","avatar_seed":"mJ3kT0a9yZVqC1x8fR4wLb","default_picture":"string","locale":"string","wallets":["string"],"sign_in_methods":["email","passkey","google"],"disabled":true,"deletion_scheduled_for":"2026-10-21T12:00:00.000Z","last_sign_in_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","metadata":{},"identities":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"label":"string","primary":true,"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"sessions":[{"id":"string","signed_in_at":"2026-10-21T12:00:00.000Z","expires_at":"2026-10-21T12:00:00.000Z","apps":["string"],"signed_in_apps":[{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme web","kind":"app"}],"via":"hosted"}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The account has no way to sign in, so deletion cannot be canceled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/consents":{"get":{"operationId":"listUserConsents","summary":"What a user allowed apps","description":"What they allowed each app that isn't the brand's own, oldest first, a page at a time (50 by default), each scope also in the consent page's words: signing in to it again doesn't ask them again for that. Needs `org.users.view`.","security":[{"bearer":[]}],"x-permission":"org.users.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of their consents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentPage"},"example":{"data":[{"id":"cns_01h455vb4pex5vsknk084sn02q","app":{"client_id":"app_01h455vb4pex5vsknk084sn02q","name":"Acme"},"scopes":["openid","email"],"claims":[],"apis":[{"identifier":"string","scopes":["string"]}],"scope_descriptions":[{"name":"openid","description":"Know who you are"},{"name":"orders.read","description":"See your orders"}],"allowed_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/consents/{consent}":{"delete":{"operationId":"revokeUserConsent","summary":"Withdraw what a user allowed an app","description":"The app's grants and tokens for them end, its refresh tokens included, and each session it was signed in to that registered a `backchannel_logout_uri` gets a logout token; their next sign-in to it asks them again. Needs `org.users.edit`. Recorded as `user.consent_revoked`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"string","pattern":"^cns_[0-9a-hjkmnp-tv-z]{26}$","description":"The consent's id","example":"cns_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The consent's id","name":"consent","in":"path"}],"responses":{"204":{"description":"Withdrawn"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/api-keys":{"get":{"operationId":"listUserApiKeys","summary":"A user's API keys","description":"The keys they made for the brand's APIs, oldest first, revoked and expired ones too, a page at a time (50 by default); never a key itself. Needs `org.users.view`.","security":[{"bearer":[]}],"x-permission":"org.users.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of their API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserApiKeyPage"},"example":{"data":[{"id":"uak_01h455vb4pex5vsknk084sn02q","name":"Reports script","prefix":"ak_live_Ab3d","api":{"identifier":"https://api.acme.example","name":"Acme"},"scopes":["reports:read"],"expires_at":"2026-10-21T12:00:00.000Z","revoked_at":"2026-10-21T12:00:00.000Z","last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/api-keys/{key}":{"delete":{"operationId":"revokeUserApiKey","summary":"Revoke a user's API key","description":"At once: its API's next check of it answers `active: false`. Needs `org.users.edit`. Recorded as `user.api_key_revoked`.","security":[{"bearer":[]}],"x-permission":"org.users.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"string","pattern":"^uak_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's API key's id, never the key itself","example":"uak_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's API key's id, never the key itself","name":"key","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/identities":{"get":{"operationId":"listUserIdentities","summary":"List a user's linked accounts","description":"Every way the user signs in or has linked, oldest first, a page at a time (50 by default): each provider account with what the provider said of it, the extra scopes granted, the claims the brand keeps (`kept_claims`) and whether Synq keeps their tokens there (`provider_tokens`, without the tokens), and their wallets and email address. Passkeys are at `…/passkeys`. Needs `org.users.view`.","security":[{"bearer":[]}],"x-permission":"org.users.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of their linked accounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkedIdentityPage"},"example":{"data":[{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","added_by":"person","claims":{"locale":"en-US"},"provider_tokens":{"scope":"tweet.read users.read offline.access","expires_at":"2026-10-21T12:00:00.000Z","refreshable":true,"kept_at":"2026-10-21T12:00:00.000Z"},"linked_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"addUserIdentity","summary":"Add an account your app verifies to a user","description":"For a person your server already knows: links their account at one of the brand's “your app verifies it” providers, confirmed at once, with no code. Their account page shows it as added by your brand, and they can remove it. One person has at most 20 ways to sign in and linked accounts (409 `identity_limit_reached`); an account someone has linked already is 409 `identity_in_use`. Needs `org.users.identities.edit`. Recorded as `user.identity_linked` with `by: server`.","security":[{"bearer":[]}],"x-permission":"org.users.identities.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewServerIdentity"},"example":{"provider":"custom-acme-telegram","subject":"987654321","handle":"ada","name":"Ada Lovelace","picture":"string"}}}},"responses":{"201":{"description":"The account, linked","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The identity's id","example":"idn_01h455vb4pex5vsknk084sn02q"},"provider":{"type":"string","description":"Where it is from: a provider, `email`, `solana`…"},"subject":{"type":"string","description":"Who they are there: the provider's id for them, an address or a wallet"},"handle":{"type":["string","null"],"description":"Their handle at the provider, without the @, as of their last sign-in with it: GitHub’s, X’s, Discord’s, Telegram’s and Matrica’s username. For showing people only: it changes, and never identifies anyone"},"details":{"type":["object","null"],"properties":{"account_type":{"type":"string","description":"GitHub’s word for the account: `User`, `Organization` or `Bot`","example":"User"},"created_at":{"type":"string","format":"date-time","description":"When the GitHub account was made","example":"2011-01-25T18:44:36.000Z"},"public_repos":{"type":"integer","minimum":0,"description":"How many public repositories the GitHub account owns"},"followers":{"type":"integer","minimum":0,"description":"How many people follow the GitHub account"},"email_verified":{"type":"boolean","description":"Google’s own word that it checked the account’s address (at least once, when the account was made)"},"workspace_domain":{"type":["string","null"],"description":"The Google Workspace domain the account belongs to (Google’s `hd`), or null for a personal Google account","example":"acme.example"},"telegram_user_id":{"type":"string","description":"Telegram’s user id for the account (its `id` claim), kept where the brand asks Telegram for `telegram:bot_access`: the `chat_id` your own bot sends the person messages at. Not the identity’s `subject`","example":"987654321"},"phone_number":{"type":"string","description":"The phone number on the person’s Telegram account, kept where the brand asks Telegram for `phone` and the person shared it","example":"+15555550123"},"phone_number_verified":{"type":"boolean","description":"Whether the phone number is verified: Telegram’s own `phone_number_verified` where it sends one, else true, since Telegram documents its `phone` scope as the person’s verified phone number. Synq checks nothing itself"},"name":{"type":"string","description":"For an account at a provider your app verifies: the name your server gave for the person there","example":"Ada Lovelace"},"test":{"type":"boolean","enum":[true],"description":"A made-up account from a test sign-in (`test_sign_ins`): never a real account at the provider, and never in production"}},"description":"What the provider said of the account at their last sign-in with it, beyond who they are: GitHub’s account type, age, public repositories and followers, Google’s `email_verified` and Workspace domain, and, where the brand asks Telegram for more, Telegram’s user id and phone number, and the name your server gave for an account at a provider your app verifies, each only where the provider sent it. Null for every other provider"},"details_read_at":{"type":["string","null"],"format":"date-time","description":"When `details` was read from the provider: their last sign-in with it"},"scopes":{"type":"array","items":{"type":"string"},"description":"The extra scopes the brand asked the provider for that it says the person granted, at their last sign-in with it; empty when none","example":["phone"]},"unconfirmed_scopes":{"type":"array","items":{"type":"string"},"description":"The extra scopes asked for at their last sign-in that the provider never confirms either way, such as Telegram’s `telegram:bot_access`; empty when none","example":["telegram:bot_access"]},"last_used_at":{"type":["string","null"],"format":"date-time","description":"When they last signed in with it, or null for never"},"created_at":{"type":"string","format":"date-time","description":"When it was added"},"added_by":{"type":"string","x-extensible-enum":["person","server"],"description":"Who added it: `person`, the person themselves, signing up or linking it (a link code they confirmed in your app included), or `server`, your server, for a person it already knew (`POST …/users/{user}/identities`), which the person’s account page shows as added by your brand"},"claims":{"type":"object","additionalProperties":{},"description":"The claims the brand keeps from the provider (`kept_claims`), as it said them at the person’s last sign-in or link with it; empty when none","example":{"locale":"en-US"}},"provider_tokens":{"type":["object","null"],"properties":{"scope":{"type":["string","null"],"description":"What the access token grants, as the provider said; null where it didn’t","example":"tweet.read users.read offline.access"},"expires_at":{"type":["string","null"],"format":"date-time","description":"When the access token kept now expires, or null where the provider didn’t say. Synq refreshes it when read, where it can"},"refreshable":{"type":"boolean","description":"Whether Synq holds a refresh token for it, and so can get a fresh access token when this one expires. The refresh token itself never leaves Synq"},"kept_at":{"type":"string","format":"date-time","description":"When they were kept at a sign-in or link, or last refreshed"}},"required":["scope","expires_at","refreshable","kept_at"],"description":"The person’s tokens Synq keeps at the provider for your server (`keep_tokens`), without the tokens: read the access token with `POST …/identities/{identity}/access-token`. Null where none are kept"},"linked_at":{"type":"string","format":"date-time","description":"When it joined the account"}},"required":["id","provider","subject","handle","details","details_read_at","scopes","unconfirmed_scopes","last_used_at","created_at","added_by","claims","provider_tokens","linked_at"]},"example":{"id":"idn_01h455vb4pex5vsknk084sn02q","provider":"string","subject":"string","handle":"string","details":{"account_type":"User","created_at":"2011-01-25T18:44:36.000Z","public_repos":0,"followers":0,"email_verified":true,"workspace_domain":"acme.example","telegram_user_id":"987654321","phone_number":"+15555550123","phone_number_verified":true,"name":"Ada Lovelace","test":true},"details_read_at":"2026-10-21T12:00:00.000Z","scopes":["phone"],"unconfirmed_scopes":["telegram:bot_access"],"last_used_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z","added_by":"person","claims":{"locale":"en-US"},"provider_tokens":{"scope":"tweet.read users.read offline.access","expires_at":"2026-10-21T12:00:00.000Z","refreshable":true,"kept_at":"2026-10-21T12:00:00.000Z"},"linked_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such user, or no such provider your app verifies","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Someone has this account linked already (`identity_in_use`), the person has as many as one may (`identity_limit_reached`), or the provider is off (`sign_in_method_unavailable`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many for the org: `rate_limited`, with Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/users/{user}/identities/{identity}/access-token":{"post":{"operationId":"readProviderAccessToken","summary":"Read a user's access token at a provider","description":"The person's access token at the provider of one of their linked accounts, for your server to call that provider's API as them, where the brand keeps tokens there (`keep_tokens`, through its own app). Synq refreshes it first when it expires within a minute and a refresh token is kept; the refresh token is never returned. Only an org API key, from a server: a person's access token, the dashboard's included, or a request with an `Origin` or `Sec-Fetch-Site` header (a browser's) is 403 `server_only`. Each read is recorded as `user.provider_token_read`; a refresh the provider refuses deletes the tokens, records `user.identity_token_revoked` and answers 409 `provider_token_revoked`. Limited per org. Needs `org.users.providerTokens.read`.","security":[{"bearer":[]}],"x-permission":"org.users.providerTokens.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The user's id","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The user's id","name":"user","in":"path"},{"schema":{"type":"string","pattern":"^idn_[0-9a-hjkmnp-tv-z]{26}$","description":"The identity's id","example":"idn_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The identity's id","name":"identity","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The access token, fresh","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderAccessToken"},"example":{"access_token":"string","scope":"string","expires_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.users.providerTokens.read, or isn’t an org API key on a server: `server_only`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"No token is kept for it (`provider_token_unavailable`), or the provider refused to refresh it and Synq deleted it (`provider_token_revoked`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many reads for the org: `rate_limited`, with Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The provider couldn’t be asked for a fresh access token: `provider_unreachable`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Sign-in providers aren’t set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/app-verified-providers":{"get":{"operationId":"listAppVerifiedProviders","summary":"List the providers your app verifies","description":"The brand's “your app verifies it” providers, in the order they were added, a page at a time (50 by default): each one's name, icon, whether it makes sign-in links and whether it is on. Its other own providers are at `…/custom-sign-in-providers`, Synq's at `…/sign-in-providers`. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProviderPage"},"example":{"data":[{"id":"custom-acme-telegram","name":"Acme","icon":"string","sign_in_tickets":true,"enabled":true,"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createAppVerifiedProvider","summary":"Add a provider your app verifies","description":"A provider whose people your own service proves, such as your Telegram bot or your game's server: a name and an icon, with no address or app at Synq, since your server says who someone is there. People link an account at it from your app with a link code (`POST /me/v1/link-codes`), which your server redeems (`POST …/link-codes/redeem`) and they confirm in the app; your server can add one for someone it knows (`POST …/users/{user}/identities`); and where `sign_in_tickets` is on, it makes sign-in links for them (`POST …/sign-in-tickets`). It is never a way to sign in on the brand's pages, and never counts as one. It is off until `POST …/enable`. At most 20 of the brand's own providers of every kind (409 `conflict`); an id the brand has is 409 `sign_in_provider_exists`. Needs `org.connections.edit`, and a person's sign-in from the last 5 minutes for `sign_in_tickets` (403 `fresh_sign_in_required`). Recorded as `brand.updated` with `provider` and each setting under `custom_sign_in_provider.`.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProviderCreate"},"example":{"id":"custom-acme-telegram","name":"Telegram","icon":"string","sign_in_tickets":true}}}},"responses":{"201":{"description":"The provider, added and off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProvider"},"example":{"id":"custom-acme-telegram","name":"Acme","icon":"string","sign_in_tickets":true,"enabled":true,"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.connections.edit, or a person turning sign_in_tickets on hasn’t signed in in the last 5 minutes: `fresh_sign_in_required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"An id the brand has already (`sign_in_provider_exists`), or as many providers as a brand keeps (`conflict`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/app-verified-providers/{provider}":{"get":{"operationId":"getAppVerifiedProvider","summary":"Get a provider your app verifies","description":"Its name, icon, whether it makes sign-in links and whether it is on. Needs `org.brands.view`.","security":[{"bearer":[]}],"x-permission":"org.brands.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider’s id","example":"custom-acme-telegram"},"required":true,"description":"The provider’s id","name":"provider","in":"path"}],"responses":{"200":{"description":"The provider","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProvider"},"example":{"id":"custom-acme-telegram","name":"Acme","icon":"string","sign_in_tickets":true,"enabled":true,"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateAppVerifiedProvider","summary":"Change a provider your app verifies","description":"Its name, its icon, and what it is for (`sign_in_tickets`: on wants a person's sign-in from the last 5 minutes, 403 `fresh_sign_in_required`; off refuses every sign-in link at once). Its id never changes. Turning it on or off is `POST …/enable` and `…/disable`. Needs `org.brands.edit`. Recorded as `brand.updated`, naming each setting under `custom_sign_in_provider.` (`sign_in_tickets` as `sign_in_links`).","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider’s id","example":"custom-acme-telegram"},"required":true,"description":"The provider’s id","name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProviderUpdate"},"example":{"name":"Telegram","icon":"string","sign_in_tickets":true}}}},"responses":{"200":{"description":"The provider, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProvider"},"example":{"id":"custom-acme-telegram","name":"Acme","icon":"string","sign_in_tickets":true,"enabled":true,"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.brands.edit, or a person turning sign_in_tickets on hasn’t signed in in the last 5 minutes: `fresh_sign_in_required`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteAppVerifiedProvider","summary":"Delete a provider your app verifies","description":"Deletes it with every account linked there, every pending one and every sign-in link: people keep their accounts and their ways to sign in. Its id is free again, and a provider made with it starts with nobody. Needs `org.connections.edit`. Recorded as `brand.updated` with `deleted` and `identities_removed`.","security":[{"bearer":[]}],"x-permission":"org.connections.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider’s id","example":"custom-acme-telegram"},"required":true,"description":"The provider’s id","name":"provider","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/app-verified-providers/{provider}/enable":{"post":{"operationId":"enableAppVerifiedProvider","summary":"Enable a provider your app verifies","description":"Turns it on: people link accounts at it, your server adds them and, where `sign_in_tickets` is on, makes sign-in links. Needs `org.brands.edit`. Recorded as `brand.updated`, naming `custom_sign_in_provider.enabled`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider’s id","example":"custom-acme-telegram"},"required":true,"description":"The provider’s id","name":"provider","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The provider, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProvider"},"example":{"id":"custom-acme-telegram","name":"Acme","icon":"string","sign_in_tickets":true,"enabled":true,"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/app-verified-providers/{provider}/disable":{"post":{"operationId":"disableAppVerifiedProvider","summary":"Disable a provider your app verifies","description":"Turns it off: no link code is made or redeemed, nothing pending is confirmed, your server adds no identity there, and every sign-in link is refused at once, those made already included. The accounts linked there stay. Needs `org.brands.edit`. Recorded as `brand.updated`, naming `custom_sign_in_provider.enabled`.","security":[{"bearer":[]}],"x-permission":"org.brands.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^custom-[a-z0-9]([a-z0-9-]{0,23}[a-z0-9])?$","description":"The provider’s id","example":"custom-acme-telegram"},"required":true,"description":"The provider’s id","name":"provider","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The provider, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVerifiedProvider"},"example":{"id":"custom-acme-telegram","name":"Acme","icon":"string","sign_in_tickets":true,"enabled":true,"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/link-codes/redeem":{"post":{"operationId":"redeemLinkCode","summary":"Redeem a link code","description":"Says who the person who opened your service's deep link is there, for the link code in it: your bot got `/start <code>` from Telegram's user 987654321, say. The code works once, for 10 minutes, for the provider it was made for (422 `link_code_invalid` otherwise, whichever it is); an account someone has linked there already is 409 `identity_in_use`, and leaves the code unspent. The identity then waits, pending, for the person to confirm it in the app that made the code, for 10 minutes: until then it links nothing, signs nobody in and gets no sign-in link, so tell them to go back to the app. The code goes in the body, never the URL. Only an org API key, from a server: a person's access token, the dashboard's included, or a request with an `Origin` or `Sec-Fetch-Site` header (a browser's) is 403 `server_only`. Limited per org (`app_links.org`). Needs `org.users.identities.edit`. Recorded as `user.identity_pending`.","security":[{"bearer":[]}],"x-permission":"org.users.identities.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkCodeRedemption"},"example":{"code":"q2V0ZXJzLWV4YW1wbGUtY29kZS1vbmx5LTAxMjM0NTY","provider":"custom-acme-telegram","subject":"987654321","handle":"ada","name":"Ada Lovelace","picture":"string"}}}},"responses":{"200":{"description":"Redeemed: the identity waits for the person to confirm it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemedLinkCode"},"example":{"identity":"idn_01h455vb4pex5vsknk084sn02q","user":"usr_01h455vb4pex5vsknk084sn02q","provider":"custom-acme-telegram","subject":"987654321","expires_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.users.identities.edit, or isn’t an org API key on a server: `server_only`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such brand, or no such provider your app verifies","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Someone has this account linked already (`identity_in_use`), or the provider is off (`sign_in_method_unavailable`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A code Synq didn’t make for this provider, or one that expired or was used: `link_code_invalid`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many for the org: `rate_limited`, with Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/sign-in-tickets":{"post":{"operationId":"createSignInTicket","summary":"Make a sign-in link","description":"A link that signs in the person who confirmed an account at one of the brand's “your app verifies it” providers, where it makes sign-in links (`sign_in_tickets`; 409 `sign_in_method_unavailable` otherwise, or while it is off): your bot's “Open the event” button, say. It is for one of the brand's own apps (`client_id`) and one of its redirect URIs exactly as registered (`return_to`), works once and for 2 minutes, and only through that app: opening it shows the app's page whose button signs them in, its server pushing the ticket to Synq (`synq_ticket` in a pushed authorization request with `prompt=login`), so a link preview or a scanner that only fetches it spends nothing. The sign-in is `amr: [\"ticket\"]` and never a fresh one: it can't add or remove ways to sign in, delete the account or make API keys. It shows in the person's sign-ins. An account nobody confirmed there is 404 `not_found`. The answer is shown once, never replayed for an Idempotency-Key, and never cached. Only an org API key, from a server: a person's access token, the dashboard's included, or a request with an `Origin` or `Sec-Fetch-Site` header (a browser's) is 403 `server_only`. Limited per org (`sign_in_tickets.org`). Needs `org.users.signInTickets.create`. Recorded as `user.sign_in_ticket_created`, and its use as `user.sign_in_ticket_used`.","security":[{"bearer":[]}],"x-permission":"org.users.signInTickets.create","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSignInTicket"},"example":{"provider":"custom-acme-telegram","subject":"987654321","client_id":"app_01h455vb4pex5vsknk084sn02q","return_to":"https://app.acme-guild.example/auth/callback"}}}},"responses":{"201":{"description":"The link, for the person alone","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInTicket"},"example":{"url":"https://app.acme-guild.example/auth/callback?synq_ticket=Oyewzb7tB0AL3anJsAjr7DTSO3Ojr34HOqKwZ611DYM","expires_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid, an app that isn’t one of the brand’s own, or a return_to that isn’t one of its redirect URIs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.users.signInTickets.create, or isn’t an org API key on a server: `server_only`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such brand or provider, or nobody confirmed this account there","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The provider is off, or makes no sign-in links: `sign_in_method_unavailable`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many for the org: `rate_limited`, with Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/permissions":{"get":{"operationId":"listCallerPermissions","x-permission":"none","summary":"List what the caller may do in an org","description":"The caller's own permissions in the org: across the org (`permissions`: a member's org role's, or an API key's own) and in its brands (`brand_permissions`: on All brands, and in each brand it holds a role in beside those). Needs no permission, only to be in the org, so a dashboard can offer only what its person may do. Every other route still checks its own.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"200":{"description":"The caller's permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallerPermissions"},"example":{"permissions":["org.read"],"brand_permissions":{"all_brands":["string"],"brands":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","permissions":["string"]}]},"role":"admin","brand_roles":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","role":"developer"}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/roles":{"get":{"operationId":"listRoles","summary":"List an org's roles","description":"The system roles, across the org (`level: org`) and in a brand (`level: brand`), and the org’s own (`level: any`). Needs `org.members.view`.","security":[{"bearer":[]}],"x-permission":"org.members.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its roles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolePage"},"example":{"data":[{"id":"string","name":"Acme","system":true,"level":"org","permissions":["string"]}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createRole","summary":"Make a role","description":"Any subset of the permission catalog, at most the caller's own. Needs `org.members.edit`. Recorded as `role.created`.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleInput"},"example":{"name":"Acme","permissions":["org.read"]}}}},"responses":{"201":{"description":"The new role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Role"},"example":{"id":"string","name":"Acme","system":true,"level":"org","permissions":["string"]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A name the org has for another role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/roles/{role}":{"patch":{"operationId":"updateRole","summary":"Change a role","description":"Its name or permissions (the whole list), at most the caller's own; members with it change with it. Needs `org.members.edit`. Recorded as `role.updated`.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^rol_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's own role's id","example":"rol_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's own role's id","name":"role","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"The role's name"},"permissions":{"type":"array","items":{"type":"string","enum":["org.read","org.edit","org.delete","org.members.view","org.members.edit","org.ownership.transfer","org.brands.view","org.brands.edit","org.brands.transfer","org.apps.view","org.apps.edit","org.apis.view","org.apis.edit","org.connections.view","org.connections.edit","org.webhooks.view","org.webhooks.edit","org.tokenGates.view","org.tokenGates.edit","org.integrations.view","org.integrations.edit","org.emailDomains.view","org.emailDomains.edit","org.billing.view","org.billing.edit","org.users.view","org.users.edit","org.users.providerTokens.read","org.users.identities.edit","org.users.signInTickets.create","org.apiKeys.view","org.apiKeys.edit","org.auditLog.view","org.auditLog.export","org.sso.view","org.sso.edit"]},"minItems":1,"description":"What the role may do: at most what the caller can. Each permission that changes something comes with the one that reads it, as in every built-in role: `org.brands.edit` gives `org.brands.view` too, and `org.edit` gives `org.read`"}},"additionalProperties":false},"example":{"name":"Acme","permissions":["org.read"]}}}},"responses":{"204":{"description":"Changed"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A name the org has for another role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteRole","summary":"Delete a role","description":"One no member has; its pending invites go with it. Needs `org.members.edit`. Recorded as `role.deleted`.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^rol_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's own role's id","example":"rol_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's own role's id","name":"role","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A role a member has","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/members":{"get":{"operationId":"listMembers","summary":"List an org's members","description":"Needs `org.members.view`.","security":[{"bearer":[]}],"x-permission":"org.members.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its members","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberPage"},"example":{"data":[{"user_id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","name":"Acme","role":"string","brand_roles":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","role":"developer"}],"joined_at":"2026-10-21T12:00:00.000Z","sessions_ended_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/members":{"get":{"operationId":"listBrandMembers","summary":"List who can reach a brand","description":"The org's members who hold a role in this brand: its owner, Brand admin in every brand, and each member with a role on All brands or in this brand, with those roles alone in `brand_roles`. A brand's Access page. Needs `org.members.view` in the brand, which every brand role has; a brand the caller holds no role in answers 404. Changing a member's roles is `PATCH …/members/{user}`, which wants `org.members.edit` across the org.","security":[{"bearer":[]}],"x-permission":"org.members.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"The members who can reach it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandMemberPage"},"example":{"data":[{"user_id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","name":"Acme","role":"string","brand_roles":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","role":"developer"}],"joined_at":"2026-10-21T12:00:00.000Z","sessions_ended_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/members/{user}":{"patch":{"operationId":"updateMember","summary":"Change a member's role","description":"Their role across the org, their brand roles, or both; a new role alone gives that role's brand roles (Brand admin on All brands for an admin, Viewer for a member, none for billing). Not the owner's, who is Brand admin in every brand, and never to owner: ownership is handed over. At most the caller's own permissions, across the org and in each brand. A role in one brand wants a plan with roles in one brand at a time (403 `plan_feature_unavailable`, Scale and up); All brands is on every plan. Needs `org.members.edit`. Recorded as `member.role_assigned`, with the brand roles.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The member's user id at Synq","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The member's user id at Synq","name":"user","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","description":"Their role across the org: `admin`, `billing`, `member`, or one of the org’s own roles (`rol_…`); never `owner`"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/BrandRoleInput"},"maxItems":100,"description":"What they may do in the org's brands: a role per brand, or on All brands, at most one for each; a brand with none is one they can't reach. Never more than the caller has there. Left out, their org role's: Brand admin on All brands for an admin, Viewer for a member, nothing for billing"}},"additionalProperties":false},"example":{"role":"string","brand_roles":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","role":"developer"}]}}}},"responses":{"204":{"description":"Changed"},"400":{"description":"A role or a brand role that is not one, or a brand not of the org","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.members.edit, gives more than it has, or the org's plan has no roles in one brand at a time","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The owner's role, or owner as a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"removeMember","summary":"Remove a member","description":"Not the owner. Their access to the org ends at once: every request checks membership, so their dashboard sessions, the CLI and the AI agents they connected act in it no more, the change requests their agents asked for go, and so do their setup codes and unused requests to connect a server or group. API keys belong to the org and keep working: revoke one they hold the secret of. Needs `org.members.edit`. Recorded as `member.removed`.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The member's user id at Synq","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The member's user id at Synq","name":"user","in":"path"}],"responses":{"204":{"description":"Removed"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The owner","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/members/{user}/end-sessions":{"post":{"operationId":"endMemberSessions","summary":"End a member's sessions in the org","description":"For a lost laptop or a token that may have leaked: from now, a Synq access token from a sign-in before now acts in this org no more, the dashboard's, the CLI's and an AI agent's (MCP host's) alike, and each answers 403 `fresh_sign_in_required` saying so. The member stays a member: once they sign in again, they work here as before, and an app or agent they connected before now needs connecting again. Their sessions in their other orgs are theirs and stay. The setup codes they made in the org stop working, and the change requests their agents asked for that wait on them are cancelled.\n\nRemoving a member, or their leaving, ends all of this at once without this call: every request checks membership. API keys belong to the org, not to whoever made them, and keep working either way: revoke one they hold the secret of.\n\nNot the owner's, but by the owner. Needs `org.members.edit`, and nobody ends the sessions of someone who can do more than they can. Recorded as `member.sessions_ended`.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^usr_[0-9a-hjkmnp-tv-z]{26}$","description":"The member's user id at Synq","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The member's user id at Synq","name":"user","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberSessionsEnded"},"example":{"sessions_ended_at":"2026-10-21T12:00:00.000Z","setup_codes_ended":0,"change_requests_cancelled":0}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The owner's, asked by someone else","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/leave":{"post":{"operationId":"leaveOrg","summary":"Leave an org","description":"For a person, not an API key; the owner hands the org over first. Their access to the org ends at once, as removing them ends it (`DELETE …/members/{user}`). Needs `org.read`, which every member has. Recorded as `member.left`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"204":{"description":"Left"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The owner","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/transfer-ownership":{"post":{"operationId":"transferOrgOwnership","summary":"Hand the org over","description":"The owner makes another member the owner, and becomes an admin. Needs `org.ownership.transfer`, which only the owner has, as a person who signed in within the last 5 minutes (`max_age=300`). It refuses a member who owns as many free orgs as one person may (`recipient_org_quota_exceeded`), unless this org is on a paid plan: a paid org doesn't count. Recorded as `org.ownership_transferred`.","security":[{"bearer":[]}],"x-permission":"org.ownership.transfer","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string","description":"The member who becomes the owner, by user id"}},"required":["user_id"],"additionalProperties":false},"example":{"user_id":"usr_01h455vb4pex5vsknk084sn02q"}}}},"responses":{"204":{"description":"Handed over"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Not the owner, a sign-in more than 5 minutes old, or a member who owns as many free orgs as one person may, for an org that is free","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/invites":{"get":{"operationId":"listInvites","summary":"List an org's pending invites","description":"Needs `org.members.view`.","security":[{"bearer":[]}],"x-permission":"org.members.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its pending invites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePage"},"example":{"data":[{"id":"inv_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","role":"string","brand_roles":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","role":"developer"}],"invited_by":"string","expires_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createInvite","summary":"Invite someone","description":"Emails them a link, single-use and valid 7 days, to join with a role across the org and brand roles (left out, the role's: Brand admin on All brands for an admin, Viewer for a member, none for billing), at most the caller's own permissions, never owner. A role in one brand wants a plan with roles in one brand at a time (403 `plan_feature_unavailable`, Scale and up). They accept it signed in at Synq with that email. Needs `org.members.edit`. Recorded as `invite.created`.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","description":"Who to invite: the link goes to this address"},"role":{"type":"string","description":"Their role across the org: `admin`, `billing`, `member`, or one of the org’s own roles (`rol_…`); never `owner`"},"brand_roles":{"type":"array","items":{"$ref":"#/components/schemas/BrandRoleInput"},"maxItems":100,"description":"What they may do in the org's brands: a role per brand, or on All brands, at most one for each; a brand with none is one they can't reach. Never more than the caller has there. Left out, their org role's: Brand admin on All brands for an admin, Viewer for a member, nothing for billing"}},"required":["email","role"],"additionalProperties":false},"example":{"email":"ana@example.com","role":"string","brand_roles":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","role":"developer"}]}}}},"responses":{"201":{"description":"The invite, sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invite"},"example":{"id":"inv_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","role":"string","brand_roles":[{"brand":"brd_01h455vb4pex5vsknk084sn02q","role":"developer"}],"invited_by":"string","expires_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"An email or role that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Someone who is a member already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Synq can't email this address (`email_undeliverable`): it bounced or marked Synq's email as spam before. The invite is revoked; use another address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"No way to send email is set up here, or the email couldn't be sent: the invite is revoked; try again","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/invites/{invite}":{"delete":{"operationId":"revokeInvite","summary":"Revoke an invite","description":"Its link stops working. Needs `org.members.edit`. Recorded as `invite.revoked`.","security":[{"bearer":[]}],"x-permission":"org.members.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^inv_[0-9a-hjkmnp-tv-z]{26}$","description":"The invite's id","example":"inv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The invite's id","name":"invite","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/invites/lookup":{"post":{"operationId":"lookUpInvite","x-permission":"none","summary":"Read what an invite offers","description":"What an invite's link offers, while it can still be accepted: the org's name, the role across the org and the brand roles, each with what it lets the person do and each brand by its name, who sent it and when it stops working, for the page that asks before accepting. Public: it needs no credential, and the token is in the body, never the URL. It answers nothing else about the org, nor the address the invite was sent to. A few a minute from one address, or from one person signed in.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteToken"},"example":{"token":"string"}}}},"responses":{"200":{"description":"What the invite offers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteOffer"},"example":{"org_name":"Acme","role":"admin","role_name":"Admin","role_about":"Everything but handing the organization over or deleting it","brand_roles":[{"brand_name":"Acme Books","role":"developer","role_name":"Developer","about":"Its apps, APIs, sign-in methods, webhooks and API keys"}],"inviter_name":"Ana Lima","expires_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A body that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An invite that is used, revoked, expired, or never was, or whose org is gone","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many from this address, or from this person","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/invites/accept":{"post":{"operationId":"acceptInvite","x-permission":"none","summary":"Accept an invite","description":"As the person it was sent to: signed in at Synq with that email, verified. Recorded as `invite.accepted` and `member.added`.","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":200,"description":"The token in the link the invite emailed"}},"required":["token"],"additionalProperties":false},"example":{"token":"string"}}}},"responses":{"200":{"description":"The org they joined","content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"type":"string","description":"The org they joined"}},"required":["org_id"]},"example":{"org_id":"org_01h455vb4pex5vsknk084sn02q"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key, or a person whose verified email is not the invite’s","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An invite that is used, revoked, expired, or never was","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Someone who is a member already: `org_id` is the org","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/MemberAlreadyProblem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/invites":{"get":{"operationId":"listMyInvites","x-permission":"none","summary":"List the invites waiting for you","description":"The invites sent to the signed-in person's verified email address that they can still accept: what each offers, as `POST /v1/invites/lookup` says it, and its id, to accept with `POST /v1/invites/{invite}/accept`. None while the address isn't verified. Oldest first. A person only, never an API key.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Their pending invites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingInvitePage"},"example":{"data":[{"org_name":"Acme","role":"admin","role_name":"Admin","role_about":"Everything but handing the organization over or deleting it","brand_roles":[{"brand_name":"Acme Books","role":"developer","role_name":"Developer","about":"Its apps, APIs, sign-in methods, webhooks and API keys"}],"inviter_name":"Ana Lima","expires_at":"2026-10-21T12:00:00.000Z","id":"inv_01h455vb4pex5vsknk084sn02q"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person has invites","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/invites/{invite}/accept":{"post":{"operationId":"acceptMyInvite","x-permission":"none","summary":"Accept an invite waiting for you","description":"One of the signed-in person's own pending invites (`GET /v1/invites`), by its id: their verified email address is the invite's, which proves it was sent to them. An invite to anyone else is 404, as one that never was. Recorded as `invite.accepted` and `member.added`.","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","pattern":"^inv_[0-9a-hjkmnp-tv-z]{26}$","description":"The invite's id","example":"inv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The invite's id","name":"invite","in":"path"}],"responses":{"200":{"description":"The org they joined","content":{"application/json":{"schema":{"type":"object","properties":{"org_id":{"type":"string","description":"The org they joined"}},"required":["org_id"]},"example":{"org_id":"org_01h455vb4pex5vsknk084sn02q"}}}},"400":{"description":"An id that is not an invite’s","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"An API key: only a person accepts an invite","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An invite that is used, revoked, expired, never was, or was sent to another address","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Someone who is a member already: `org_id` is the org","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/MemberAlreadyProblem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/former-members":{"get":{"operationId":"listFormerMembers","summary":"List who left an org","description":"Everyone who left the org or was removed from it and isn't a member again, newest first: who they were, the role they had, when they joined and left, and whether they left themselves or who removed them. Read from the audit log's `member.left` and `member.removed` entries, so it reaches as far back as the org's plan keeps its log (`audit_retention_days` in `GET /v1/plans`). Their access ended when they went; filter the audit log by their `user_id` (`actor`) to see what they did. Needs `org.members.view`.","security":[{"bearer":[]}],"x-permission":"org.members.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Who left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormerMemberPage"},"example":{"data":[{"user_id":"usr_01h455vb4pex5vsknk084sn02q","email":"ana@acme.example","name":"Acme","role":"string","joined_at":"2026-10-21T12:00:00.000Z","left_at":"2026-10-21T12:00:00.000Z","departure":"left","removed_by":{"type":"member","id":"usr_01h455vb4pex5vsknk084sn02q"},"audit_event_id":"aud_01h455vb4pex5vsknk084sn02q"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks":{"get":{"operationId":"listWebhooks","summary":"List an org's webhooks","description":"Never their secrets. Needs `org.webhooks.view`. A webhook for All brands is listed only for a credential with it across the org, and one for brands only for a credential with it in each of them: a key for some brands gets theirs alone, and `warnings` (`brands_limited`) says so, rather than a list that looks whole.","security":[{"bearer":[]}],"x-permission":"org.webhooks.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its webhooks that the credential can see, and `warnings` saying what that leaves out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPage"},"example":{"data":[{"id":"whk_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example","events":["string"],"name":"Order sync","description":"string","enabled":true,"disabled_reason":"string","previous_secret_expires_at":"2026-10-21T12:00:00.000Z","brands":["brd_01h455vb4pex5vsknk084sn02q"],"created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string","warnings":[{"code":"brands_limited","message":"string"}]}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createWebhook","summary":"Subscribe a URL to events","description":"An https URL on the public internet. The signing secret is in this response only. It receives only events recorded after it exists and while it is on. Needs `org.webhooks.edit`, and a plan with webhooks (403 `plan_feature_unavailable` otherwise, naming the plan in `required_plan`). Recorded as `webhook.created`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Where events are sent: https on a public host"},"events":{"type":"array","items":{"type":"string","enum":["*","org.created","org.claimed","org.updated","org.agent_approvals_updated","org.deleted","org.plan_changed","org.trial_ended","org.audit_log_exported","org.disabled","org.enabled","org.contacted","brand.created","brand.updated","brand.deleted","brand.reply_to_confirmed","brand.app_registrations_full","brand.email_allowance_reached","brand.transfer_requested","brand.transfer_accepted","brand.transfer_notice_sent","brand.transfer_declined","brand.transfer_cancelled","brand.claimed","app.created","app.registered","app.updated","app.secret_rotated","app.deleted","app.api_access_changed","app.refresh_token_replayed","api.created","api.updated","api.deleted","org.ownership_transferred","member.added","member.role_assigned","member.removed","member.left","member.sessions_ended","member.agent_approvals_updated","role.created","role.updated","role.deleted","invite.created","invite.revoked","invite.accepted","webhook.created","webhook.updated","webhook.secret_rotated","webhook.deleted","webhook.disabled","token_gate.created","token_gate.updated","token_gate.deleted","discord_server.connected","discord_server.updated","discord_server.disconnected","discord_role.granted","discord_role.recognized","discord_role.removal_scheduled","discord_role.removed","discord_role.grant_failed","discord_role.removal_failed","discord_role.adoption_started","discord_role.adoption_reminded","discord_role.adoption_failed","discord_role.window_announced","discord_role.window_updated","discord_role.window_reminded","discord_role.window_extended","discord_role.window_paused","discord_role.window_resumed","discord_role.window_waiting","discord_role.window_deadline_started","discord_role.window_closed","telegram_group.disconnected","own_bot.set","own_bot.removed","telegram_group.connected","telegram_group.updated","telegram_group.bot_removed","telegram_group.adoption_started","telegram_group.adoption_reminded","telegram_group.window_announced","telegram_group.window_updated","telegram_group.window_reminded","telegram_group.window_extended","telegram_group.window_moved","telegram_group.window_paused","telegram_group.window_resumed","telegram_group.window_waiting","telegram_group.window_deadline_started","telegram_group.window_closed","telegram_member.approved","telegram_member.recognized","telegram_member.declined","telegram_member.removal_scheduled","telegram_member.muted","telegram_member.unmuted","telegram_member.removed","telegram_member.banned_by_admin","telegram_member.muted_by_admin","telegram_member.action_failed","email_domain.created","email_domain.verified","email_domain.failed","email_domain.deleted","org_domain.created","org_domain.verified","org_domain.failing","org_domain.unverified","org_domain.deleted","brand.custom_domain_added","brand.custom_domain_verified","brand.custom_domain_activated","brand.custom_domain_failed","brand.custom_domain_suspended","brand.custom_domain_restored","brand.custom_domain_removed","api_key.created","api_key.revoked","api_key.rotated","api_key.expired","approval_request.created","approval_request.approved","approval_request.declined","approval_request.applied","approval_request.change_added","file.uploaded","file.rejected","file.downloaded","staff.role_granted","user.created","user.updated","user.looked_up","user.email_verified","user.password_reset","user.passkey_added","user.passkey_removed","user.identity_linked","user.identity_unlinked","user.provider_token_read","user.identity_token_revoked","user.identity_pending","user.identity_rejected","user.sign_in_ticket_created","user.sign_in_ticket_used","user.consent_granted","user.consent_revoked","user.api_key_created","user.api_key_revoked","user.sessions_revoked","user.deletion_scheduled","user.deletion_cancelled","user.deleted","user.merged","user.sign_in_failed","user.token_gate_checked","user.token_gate_dry_run","webhook.test"]},"minItems":1,"maxItems":100,"description":"The event types it wants, or `*` for every one"},"name":{"type":["string","null"],"minLength":1,"maxLength":60,"description":"A short name for people, at most 60 characters, or null for none: the dashboard shows the URL's host without one"},"description":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"What it is for, for people, or null"},"brands":{"type":["array","null"],"items":{"type":"string","maxLength":64},"minItems":1,"maxItems":100,"description":"The brands whose events it gets (`brd_…`), each one the credential has org.webhooks.edit in; null or left out on making one, All brands, which gets the org's own events too and needs org.webhooks.edit across the org"}},"required":["url","events"],"additionalProperties":false},"example":{"url":"https://app.acme.example","events":["*"],"name":"Acme","description":"string","brands":["string"]}}}},"responses":{"201":{"description":"The webhook, with its secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionWithSecret"},"example":{"id":"whk_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example","events":["string"],"name":"Order sync","description":"string","enabled":true,"disabled_reason":"string","previous_secret_expires_at":"2026-10-21T12:00:00.000Z","brands":["brd_01h455vb4pex5vsknk084sn02q"],"created_at":"2026-10-21T12:00:00.000Z","secret":"string"}}}},"400":{"description":"A URL or events that are not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.webhooks.edit, or the org's plan has no webhooks","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks/{webhook}":{"get":{"operationId":"getWebhook","summary":"Read a webhook","description":"Never its secret. Needs `org.webhooks.view`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"}],"responses":{"200":{"description":"The webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"},"example":{"id":"whk_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example","events":["string"],"name":"Order sync","description":"string","enabled":true,"disabled_reason":"string","previous_secret_expires_at":"2026-10-21T12:00:00.000Z","brands":["brd_01h455vb4pex5vsknk084sn02q"],"created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateWebhook","summary":"Change a webhook","description":"Its URL, events, name or description; turning it on or off is `POST …/enable` and `…/disable`. It receives only events recorded while it is on and wants them, a newly wanted event only from the change on. Needs `org.webhooks.edit`. Changing its URL or events also wants a plan with webhooks (403 `plan_feature_unavailable`), so an org that moved to a plan without them can still name or describe one, turn it off or delete it. Recorded as `webhook.updated`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"Where events are sent: https on a public host"},"events":{"type":"array","items":{"type":"string","enum":["*","org.created","org.claimed","org.updated","org.agent_approvals_updated","org.deleted","org.plan_changed","org.trial_ended","org.audit_log_exported","org.disabled","org.enabled","org.contacted","brand.created","brand.updated","brand.deleted","brand.reply_to_confirmed","brand.app_registrations_full","brand.email_allowance_reached","brand.transfer_requested","brand.transfer_accepted","brand.transfer_notice_sent","brand.transfer_declined","brand.transfer_cancelled","brand.claimed","app.created","app.registered","app.updated","app.secret_rotated","app.deleted","app.api_access_changed","app.refresh_token_replayed","api.created","api.updated","api.deleted","org.ownership_transferred","member.added","member.role_assigned","member.removed","member.left","member.sessions_ended","member.agent_approvals_updated","role.created","role.updated","role.deleted","invite.created","invite.revoked","invite.accepted","webhook.created","webhook.updated","webhook.secret_rotated","webhook.deleted","webhook.disabled","token_gate.created","token_gate.updated","token_gate.deleted","discord_server.connected","discord_server.updated","discord_server.disconnected","discord_role.granted","discord_role.recognized","discord_role.removal_scheduled","discord_role.removed","discord_role.grant_failed","discord_role.removal_failed","discord_role.adoption_started","discord_role.adoption_reminded","discord_role.adoption_failed","discord_role.window_announced","discord_role.window_updated","discord_role.window_reminded","discord_role.window_extended","discord_role.window_paused","discord_role.window_resumed","discord_role.window_waiting","discord_role.window_deadline_started","discord_role.window_closed","telegram_group.disconnected","own_bot.set","own_bot.removed","telegram_group.connected","telegram_group.updated","telegram_group.bot_removed","telegram_group.adoption_started","telegram_group.adoption_reminded","telegram_group.window_announced","telegram_group.window_updated","telegram_group.window_reminded","telegram_group.window_extended","telegram_group.window_moved","telegram_group.window_paused","telegram_group.window_resumed","telegram_group.window_waiting","telegram_group.window_deadline_started","telegram_group.window_closed","telegram_member.approved","telegram_member.recognized","telegram_member.declined","telegram_member.removal_scheduled","telegram_member.muted","telegram_member.unmuted","telegram_member.removed","telegram_member.banned_by_admin","telegram_member.muted_by_admin","telegram_member.action_failed","email_domain.created","email_domain.verified","email_domain.failed","email_domain.deleted","org_domain.created","org_domain.verified","org_domain.failing","org_domain.unverified","org_domain.deleted","brand.custom_domain_added","brand.custom_domain_verified","brand.custom_domain_activated","brand.custom_domain_failed","brand.custom_domain_suspended","brand.custom_domain_restored","brand.custom_domain_removed","api_key.created","api_key.revoked","api_key.rotated","api_key.expired","approval_request.created","approval_request.approved","approval_request.declined","approval_request.applied","approval_request.change_added","file.uploaded","file.rejected","file.downloaded","staff.role_granted","user.created","user.updated","user.looked_up","user.email_verified","user.password_reset","user.passkey_added","user.passkey_removed","user.identity_linked","user.identity_unlinked","user.provider_token_read","user.identity_token_revoked","user.identity_pending","user.identity_rejected","user.sign_in_ticket_created","user.sign_in_ticket_used","user.consent_granted","user.consent_revoked","user.api_key_created","user.api_key_revoked","user.sessions_revoked","user.deletion_scheduled","user.deletion_cancelled","user.deleted","user.merged","user.sign_in_failed","user.token_gate_checked","user.token_gate_dry_run","webhook.test"]},"minItems":1,"maxItems":100,"description":"The event types it wants, or `*` for every one"},"name":{"type":["string","null"],"minLength":1,"maxLength":60,"description":"A short name for people, at most 60 characters, or null for none: the dashboard shows the URL's host without one"},"description":{"type":["string","null"],"minLength":1,"maxLength":200,"description":"What it is for, for people, or null"},"brands":{"type":["array","null"],"items":{"type":"string","maxLength":64},"minItems":1,"maxItems":100,"description":"The brands whose events it gets (`brd_…`), each one the credential has org.webhooks.edit in; null or left out on making one, All brands, which gets the org's own events too and needs org.webhooks.edit across the org"}},"additionalProperties":false},"example":{"url":"https://app.acme.example","events":["*"],"name":"Acme","description":"string","brands":["string"]}}}},"responses":{"200":{"description":"The webhook, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"},"example":{"id":"whk_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example","events":["string"],"name":"Order sync","description":"string","enabled":true,"disabled_reason":"string","previous_secret_expires_at":"2026-10-21T12:00:00.000Z","brands":["brd_01h455vb4pex5vsknk084sn02q"],"created_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A URL or events that are not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.webhooks.edit, or the org's plan has no webhooks to point somewhere new","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook","description":"With its deliveries. Needs `org.webhooks.edit`. Recorded as `webhook.deleted`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks/{webhook}/enable":{"post":{"operationId":"enableWebhook","summary":"Enable a webhook","description":"Turn a webhook on, clearing why Synq turned it off and its consecutive failures when it was off. Events recorded while it was off are not sent. Needs `org.webhooks.edit` and a plan with webhooks (403 `plan_feature_unavailable` otherwise). Recorded as `webhook.updated` with enabled in its fields.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"}],"responses":{"200":{"description":"The webhook, enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"},"example":{"id":"whk_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example","events":["string"],"name":"Order sync","description":"string","enabled":true,"disabled_reason":"string","previous_secret_expires_at":"2026-10-21T12:00:00.000Z","brands":["brd_01h455vb4pex5vsknk084sn02q"],"created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.webhooks.edit, or the org's plan has no webhooks","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks/{webhook}/disable":{"post":{"operationId":"disableWebhook","summary":"Disable a webhook","description":"Turn a webhook off. Its deliveries still waiting, those being tried again after a failed attempt among them, are `failed` at once, with `last_error` saying the webhook was turned off: turning it on sends none of them, nor any event recorded while it was off, and each can be sent again by hand (`POST …/deliveries/{delivery}/resend`) once it is on. An org whose plan no longer includes webhooks can still stop its subscriptions. Needs `org.webhooks.edit`. Recorded as `webhook.updated` with enabled in its fields.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"}],"responses":{"200":{"description":"The webhook, disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscription"},"example":{"id":"whk_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example","events":["string"],"name":"Order sync","description":"string","enabled":true,"disabled_reason":"string","previous_secret_expires_at":"2026-10-21T12:00:00.000Z","brands":["brd_01h455vb4pex5vsknk084sn02q"],"created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.webhooks.edit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks/{webhook}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","summary":"Rotate a webhook's signing secret","description":"A new secret, in this response only. For 24 hours deliveries carry signatures by both, so the receiver can switch over. Needs `org.webhooks.edit`. A person needs a sign-in at Synq from the last 5 minutes whose time Synq proved (send them to sign in with `max_age=300`), else 403 `fresh_sign_in_required`; an API key never does. Recorded as `webhook.secret_rotated`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"}],"responses":{"200":{"description":"The webhook, with its new secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionWithSecret"},"example":{"id":"whk_01h455vb4pex5vsknk084sn02q","url":"https://app.acme.example","events":["string"],"name":"Order sync","description":"string","enabled":true,"disabled_reason":"string","previous_secret_expires_at":"2026-10-21T12:00:00.000Z","brands":["brd_01h455vb4pex5vsknk084sn02q"],"created_at":"2026-10-21T12:00:00.000Z","secret":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.webhooks.edit, or a person signed in more than 5 minutes ago","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks/{webhook}/test":{"post":{"operationId":"sendTestWebhookEvent","summary":"Send a test event","description":"A `webhook.test` event, sent now, once, signed like any other; the answer says how the receiver took it. Needs `org.webhooks.edit`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"}],"responses":{"200":{"description":"How the delivery went","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"},"example":{"id":"msg_01h455vb4pex5vsknk084sn02q","event_type":"string","status":"pending","attempts":0,"max_attempts":6,"next_attempt_at":"2026-10-21T12:00:00.000Z","last_status_code":0,"last_error":"string","delivered_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks/{webhook}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"A webhook's deliveries","description":"Newest first, with their status, attempts and last answer. Needs `org.webhooks.view`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of deliveries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryPage"},"example":{"data":[{"id":"msg_01h455vb4pex5vsknk084sn02q","event_type":"string","status":"pending","attempts":0,"max_attempts":6,"next_attempt_at":"2026-10-21T12:00:00.000Z","last_status_code":0,"last_error":"string","delivered_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/webhooks/{webhook}/deliveries/{delivery}/resend":{"post":{"operationId":"resendWebhookDelivery","summary":"Send a delivery again","description":"One more try at a delivery that has finished, `succeeded` or `failed`, sent now and once: the same event with the same body and `webhook-id` (a receiver that keeps the ids it has handled can tell it's the same one), signed with the webhook's secrets as every delivery is. For a receiver that was down or refused events: list the webhook's deliveries, fix the receiver, then send each `failed` one again (those still waiting when the webhook was turned off are `failed` too, `last_error` saying so). The answer is the delivery as this try left it: `succeeded`, with `delivered_at`, on a 2xx; otherwise its status stays as it was, with the receiver's answer in `last_status_code` and `last_error`, and the try never counts toward turning the webhook off. 409 `conflict` while the webhook is turned off (`POST …/webhooks/{webhook}/enable` first) or the delivery is still being tried (`pending`: its next attempt comes on its own). Needs `org.webhooks.edit`.","security":[{"bearer":[]}],"x-permission":"org.webhooks.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"The webhook's id","example":"whk_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The webhook's id","name":"webhook","in":"path"},{"schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"The delivery's id, its `webhook-id` header","example":"msg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The delivery's id, its `webhook-id` header","name":"delivery","in":"path"}],"responses":{"200":{"description":"The delivery, as the try left it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"},"example":{"id":"msg_01h455vb4pex5vsknk084sn02q","event_type":"string","status":"pending","attempts":0,"max_attempts":6,"next_attempt_at":"2026-10-21T12:00:00.000Z","last_status_code":0,"last_error":"string","delivered_at":"2026-10-21T12:00:00.000Z","created_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The webhook is turned off, or the delivery is still being tried","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/token-gates":{"get":{"operationId":"listBrandTokenGates","summary":"List a brand's token gates","description":"The brand's gates, on or off, with where each applies. Needs `org.tokenGates.view`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"The brand's token gates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGateList"},"example":{"data":[{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":null,"chain":null,"mint":null,"min_amount":null,"wallets":null,"label":null,"display":null}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string","chains":["solana:mainnet"]}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org or brand, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createBrandTokenGate","summary":"Gate sign-in on what wallets hold","description":"A gate in the brand on the brand itself, its apps, its Discord roles, its Telegram groups, or any mix: signing in to one of its apps, the person's wallets must meet its `rule`, or a page tells them why not (with `refusal_message` first) and the app gets `access_denied`. That holds however they signed in: someone who signed in with email or a social account and has no wallet on their account that meets it is stopped there too, and on the brand's own apps, where it offers wallets as a way in, the page lets them add the wallet that holds it. A gate belongs to one brand: `brands` may name only that brand (every app of it), and `apps`, `discord_roles` and `telegram_groups` only its apps and the servers and groups connected to it (400 at the field otherwise, naming both brands). A gate never moves to another brand: make one there instead. `rule` is a tree of `all` and `any` groups (at most 3 deep, each with 1 to 20 children, 20 conditions in all) of conditions on the wallets on the person's account in the brand: `token` (hold at least `min_amount` of a mint, every account and compressed balance of it counted), `collection` (hold at least `min_count` NFTs of a verified Core or Token Metadata collection, compressed and Core NFTs included), `nft` (hold one NFT), `allowlist` (have a wallet on a list of at most 1000 addresses a gate, never shown to anyone), `program_activity` (at least `min_count` successful transactions in the last `window_days` days that ran a program, signed by a wallet of theirs unless `role: any`) and `address_activity` (as many with an address, by who signed them: `direction` `sent`, `received` or `either`). An activity condition asks for 1 to 100 transactions in 1 to 90 days (on `solana:devnet`, at most 14, as far back as its history is read), counts each transaction once however many of the person's wallets are in it, and reads each wallet's newest 1000 successful transactions in the window at most, and as many it is in only through a compressed token account (compressed tokens and compressed NFTs count, as uncompressed ones do); its window slides, so a check that meets one says `until` when it lapses. `token`, `collection` and the activity conditions count every wallet together (`wallets: combined`, the default) or one alone (`single`). Each condition names its `chain`, which must be one this API reads (the list's `chains`) unless it is an allowlist. Synq reads every token, collection, NFT and program the rule names from the chain as it is written (400 for one that isn't what its condition says, at its path, such as `rule.root.conditions.1.collection`, or for an activity address that is a program; 503 when the chain can't be read), once nothing else in the request is wrong and from the org's own reads (`token_gate.org_reads`, as its dry runs; 429 once they're spent), and keeps their names as each condition's `display`. `schedule` is an optional window in an IANA time zone, open at one end or both, with what happens `outside` it: `let_in` (the gate doesn't apply) or `refuse` (the app is closed to everyone). A sign-in reads at most 40 conditions from the chain across every enabled gate on an app (409 `conflict` naming the app otherwise). `discord_roles` names roles in the brand's connected Discord servers (Communities): Synq's bot gives the role to people whose wallets meet the rule once they verify, and takes it back, never the person, from someone who stops qualifying once the grace period ends. Each role is read from Discord as it is added (400 at `discord_roles.0.role` when the bot can't give it, with the fix; 409 `discord_unavailable` where this API has no Discord bot). `telegram_groups` names the brand's connected Telegram groups: the bot approves join requests from people who qualify, and mutes (`on_lost: mute`, the default, supergroups only) or removes (`remove`) those who stop. A role or group follows one gate (400 naming the gate that has it). Everyone each lets in is checked again every `recheck_seconds` (6 hours by default) and keeps access `grace_seconds` (24 hours by default) after a check finds they stopped; a check that can't read the chain keeps their access. Gates are checked at every sign-in and on every refresh, where a refusal or a closed window ends the app's grant (`invalid_grant`), so access ends within one access token's life; what can't be read refuses a sign-in, and answers a refresh 503 `temporarily_unavailable` with the grant kept. What wallets hold is kept for a minute. Every check is recorded as `user.token_gate_checked`. At most 100 gates per org, across its brands. Needs `org.tokenGates.edit`, a plan with token gating (403 `plan_feature_unavailable` otherwise, naming the plan in `required_plan`) and, for a rule that reads a chain, an API that reads one (409 `token_gates_unavailable` otherwise). A gate is on once made: make it with no brands or apps for one that applies nowhere yet, and `POST …/disable` turns one off. Recorded as `token_gate.created`, in the brand.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The gate's name, for the org's people: people signing in see the token's"},"rule":{"$ref":"#/components/schemas/TokenGateRule"},"schedule":{"$ref":"#/components/schemas/TokenGateSchedule"},"refusal_message":{"type":"string","description":"Your own words, shown first where the gate refuses someone, above Synq's explanation of what they lack: plain text, at most 500 characters and 5 lines, never made into links. `null` clears it","example":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass."},"brands":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50,"description":"The gate's own brand (`brd_…`), to apply to every app of it; no other brand. Replaces the list"},"apps":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":50,"description":"Apps of the gate's brand, by client_id, it applies to. Replaces the list"},"discord_roles":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateDiscordRoleInput"},"maxItems":25,"description":"Discord roles of the org's connected servers it gives, at most 25. Replaces the list"},"telegram_groups":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateTelegramGroupInput"},"maxItems":25,"description":"Telegram groups the org connected that it lets people into, at most 25. Replaces the list"}},"required":["name","rule"],"additionalProperties":false},"example":{"name":"Acme","rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","min_amount":"1000","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"America/New_York","all_day":false,"starts":"2026-10-10T09:00","ends":"2026-10-10T17:00","outside":"refuse"},"refusal_message":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass.","brands":["string"],"apps":["string"],"discord_roles":[{"server":"dsv_01h455vb4pex5vsknk084sn02q","role":"1187390245566001234","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}],"telegram_groups":[{"group":"tgg_01h455vb4pex5vsknk084sn02q","on_lost":"mute","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}]}}}},"responses":{"201":{"description":"The token gate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org or brand, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org has 100 token gates already, an app would read more than 40 conditions from the chain, this API reads no chain, or it has no bot for a Discord role or Telegram group named","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/token-gates/{gate}":{"get":{"operationId":"getBrandTokenGate","summary":"Read a token gate","description":"A gate of the brand (404 for a gate of another brand). Needs `org.tokenGates.view`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"responses":{"200":{"description":"The token gate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, brand or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateBrandTokenGate","summary":"Change a token gate","description":"Its name, rule, schedule, message, or where it applies in its brand; turning it on or off is `POST …/enable` and `…/disable`. `rule` replaces the whole tree, read from the chain again as on making a gate; `schedule: null` and `refusal_message: null` clear them; `brands`, `apps`, `discord_roles` and `telegram_groups` each replace their list: a role or group kept on the list keeps its people and takes the new settings, and one taken off stops being managed (whoever holds the role or is in the group keeps it). A gate belongs to one brand: `brands` may name only that brand (every app of it), and `apps`, `discord_roles` and `telegram_groups` only its apps and the servers and groups connected to it (400 at the field otherwise, naming both brands). A gate never moves to another brand: make one there instead. The next sign-in or refresh at an app it applies to checks the change. Needs `org.tokenGates.edit`. Changing its rule or schedule, or naming brands, apps, Discord roles or Telegram groups it didn't have, also wants a plan with token gating (403 `plan_feature_unavailable`), so an org that moved to a plan without it can still rename one, clear its message, empty its lists, turn it off or delete it. Recorded as `token_gate.updated`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The gate's name, for the org's people: people signing in see the token's"},"rule":{"$ref":"#/components/schemas/TokenGateRule"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/TokenGateSchedule"},{"type":"null"}],"description":"When it applies, or null to clear it: it applies always"},"refusal_message":{"anyOf":[{"type":"string","description":"Your own words, shown first where the gate refuses someone, above Synq's explanation of what they lack: plain text, at most 500 characters and 5 lines, never made into links. `null` clears it","example":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass."},{"type":"null"}],"description":"What the person it refuses reads, or null for the default"},"brands":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50,"description":"The gate's own brand (`brd_…`), to apply to every app of it; no other brand. Replaces the list"},"apps":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":50,"description":"Apps of the gate's brand, by client_id, it applies to. Replaces the list"},"discord_roles":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateDiscordRoleInput"},"maxItems":25,"description":"Discord roles of the org's connected servers it gives, at most 25. Replaces the list"},"telegram_groups":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateTelegramGroupInput"},"maxItems":25,"description":"Telegram groups the org connected that it lets people into, at most 25. Replaces the list"}},"additionalProperties":false},"example":{"name":"Acme","rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","min_amount":"1000","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"America/New_York","all_day":false,"starts":"2026-10-10T09:00","ends":"2026-10-10T17:00","outside":"refuse"},"refusal_message":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass.","brands":["string"],"apps":["string"],"discord_roles":[{"server":"dsv_01h455vb4pex5vsknk084sn02q","role":"1187390245566001234","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}],"telegram_groups":[{"group":"tgg_01h455vb4pex5vsknk084sn02q","on_lost":"mute","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}]}}}},"responses":{"200":{"description":"The token gate, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating for the change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, brand or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Turning on a gate that reads a chain where this API reads none, an app that would read more than 40 conditions from the chain, or a Discord role or Telegram group added where this API has no bot for it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A new rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteBrandTokenGate","summary":"Delete a token gate","description":"The apps it applied to let people in without it from the next sign-in. Needs `org.tokenGates.edit`. Recorded as `token_gate.deleted`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, brand or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/token-gates/{gate}/enable":{"post":{"operationId":"enableBrandTokenGate","summary":"Enable a token gate","description":"Turns a token gate on, with its rule, schedule and targets as they are: the next sign-in or refresh at an app it applies to checks it. Its rule's chains are checked again (400), and a rule that reads a chain needs an API that reads one (409 `token_gates_unavailable`). Needs `org.tokenGates.edit` and a plan with token gating (403 `plan_feature_unavailable`). Recorded as `token_gate.updated`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The token gate, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating for the change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, brand or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Turning on a gate that reads a chain where this API reads none, an app that would read more than 40 conditions from the chain, or a Discord role or Telegram group added where this API has no bot for it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A new rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/token-gates/{gate}/disable":{"post":{"operationId":"disableBrandTokenGate","summary":"Disable a token gate","description":"Turns a token gate off: sign-ins no longer check it, and its rule, schedule and targets stay as they are. An org whose plan no longer has token gating can still turn one off. Needs `org.tokenGates.edit`. Recorded as `token_gate.updated`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The token gate, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating for the change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, brand or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Turning on a gate that reads a chain where this API reads none, an app that would read more than 40 conditions from the chain, or a Discord role or Telegram group added where this API has no bot for it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A new rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/brands/{brand}/token-gates/check":{"post":{"operationId":"checkBrandTokenGate","summary":"Test a token gate or a draft rule","description":"Checks a gate (`gate`, one of the brand’s), or a rule not saved yet (`rule`, with an optional `schedule`), against wallets (`wallets`, at most 10 addresses) or a user's wallets in a brand (`user` and `brand`, which on this route is the path’s brand and may be left out), as a sign-in would, at `at` (an ISO time, for the window and the end of every activity condition's days; now when left out), with what was read in the last minute unless `fresh`. Answers what each condition came to, how many reads it cost, and the refusal page's words for it, worded by what the gate does (`goal`: its saved targets, or `brands`, `apps`, `discord_roles` and `telegram_groups` as given). A draft is read from the chain as saving it would read it (400 at the path of what isn't what its condition says, 503 when the chain can't say), so it is tested as the gate it would be. Saves nothing. Wants the org's plan to have token gating (`auth.token_gating`, 403 `plan_feature_unavailable` otherwise), since every test may read the chain through Synq's own key. Needs `org.tokenGates.view`, and `org.users.view` to test a user, which is recorded as `user.token_gate_dry_run` (a test against addresses reads only public chain data, and isn't). Limited per org (`token_gate.dry_runs`), and reads the chain from the org's own budget (`token_gate.org_reads`), never a brand's sign-ins'.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^brd_[0-9a-hjkmnp-tv-z]{26}$","description":"The brand's id","example":"brd_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The brand's id","name":"brand","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gate":{"type":"string","maxLength":64,"description":"A gate of the org (`tkg_…`) to test as it is saved"},"rule":{"$ref":"#/components/schemas/TokenGateRule"},"schedule":{"$ref":"#/components/schemas/TokenGateSchedule"},"wallets":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":10,"description":"Wallet addresses to test, in place of a user"},"user":{"type":"string","maxLength":64,"description":"A user (`usr_…`) whose wallets in `brand` to test"},"brand":{"type":"string","maxLength":64,"description":"The user's brand (`brd_…`)"},"at":{"type":"string","format":"date-time","description":"When to judge the window at; now when left out"},"fresh":{"type":"boolean","description":"Read the chain again, past what was read in the last minute"},"brands":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50,"description":"Brands (`brd_…`) the gate would apply to, for its words: with `apps`, `discord_roles` and `telegram_groups`, what the test says passing gets someone. Left out with all three, a saved gate is worded by where it applies, and a draft as applying nowhere"},"apps":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":50,"description":"Apps, by client_id, the gate would apply to, for its words"},"discord_roles":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateDiscordRoleInput"},"maxItems":25,"description":"Discord roles the gate would give, as a gate takes them, for its words. Nothing is checked or kept"},"telegram_groups":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateTelegramGroupInput"},"maxItems":25,"description":"Telegram groups the gate would let people into, as a gate takes them, for its words"}},"additionalProperties":false},"example":{"gate":"string","rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","min_amount":"1000","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"America/New_York","all_day":false,"starts":"2026-10-10T09:00","ends":"2026-10-10T17:00","outside":"refuse"},"wallets":["string"],"user":"string","brand":"string","at":"2026-10-21T12:00:00.000Z","fresh":true,"brands":["string"],"apps":["string"],"discord_roles":[{"server":"dsv_01h455vb4pex5vsknk084sn02q","role":"1187390245566001234","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}],"telegram_groups":[{"group":"tgg_01h455vb4pex5vsknk084sn02q","on_lost":"mute","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}]}}}},"responses":{"200":{"description":"What the gate came to","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGateDryRun"},"example":{"result":"refused","schedule_state":"upcoming","wallets":["string"],"tree":{"type":"all","path":"root.conditions.1","status":"met","checked":true,"conditions":[{"type":"token","path":"root.conditions.1","status":"met","checked":true,"held":"250.5","decimals":0,"count":1,"until":"2026-11-21T14:03:12.000Z","capped":true,"owned":true,"listed":true}],"until":"2026-11-21T14:03:12.000Z"},"reads":0,"cached":0,"goal":"get Holder in the Acme Discord","explanation":["To get Holder in the Acme Discord, you need all of these:","  At least 1,000 USDC - You hold 250 across your wallets"]}}}},"400":{"description":"A rule, wallet, user or brand that is not valid, or a token, collection or NFT a draft names that is not what its condition says","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.view (or org.users.view to test a user), or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, brand or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This API reads no chain","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A draft's tokens and NFTs couldn't be read from the chain just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/token-gates":{"get":{"operationId":"listTokenGates","summary":"List an org's token gates","description":"Every gate of every brand of the org, on or off, with its brand and where it applies. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand. Needs `org.tokenGates.view`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its token gates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGateList"},"example":{"data":[{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":null,"chain":null,"mint":null,"min_amount":null,"wallets":null,"label":null,"display":null}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string","chains":["solana:mainnet"]}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createTokenGate","summary":"Gate sign-in on what wallets hold","description":"A gate in one brand of the org on the brand itself, its apps, its Discord roles, its Telegram groups, or any mix: signing in to one of its apps, the person's wallets must meet its `rule`, or a page tells them why not (with `refusal_message` first) and the app gets `access_denied`. That holds however they signed in: someone who signed in with email or a social account and has no wallet on their account that meets it is stopped there too, and on the brand's own apps, where it offers wallets as a way in, the page lets them add the wallet that holds it. A gate belongs to one brand: `brands` may name only that brand (every app of it), and `apps`, `discord_roles` and `telegram_groups` only its apps and the servers and groups connected to it (400 at the field otherwise, naming both brands). A gate never moves to another brand: make one there instead. The gate's brand is `brand`, else its first target's, else the org's default brand. `rule` is a tree of `all` and `any` groups (at most 3 deep, each with 1 to 20 children, 20 conditions in all) of conditions on the wallets on the person's account in the brand: `token` (hold at least `min_amount` of a mint, every account and compressed balance of it counted), `collection` (hold at least `min_count` NFTs of a verified Core or Token Metadata collection, compressed and Core NFTs included), `nft` (hold one NFT), `allowlist` (have a wallet on a list of at most 1000 addresses a gate, never shown to anyone), `program_activity` (at least `min_count` successful transactions in the last `window_days` days that ran a program, signed by a wallet of theirs unless `role: any`) and `address_activity` (as many with an address, by who signed them: `direction` `sent`, `received` or `either`). An activity condition asks for 1 to 100 transactions in 1 to 90 days (on `solana:devnet`, at most 14, as far back as its history is read), counts each transaction once however many of the person's wallets are in it, and reads each wallet's newest 1000 successful transactions in the window at most, and as many it is in only through a compressed token account (compressed tokens and compressed NFTs count, as uncompressed ones do); its window slides, so a check that meets one says `until` when it lapses. `token`, `collection` and the activity conditions count every wallet together (`wallets: combined`, the default) or one alone (`single`). Each condition names its `chain`, which must be one this API reads (the list's `chains`) unless it is an allowlist. Synq reads every token, collection, NFT and program the rule names from the chain as it is written (400 for one that isn't what its condition says, at its path, such as `rule.root.conditions.1.collection`, or for an activity address that is a program; 503 when the chain can't be read), once nothing else in the request is wrong and from the org's own reads (`token_gate.org_reads`, as its dry runs; 429 once they're spent), and keeps their names as each condition's `display`. `schedule` is an optional window in an IANA time zone, open at one end or both, with what happens `outside` it: `let_in` (the gate doesn't apply) or `refuse` (the app is closed to everyone). A sign-in reads at most 40 conditions from the chain across every enabled gate on an app (409 `conflict` naming the app otherwise). `discord_roles` names roles in the brand's connected Discord servers (Communities): Synq's bot gives the role to people whose wallets meet the rule once they verify, and takes it back, never the person, from someone who stops qualifying once the grace period ends. Each role is read from Discord as it is added (400 at `discord_roles.0.role` when the bot can't give it, with the fix; 409 `discord_unavailable` where this API has no Discord bot). `telegram_groups` names the brand's connected Telegram groups: the bot approves join requests from people who qualify, and mutes (`on_lost: mute`, the default, supergroups only) or removes (`remove`) those who stop. A role or group follows one gate (400 naming the gate that has it). Everyone each lets in is checked again every `recheck_seconds` (6 hours by default) and keeps access `grace_seconds` (24 hours by default) after a check finds they stopped; a check that can't read the chain keeps their access. Gates are checked at every sign-in and on every refresh, where a refusal or a closed window ends the app's grant (`invalid_grant`), so access ends within one access token's life; what can't be read refuses a sign-in, and answers a refresh 503 `temporarily_unavailable` with the grant kept. What wallets hold is kept for a minute. Every check is recorded as `user.token_gate_checked`. At most 100 gates per org, across its brands. Needs `org.tokenGates.edit`, a plan with token gating (403 `plan_feature_unavailable` otherwise, naming the plan in `required_plan`) and, for a rule that reads a chain, an API that reads one (409 `token_gates_unavailable` otherwise). A gate is on once made: make it with no brands or apps for one that applies nowhere yet, and `POST …/disable` turns one off. Recorded as `token_gate.created`, in the brand. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The gate's name, for the org's people: people signing in see the token's"},"rule":{"$ref":"#/components/schemas/TokenGateRule"},"schedule":{"$ref":"#/components/schemas/TokenGateSchedule"},"refusal_message":{"type":"string","description":"Your own words, shown first where the gate refuses someone, above Synq's explanation of what they lack: plain text, at most 500 characters and 5 lines, never made into links. `null` clears it","example":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass."},"brands":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50,"description":"The gate's own brand (`brd_…`), to apply to every app of it; no other brand. Replaces the list"},"apps":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":50,"description":"Apps of the gate's brand, by client_id, it applies to. Replaces the list"},"discord_roles":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateDiscordRoleInput"},"maxItems":25,"description":"Discord roles of the org's connected servers it gives, at most 25. Replaces the list"},"telegram_groups":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateTelegramGroupInput"},"maxItems":25,"description":"Telegram groups the org connected that it lets people into, at most 25. Replaces the list"},"brand":{"type":"string","maxLength":64,"description":"The brand the gate belongs to (`brd_…`). Left out, it is its first target's brand (in `brands`, then `apps`, `discord_roles` and `telegram_groups`), or the org's default brand when it names none","example":"brd_01h455vb4pex5vsknk084sn02q"}},"required":["name","rule"],"additionalProperties":false},"example":{"name":"Acme","rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","min_amount":"1000","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"America/New_York","all_day":false,"starts":"2026-10-10T09:00","ends":"2026-10-10T17:00","outside":"refuse"},"refusal_message":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass.","brands":["string"],"apps":["string"],"discord_roles":[{"server":"dsv_01h455vb4pex5vsknk084sn02q","role":"1187390245566001234","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}],"telegram_groups":[{"group":"tgg_01h455vb4pex5vsknk084sn02q","on_lost":"mute","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}],"brand":"brd_01h455vb4pex5vsknk084sn02q"}}}},"responses":{"201":{"description":"The token gate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org has 100 token gates already, an app would read more than 40 conditions from the chain, this API reads no chain, or it has no bot for a Discord role or Telegram group named","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"The rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/token-gates/{gate}":{"get":{"operationId":"getTokenGate","summary":"Read a token gate","description":"Any gate of the org, with its brand. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand. Needs `org.tokenGates.view`.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"responses":{"200":{"description":"The token gate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateTokenGate","summary":"Change a token gate","description":"Its name, rule, schedule, message, or where it applies in its brand; turning it on or off is `POST …/enable` and `…/disable`. `rule` replaces the whole tree, read from the chain again as on making a gate; `schedule: null` and `refusal_message: null` clear them; `brands`, `apps`, `discord_roles` and `telegram_groups` each replace their list: a role or group kept on the list keeps its people and takes the new settings, and one taken off stops being managed (whoever holds the role or is in the group keeps it). A gate belongs to one brand: `brands` may name only that brand (every app of it), and `apps`, `discord_roles` and `telegram_groups` only its apps and the servers and groups connected to it (400 at the field otherwise, naming both brands). A gate never moves to another brand: make one there instead. The next sign-in or refresh at an app it applies to checks the change. Needs `org.tokenGates.edit`. Changing its rule or schedule, or naming brands, apps, Discord roles or Telegram groups it didn't have, also wants a plan with token gating (403 `plan_feature_unavailable`), so an org that moved to a plan without it can still rename one, clear its message, empty its lists, turn it off or delete it. Recorded as `token_gate.updated`. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The gate's name, for the org's people: people signing in see the token's"},"rule":{"$ref":"#/components/schemas/TokenGateRule"},"schedule":{"anyOf":[{"$ref":"#/components/schemas/TokenGateSchedule"},{"type":"null"}],"description":"When it applies, or null to clear it: it applies always"},"refusal_message":{"anyOf":[{"type":"string","description":"Your own words, shown first where the gate refuses someone, above Synq's explanation of what they lack: plain text, at most 500 characters and 5 lines, never made into links. `null` clears it","example":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass."},{"type":"null"}],"description":"What the person it refuses reads, or null for the default"},"brands":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50,"description":"The gate's own brand (`brd_…`), to apply to every app of it; no other brand. Replaces the list"},"apps":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":50,"description":"Apps of the gate's brand, by client_id, it applies to. Replaces the list"},"discord_roles":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateDiscordRoleInput"},"maxItems":25,"description":"Discord roles of the org's connected servers it gives, at most 25. Replaces the list"},"telegram_groups":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateTelegramGroupInput"},"maxItems":25,"description":"Telegram groups the org connected that it lets people into, at most 25. Replaces the list"}},"additionalProperties":false},"example":{"name":"Acme","rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","min_amount":"1000","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"America/New_York","all_day":false,"starts":"2026-10-10T09:00","ends":"2026-10-10T17:00","outside":"refuse"},"refusal_message":"Acme Club is for holders of the Acme pass. Get one at acme.example/pass.","brands":["string"],"apps":["string"],"discord_roles":[{"server":"dsv_01h455vb4pex5vsknk084sn02q","role":"1187390245566001234","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}],"telegram_groups":[{"group":"tgg_01h455vb4pex5vsknk084sn02q","on_lost":"mute","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}]}}}},"responses":{"200":{"description":"The token gate, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating for the change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Turning on a gate that reads a chain where this API reads none, an app that would read more than 40 conditions from the chain, or a Discord role or Telegram group added where this API has no bot for it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A new rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteTokenGate","summary":"Delete a token gate","description":"The apps it applied to let people in without it from the next sign-in. Needs `org.tokenGates.edit`. Recorded as `token_gate.deleted`. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/token-gates/{gate}/enable":{"post":{"operationId":"enableTokenGate","summary":"Enable a token gate","description":"Turns a token gate on, with its rule, schedule and targets as they are: the next sign-in or refresh at an app it applies to checks it. Its rule's chains are checked again (400), and a rule that reads a chain needs an API that reads one (409 `token_gates_unavailable`). Needs `org.tokenGates.edit` and a plan with token gating (403 `plan_feature_unavailable`). Recorded as `token_gate.updated`. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The token gate, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating for the change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Turning on a gate that reads a chain where this API reads none, an app that would read more than 40 conditions from the chain, or a Discord role or Telegram group added where this API has no bot for it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A new rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/token-gates/{gate}/disable":{"post":{"operationId":"disableTokenGate","summary":"Disable a token gate","description":"Turns a token gate off: sign-ins no longer check it, and its rule, schedule and targets stay as they are. An org whose plan no longer has token gating can still turn one off. Needs `org.tokenGates.edit`. Recorded as `token_gate.updated`. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tkg_[0-9a-hjkmnp-tv-z]{26}$","description":"The token gate's id","example":"tkg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The token gate's id","name":"gate","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The token gate, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGate"},"example":{"id":"tkg_01h455vb4pex5vsknk084sn02q","brand":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme holders","enabled":true,"rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"string","min_amount":"string","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"string","all_day":true,"starts":"string","ends":"string","outside":"let_in","starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","state":"in_effect"},"refusal_message":"string","summary":"All of: At least 1,000 USDC; One of (At least 3 NFTs from Mad Lads; The NFT Mad Lad #42)","brands":["brd_01h455vb4pex5vsknk084sn02q"],"apps":["app_01h455vb4pex5vsknk084sn02q"],"discord_roles":[{"server":"string","server_name":"Mollyverse","role":"string","role_name":"MDP Holder","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"telegram_groups":[{"group":"string","title":"RODAI Holders","on_lost":"mute","grace_seconds":0,"recheck_seconds":0,"existing_members":"verify","adopt_by":"2026-10-21T12:00:00.000Z","adoption":{"state":"none","verify_by":"2026-10-21T12:00:00.000Z","counted":0,"unverified":0,"member_listing":"full","problem":"members_intent","problem_detail":"string"}}],"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A rule, schedule, message, brand or app that is not valid, or a target of another brand than the gate's","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.edit, or the org's plan has no token gating for the change","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Turning on a gate that reads a chain where this API reads none, an app that would read more than 40 conditions from the chain, or a Discord role or Telegram group added where this API has no bot for it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A new rule's tokens and NFTs couldn't be read from the chain just now, or Discord didn't answer about a role","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/token-gates/check":{"post":{"operationId":"checkTokenGate","summary":"Test a token gate or a draft rule","description":"Checks a gate (`gate`), or a rule not saved yet (`rule`, with an optional `schedule`), against wallets (`wallets`, at most 10 addresses) or a user's wallets in a brand (`user` and `brand`), as a sign-in would, at `at` (an ISO time, for the window and the end of every activity condition's days; now when left out), with what was read in the last minute unless `fresh`. Answers what each condition came to, how many reads it cost, and the refusal page's words for it, worded by what the gate does (`goal`: its saved targets, or `brands`, `apps`, `discord_roles` and `telegram_groups` as given). A draft is read from the chain as saving it would read it (400 at the path of what isn't what its condition says, 503 when the chain can't say), so it is tested as the gate it would be. Saves nothing. Wants the org's plan to have token gating (`auth.token_gating`, 403 `plan_feature_unavailable` otherwise), since every test may read the chain through Synq's own key. Needs `org.tokenGates.view`, and `org.users.view` to test a user, which is recorded as `user.token_gate_dry_run` (a test against addresses reads only public chain data, and isn't). Limited per org (`token_gate.dry_runs`), and reads the chain from the org's own budget (`token_gate.org_reads`), never a brand's sign-ins'. Kept for callers of the org's own routes from before gates belonged to a brand: `/v1/orgs/{org}/brands/{brand}/token-gates` does the same within one brand.","security":[{"bearer":[]}],"x-permission":"org.tokenGates.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gate":{"type":"string","maxLength":64,"description":"A gate of the org (`tkg_…`) to test as it is saved"},"rule":{"$ref":"#/components/schemas/TokenGateRule"},"schedule":{"$ref":"#/components/schemas/TokenGateSchedule"},"wallets":{"type":"array","items":{"type":"string","maxLength":64},"minItems":1,"maxItems":10,"description":"Wallet addresses to test, in place of a user"},"user":{"type":"string","maxLength":64,"description":"A user (`usr_…`) whose wallets in `brand` to test"},"brand":{"type":"string","maxLength":64,"description":"The user's brand (`brd_…`)"},"at":{"type":"string","format":"date-time","description":"When to judge the window at; now when left out"},"fresh":{"type":"boolean","description":"Read the chain again, past what was read in the last minute"},"brands":{"type":"array","items":{"type":"string","maxLength":64},"maxItems":50,"description":"Brands (`brd_…`) the gate would apply to, for its words: with `apps`, `discord_roles` and `telegram_groups`, what the test says passing gets someone. Left out with all three, a saved gate is worded by where it applies, and a draft as applying nowhere"},"apps":{"type":"array","items":{"type":"string","maxLength":512},"maxItems":50,"description":"Apps, by client_id, the gate would apply to, for its words"},"discord_roles":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateDiscordRoleInput"},"maxItems":25,"description":"Discord roles the gate would give, as a gate takes them, for its words. Nothing is checked or kept"},"telegram_groups":{"type":"array","items":{"$ref":"#/components/schemas/TokenGateTelegramGroupInput"},"maxItems":25,"description":"Telegram groups the gate would let people into, as a gate takes them, for its words"}},"additionalProperties":false},"example":{"gate":"string","rule":{"version":1,"root":{"type":"all","conditions":[{"type":"token","chain":"solana:mainnet","mint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","min_amount":"1000","wallets":"combined","label":"USDC","display":{"name":"Acme","symbol":"string","decimals":0,"image":"string"}}]}},"schedule":{"timezone":"America/New_York","all_day":false,"starts":"2026-10-10T09:00","ends":"2026-10-10T17:00","outside":"refuse"},"wallets":["string"],"user":"string","brand":"string","at":"2026-10-21T12:00:00.000Z","fresh":true,"brands":["string"],"apps":["string"],"discord_roles":[{"server":"dsv_01h455vb4pex5vsknk084sn02q","role":"1187390245566001234","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}],"telegram_groups":[{"group":"tgg_01h455vb4pex5vsknk084sn02q","on_lost":"mute","grace_seconds":86400,"recheck_seconds":21600,"existing_members":"verify"}]}}}},"responses":{"200":{"description":"What the gate came to","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenGateDryRun"},"example":{"result":"refused","schedule_state":"upcoming","wallets":["string"],"tree":{"type":"all","path":"root.conditions.1","status":"met","checked":true,"conditions":[{"type":"token","path":"root.conditions.1","status":"met","checked":true,"held":"250.5","decimals":0,"count":1,"until":"2026-11-21T14:03:12.000Z","capped":true,"owned":true,"listed":true}],"until":"2026-11-21T14:03:12.000Z"},"reads":0,"cached":0,"goal":"get Holder in the Acme Discord","explanation":["To get Holder in the Acme Discord, you need all of these:","  At least 1,000 USDC - You hold 250 across your wallets"]}}}},"400":{"description":"A rule, wallet, user or brand that is not valid, or a token, collection or NFT a draft names that is not what its condition says","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.tokenGates.view (or org.users.view to test a user), or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org or token gate, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This API reads no chain","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A draft's tokens and NFTs couldn't be read from the chain just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers":{"get":{"operationId":"listDiscordServers","summary":"List the Discord servers an org connected","description":"Every server the org connected for its token gates' roles, with how many roles its gates give there and how many people Synq manages, and the bot that serves the org on Discord. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its Discord servers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordServerList"},"example":{"data":[{"id":"dsv_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","guild_id":"1093847562019384756","name":"Mollyverse","icon_url":"https://app.acme.example","status":"connected","verify_channel_id":"string","verified_channel_id":"string","own_bot":true,"invite_url":"https://discord.gg/mollyverse","listed":true,"listed_by":"brand","counts":{"roles":0,"gated":true,"managed":0},"connected_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string","bot":{"id":"1093847562019384756","name":"Synq","username":"SynqBot","own":true}}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}":{"get":{"operationId":"getDiscordServer","summary":"Read a connected Discord server","description":"Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"}],"responses":{"200":{"description":"The server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordServer"},"example":{"id":"dsv_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","guild_id":"1093847562019384756","name":"Mollyverse","icon_url":"https://app.acme.example","status":"connected","verify_channel_id":"string","verified_channel_id":"string","own_bot":true,"invite_url":"https://discord.gg/mollyverse","listed":true,"listed_by":"brand","counts":{"roles":0,"gated":true,"managed":0},"connected_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"disconnectDiscordServer","summary":"Disconnect a Discord server","description":"Takes the bot out of the server and stops every role the org's gates give there, from now on: whoever holds one keeps it, and nobody is checked there again. Connecting it again starts afresh. Needs `org.integrations.edit`. Recorded as `discord_server.disconnected`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"}],"responses":{"204":{"description":"Disconnected"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateDiscordServer","summary":"Change a connected Discord server","description":"Changes what is sent and keeps the rest. `verify_channel`: the channel Synq's bot keeps its “Verify with Synq” message in. The bot posts it there, or edits it in place when it is there already, and deletes the one it left in another channel. Its button starts each member's verification; it ends “Powered by Synq” as the brand's pages do. The bot needs View Channel, Send Messages and Embed Links in the channel (400 at `verify_channel` with the fix; 409 `discord_unavailable` on an API with no Discord bot). `invite_url`: an invite link for the member profile's Join button (null removes it). `listed`: whether the brand's member profile lists the server (null lists it): only with a way in, an invite link, so `true` with none is refused (400 at `listed`, with the fix), and a server whose link is removed stops showing until it has one again. `verified_channel`: where verified members go, a text channel of the server, usually one the gated roles unlock. Once a role is given, the member profile's Back to Discord opens it, and the bot's “You're verified” direct message links to it; null opens the server itself. The bot needn't post there (400 at `verified_channel` for a text channel the server doesn't have). Needs `org.integrations.edit`. Recorded as `discord_server.updated` with the fields changed.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verify_channel":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"A text channel's Discord id","example":"1187390245566009876"},"verified_channel":{"anyOf":[{"type":"string","pattern":"^[1-9][0-9]{16,19}$"},{"type":"null"}],"description":"Where verified members go: a text channel's Discord id, usually one the gated roles unlock; null: the server itself","example":"1187390245566009877"},"invite_url":{"anyOf":[{"type":"string","pattern":"^https:\\/\\/(discord\\.gg|discord\\.com\\/invite|discordapp\\.com\\/invite)\\/[A-Za-z0-9-]{2,32}$"},{"type":"null"}],"description":"An invite link to the server (`https://discord.gg/…` or `https://discord.com/invite/…`), for the member profile; null removes it","example":"https://discord.gg/mollyverse"},"listed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the brand's member profile lists the server, which it does only with an invite link; null lists it once it has one"}},"additionalProperties":false},"example":{"verify_channel":"1187390245566009876","verified_channel":"1187390245566009877","invite_url":"https://discord.gg/mollyverse","listed":true}}}},"responses":{"200":{"description":"The server, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordServer"},"example":{"id":"dsv_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","guild_id":"1093847562019384756","name":"Mollyverse","icon_url":"https://app.acme.example","status":"connected","verify_channel_id":"string","verified_channel_id":"string","own_bot":true,"invite_url":"https://discord.gg/mollyverse","listed":true,"listed_by":"brand","counts":{"roles":0,"gated":true,"managed":0},"connected_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A channel that isn't one, or one the bot can't post in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The bot is no longer in the server, or this API has no Discord bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Discord didn’t answer just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups":{"get":{"operationId":"listTelegramGroups","summary":"List the Telegram groups an org connected","description":"Every group the org connected for its token gates, with the bot's rights there, whether it is the group's guard bot and how many people Synq manages, and the bot that serves the org on Telegram. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its Telegram groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupList"},"example":{"data":[{"id":"tgg_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","chat_id":"-1001234567890","title":"RODAI Holders","username":"string","kind":"group","status":"connected","guard_bot":true,"rights":{"invite_users":true,"restrict_members":true,"pin_messages":true},"member_count":0,"invite_link":"string","own_bot":true,"listed":true,"listed_by":"brand","counts":{"roles":0,"gated":true,"managed":0},"checked_at":"2026-10-21T12:00:00.000Z","connected_at":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string","bot":{"id":"1093847562019384756","name":"Synq","username":"SynqBot","own":true}}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}":{"get":{"operationId":"getTelegramGroup","summary":"Read a connected Telegram group","description":"Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"responses":{"200":{"description":"The group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroup"},"example":{"id":"tgg_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","chat_id":"-1001234567890","title":"RODAI Holders","username":"string","kind":"group","status":"connected","guard_bot":true,"rights":{"invite_users":true,"restrict_members":true,"pin_messages":true},"member_count":0,"invite_link":"string","own_bot":true,"listed":true,"listed_by":"brand","counts":{"roles":0,"gated":true,"managed":0},"checked_at":"2026-10-21T12:00:00.000Z","connected_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"disconnectTelegramGroup","summary":"Disconnect a Telegram group","description":"Takes the bot out of the group and stops the org's gate there, from now on: whoever is in it stays, a muted person stays muted until an admin lifts it, and join requests wait for the group's other admins. Needs `org.integrations.edit`. Recorded as `telegram_group.disconnected`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"responses":{"204":{"description":"Disconnected"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateTelegramGroup","summary":"Change a connected Telegram group","description":"Changes what is sent and keeps the rest. `listed`: whether the brand's member profile lists the group under Communities (null lists it): only with a way in, a public username, or join requests because a gate lets people in, so `true` with none is refused (400 at `listed`, with the fix). Needs `org.integrations.edit`. Recorded as `telegram_group.updated` with the fields changed.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"listed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the brand's member profile lists the group, which it does only with a public way in; null lists it once it has one"}},"additionalProperties":false},"example":{"listed":true}}}},"responses":{"200":{"description":"The group, changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroup"},"example":{"id":"tgg_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","chat_id":"-1001234567890","title":"RODAI Holders","username":"string","kind":"group","status":"connected","guard_bot":true,"rights":{"invite_users":true,"restrict_members":true,"pin_messages":true},"member_count":0,"invite_link":"string","own_bot":true,"listed":true,"listed_by":"brand","counts":{"roles":0,"gated":true,"managed":0},"checked_at":"2026-10-21T12:00:00.000Z","connected_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/integrations/activity":{"get":{"operationId":"listIntegrationActivity","summary":"Read what Synq did in the org’s Discord servers and Telegram groups","description":"Newest first: people checked for a role or a group (`user.token_gate_checked` with `at` `discord` or `telegram`), members recognized with no link because their account was linked at the brand already (`discord_role.recognized`, `telegram_member.recognized`), roles given and removed, join requests approved and declined, people muted and removed, people an admin banned, whom Synq leaves as they are (`telegram_member.banned_by_admin`), people an admin muted, whom Synq never unmutes (`telegram_member.muted_by_admin`), failures with their fix, and servers and groups connected and disconnected. Each row is an audit row, as webhooks get it, and never holds a wallet address. `kind` keeps one of the dashboard's filters. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"},{"schema":{"type":"string","enum":["verified","refused","granted","removed","failed","connections"],"description":"`verified` (checks passed, and members recognized), `refused`, `granted` (roles given, requests approved, people unmuted), `removed` (removals scheduled and done, mutes, declined requests), `failed` or `connections`; every row when left out"},"required":false,"description":"`verified` (checks passed, and members recognized), `refused`, `granted` (roles given, requests approved, people unmuted), `removed` (removals scheduled and done, mutes, declined requests), `failed` or `connections`; every row when left out","name":"kind","in":"query"}],"responses":{"200":{"description":"A page of activity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationActivityPage"},"example":{"data":[{"id":"aud_01h455vb4pex5vsknk084sn02q","created_at":"2026-10-21T12:00:00.000Z","action":"org.updated","actor":{"type":"member","id":"usr_01h455vb4pex5vsknk084sn02q"},"act_client_id":"string","approval_id":"string","brand_id":"brd_01h455vb4pex5vsknk084sn02q","resource":{"type":"org","id":"org_01h455vb4pex5vsknk084sn02q"},"metadata":{},"ip":"string","user_agent":"string"}],"next_cursor":"string"}}}},"400":{"description":"A kind, limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/install":{"post":{"operationId":"installDiscordBot","summary":"Start adding Synq’s bot to a Discord server","description":"A link to Discord's own install screen for Synq's bot, good for 15 minutes and once: Discord asks the person which server, and shows what the bot may do there (Manage Roles, View Channels, Send Messages, Embed Links and Pin Messages; adding a bot takes Manage Server there). Discord then sends them to the API, which connects the server to the org for `brand` (fixed from then on: its members verify on its hosted pages and become its users) and sends them back to the dashboard at `return_path` with `discord` set to `connected` (and `server`), `cancelled`, `taken` (another org has it), `full` (the org has 25), `expired` (the link sat past its 15 minutes), `used` (it was used already) or `failed`. Members verify on the brand's hosted pages: they sign in the way they already do, link Discord on their member profile and show what they hold with Solana wallets, so the brand must offer wallets (400 at `brand` with the fix); it needn't offer Discord sign-in. Needs `org.integrations.edit` and a plan with token gating (403 `plan_feature_unavailable`). Recorded as `discord_server.connected` when it comes back.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","maxLength":64,"description":"The brand (`brd_…`) whose hosted pages members verify on"},"return_path":{"type":"string","maxLength":512,"description":"Where on the dashboard to come back to: a path, such as `/orgs/acme/integrations`","example":"/orgs/acme/integrations"},"own_bot":{"type":"boolean","description":"Add the org's own Discord app (`PUT …/own-bots/discord`, Scale and up) rather than Synq's: its install screen, its name in the server. Left out: Synq's"}},"required":["brand"],"additionalProperties":false},"example":{"brand":"string","return_path":"/orgs/acme/integrations","own_bot":true}}}},"responses":{"201":{"description":"The install link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordInstall"},"example":{"url":"https://app.acme.example","expires_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A brand that is not valid, or one without wallets","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.integrations.edit, or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org has 25 Discord servers, or this API has no Discord bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/roles":{"get":{"operationId":"listDiscordServerRoles","summary":"Read a connected server's roles from Discord","description":"Every role of the server but @everyone, highest first, read from Discord now, with whether Synq's bot can give it, the fix when it can't, the org's gate that gives it already, and how many members hold it (`holders`, null without the Server Members intent). Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"The server's roles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordServerRoleList"},"example":{"data":[{"id":"1187390245566001234","name":"MDP Holder","color":0,"position":0,"managed":true,"assignable":true,"problem":"unknown_role","problem_detail":"Synq's role is below @MDP Holder in Server Settings → Roles. Drag Synq above it.","gate":{"id":"string","name":"Acme"},"holders":312,"holders_more":true}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The bot is no longer in the server, or this API has no Discord bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Discord didn’t answer just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/channels":{"get":{"operationId":"listDiscordServerChannels","summary":"Read a connected server's text channels from Discord","description":"The server's text channels, in Discord's order, read from Discord now, with whether Synq's bot can post its Verify message in each. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"The server's text channels","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordServerChannelList"},"example":{"data":[{"id":"string","name":"verify","position":0,"parent_id":"string","can_post":true,"can_pin":true}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The bot is no longer in the server, or this API has no Discord bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Discord didn’t answer just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/connect":{"post":{"operationId":"connectTelegramGroup","summary":"Start connecting a Telegram group","description":"A one-time code, good for 15 minutes, and the link that adds Synq's bot to a group as an admin and sends it there; `command` is the same for a bot already in the group. Only an admin of the group can connect it, and people verify on `brand`'s hosted pages: they sign in the way they already do, link Telegram on their member profile and show what they hold with wallets, so the brand must offer wallets (400 at `brand` with the fix otherwise); it needn't offer Telegram sign-in. Synq's bot reads the group and its own rights when the code arrives, and the group is recorded as `telegram_group.connected`. At most 25 groups per org. Needs `org.integrations.edit` and a plan with token gating (403 `plan_feature_unavailable`), and an API with a Telegram bot (409 `telegram_unavailable`).","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","maxLength":64,"description":"The brand people verify on (`brd_…`), and whose users they become: fixed once the group connects"},"return_path":{"type":"string","description":"The dashboard page that started it, for its own links"},"own_bot":{"type":"boolean","description":"Connect through the org's own Telegram bot (`PUT …/own-bots/telegram`, Scale and up) rather than Synq's: the code works only where that bot hears it. Left out: Synq's"}},"required":["brand"],"additionalProperties":false},"example":{"brand":"string","return_path":"string","own_bot":true}}}},"responses":{"201":{"description":"The code and the link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramConnectCode"},"example":{"code":"SYNQ-7KQ4R-2DXMP","link":"https://t.me/synq_robot?startgroup=SYNQ-7KQ4R-2DXMP&admin=invite_users+restrict_members+pin_messages","command":"/connect SYNQ-7KQ4R-2DXMP","bot":"synq_robot","expires_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A brand that is not valid, or that offers no wallets","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.integrations.edit, or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org has 25 Telegram groups already, or this API has no Telegram bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Telegram didn't answer about Synq's bot just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}/check":{"post":{"operationId":"checkTelegramGroup","summary":"Read a Telegram group again","description":"Reads the group's title and kind, whether Synq's bot is its guard bot, and the bot's rights there from Telegram now: after an admin changed them, or the group became a supergroup. A change is recorded as `telegram_group.updated`; a bot no longer in the group as `telegram_group.bot_removed`. Needs `org.integrations.edit`, and an API with a Telegram bot (409 `telegram_unavailable`).","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The group, as Telegram says now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroup"},"example":{"id":"tgg_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","chat_id":"-1001234567890","title":"RODAI Holders","username":"string","kind":"group","status":"connected","guard_bot":true,"rights":{"invite_users":true,"restrict_members":true,"pin_messages":true},"member_count":0,"invite_link":"string","own_bot":true,"listed":true,"listed_by":"brand","counts":{"roles":0,"gated":true,"managed":0},"checked_at":"2026-10-21T12:00:00.000Z","connected_at":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"This API has no Telegram bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Telegram didn't answer just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}/window":{"get":{"operationId":"getTelegramGroupWindow","summary":"A Telegram group's announced window","description":"The group's window: its settings (Synq's defaults for one never saved), its state, the topics Synq has seen, every reminder with when it goes, and the counts: verified, still to verify, and unknown to Synq, with the deadline's pacing. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"setTelegramGroupWindow","summary":"Set up a Telegram group's window","description":"Saves what is sent and keeps the rest: before announcing, any setting; after, only quiet hours, `name_unverified`, `message_reachable` and `headline` (409 for the rest: the deadline moves only later, with extend, and the countdown moves to another topic with move). What its messages call the brand’s members is the brand’s, `members_called` on `PATCH /v1/orgs/{org}/brands/{brand}/community-messages`. Answers the window with its schedule for these settings. The group needs a token gate that lets people in, with `existing_members: verify` (409 otherwise, with the fix). Needs `org.integrations.edit`. A change after announcing is recorded as `telegram_group.window_updated`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WindowSettingsInput"},"example":{"notice_days":365,"deadline_time":"18:00","time_zone":"America/New_York","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"Token gate: ROD.AI is becoming a home for holders and users of our products.","topic":4}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"400":{"description":"A setting that is not valid: a time zone Synq doesn’t know, a deadline in quiet hours, a topic Synq hasn’t seen, or a `topic_link` that isn’t to a message in one of the group’s topics","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"No gate lets people into the group, its gate leaves those already there alone, or a setting that is fixed once announced","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}/window/announce":{"post":{"operationId":"announceTelegramGroupWindow","summary":"Announce a Telegram group's window","description":"Reads the group and the bot's rights afresh, posts the announcement in the window's topic and pins it (without a notification), and starts the countdown: everyone already in the group, but its admins and bots, has until the deadline to verify. Takes the settings as `PUT …/window` does, saved first. The bot needs Pin messages and Ban users (409 with the fix). Synq posts it in the background (202), so the caller may go: the window answers `announce_queued_at` until it's posted, then `announced`, or `announce_failure` with the fix when nothing was posted; pressing it again meanwhile is the same announcement. What Synq knows without asking Telegram (no gate, announced already, the gate off) is refused at once. An API without a background runner posts at once (200). Recorded as `telegram_group.window_announced`, as who asked. Needs `org.integrations.edit`, a plan with token gating (403 `plan_feature_unavailable`) and an API with a Telegram bot (409 `telegram_unavailable`).","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WindowSettingsInput"},"example":{"notice_days":365,"deadline_time":"18:00","time_zone":"America/New_York","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"Token gate: ROD.AI is becoming a home for holders and users of our products.","topic":4}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"202":{"description":"The window, its announcement handed to the background (`announce_queued_at`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"400":{"description":"A setting that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.integrations.edit, or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Announced already, no gate lets people in, the bot lacks a right it needs, or this API has no Telegram bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Telegram didn't answer just now: nothing was posted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}/window/extend":{"post":{"operationId":"extendTelegramGroupWindow","summary":"Move a Telegram group's deadline later","description":"Moves the deadline to `ends_at`, which must be later than it is (it never moves earlier once announced), at most 365 days away and outside quiet hours. Synq posts one message saying so and edits the countdown, those still to verify get the new date, and the reminders follow it from now. Recorded as `telegram_group.window_extended`. Needs `org.integrations.edit`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ends_at":{"type":"string","format":"date-time","description":"The new deadline","example":"2027-12-07T23:00:00Z"}},"required":["ends_at"],"additionalProperties":false},"example":{"ends_at":"2027-12-07T23:00:00Z"}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"400":{"description":"A deadline that is earlier, too far away or in quiet hours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The window isn’t announced, or its deadline passed already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Telegram didn't answer just now: nothing changed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}/window/move":{"post":{"operationId":"moveTelegramGroupWindow","summary":"Move a Telegram group's countdown to another topic","description":"Moves an announced window to another topic of the forum, or General, until its deadline is done: `topic` is the new one at once, and every later reminder, name and the closing message goes there. Within a few minutes, outside the group's quiet hours, Synq posts the announcement again there, with its countdown and the Verify buttons, and pins it without a notification; then it unpins its countdown in the topic it left and edits that to one line pointing to the new one. `move` says what waits, and `move.waits_until` when quiet hours hold it. Moving back to where the countdown still is, before it moved, calls the move off. Recorded as `telegram_group.window_moved`. Needs `org.integrations.edit`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"anyOf":[{"type":"integer","minimum":2},{"type":"null"}],"description":"The forum topic to post and pin the countdown in, by Telegram's id, from `topics`; null: General. Send it or `topic_link`","example":4},"topic_link":{"type":"string","minLength":1,"maxLength":512,"description":"Any forum topic, by a link to a message in it, in place of `topic`: Telegram's Copy Link on a message in the topic, `https://t.me/c/<chat>/<topic>/<message>` or `https://t.me/<username>/<topic>/<message>`. For a topic not in `topics`, or one shown there without a name. Synq keeps the topic, and `topic` answers its id","example":"https://t.me/c/1234567890/5/1234"}},"additionalProperties":false,"example":{"topic_link":"https://t.me/c/1234567890/5/1234"}},"example":{"topic_link":"https://t.me/c/1234567890/5/1234"}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"400":{"description":"Neither `topic` nor `topic_link`, or both; a topic Synq hasn’t seen in the group; a link that isn’t to a message in one of its topics; or a topic in a group without topics","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The window isn’t announced, it’s closed or cancelled, no gate lets people in, the bot was removed, its countdown is being posted this moment, or this API has no Telegram bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}/window/pause":{"post":{"operationId":"pauseTelegramGroupWindow","summary":"Pause a Telegram group's reminders","description":"Stops the reminders, names and messages: the countdown and the deadline stay. Recorded as `telegram_group.window_paused`. Needs `org.integrations.edit`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The window isn’t announced, or its deadline passed already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/telegram-groups/{group}/window/resume":{"post":{"operationId":"resumeTelegramGroupWindow","summary":"Resume a Telegram group's reminders","description":"Starts the reminders again, from the next one: those that came due while paused are skipped. Recorded as `telegram_group.window_resumed`. Needs `org.integrations.edit`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^tgg_[0-9a-hjkmnp-tv-z]{26}$","description":"The Telegram group's id","example":"tgg_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Telegram group's id","name":"group","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramGroupWindow"},"example":{"group":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"message_reachable":true,"headline":"string","topic":0,"forum":true,"on_lost":"mute","topics":[{"id":0,"name":"Acme","closed":true}],"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","members_listed_at":"2026-10-21T12:00:00.000Z","members_list_complete":true,"closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","message_reachable":true,"names":true,"done":true}],"counts":{"members":0,"admins":0,"verified":0,"to_verify":0,"unknown":0,"settled":0},"deadline":{"per_minute":0,"minutes":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string","move":{"from_topic":0,"requested_at":"2026-10-21T12:00:00.000Z","waits_until":"2026-10-21T12:00:00.000Z"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The window isn’t announced, or its deadline passed already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/windows":{"get":{"operationId":"listDiscordRoleWindows","summary":"List a Discord server's role windows","description":"Every gated role of the server whose gate gives those already holding it time to verify (`existing_members: verify`), each with its announced window: its settings (Synq's defaults for one never saved), its state, every reminder with when it goes, and the counts of the role's holders. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"The windows","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordRoleWindowPage"},"example":{"data":[{"server":"string","role":"string","role_name":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"string","to":"string"},"name_unverified":true,"headline":"string","verify_channel":"string","listing":true,"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","names":true,"done":true}],"counts":{"holders":0,"verified":0,"to_verify":0,"settled":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string"}],"next_cursor":"string"}}}},"400":{"description":"A limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/roles/{role}/window":{"put":{"operationId":"setDiscordRoleWindow","summary":"Set up a Discord role's window","description":"Saves what is sent and keeps the rest: before announcing, any setting; after, only quiet hours, `name_unverified` and `headline` (409 for the rest: the deadline moves only later, with extend). What its messages call the brand’s members is the brand’s, `members_called` on `PATCH /v1/orgs/{org}/brands/{brand}/community-messages`. Answers the window with its schedule for these settings. A gate must give the role with `existing_members: verify` (409 otherwise, with the fix). Needs `org.integrations.edit`. A change after announcing is recorded as `discord_role.window_updated`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"The gated role's Discord id","example":"1187390245566009876"},"required":true,"description":"The gated role's Discord id","name":"role","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordWindowSettingsInput"},"example":{"notice_days":365,"deadline_time":"18:00","time_zone":"America/New_York","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"headline":"Token gate: ROD.AI is becoming a home for holders and users of our products."}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordRoleWindow"},"example":{"server":"string","role":"string","role_name":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"string","to":"string"},"name_unverified":true,"headline":"string","verify_channel":"string","listing":true,"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","names":true,"done":true}],"counts":{"holders":0,"verified":0,"to_verify":0,"settled":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string"}}}},"400":{"description":"A setting that is not valid: a time zone Synq doesn’t know, a deadline in quiet hours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"No gate gives the role, its gate leaves those already holding it alone, or a setting that is fixed once announced","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/roles/{role}/window/announce":{"post":{"operationId":"announceDiscordRoleWindow","summary":"Announce a Discord role's window","description":"Reads the server's Verify channel and the bot's permissions there afresh, posts the announcement there, pinging the role, pins it, and starts the countdown: everyone who held the role before its gate has until the deadline to verify and keep it. Takes the settings as `PUT …/window` does, saved first. The server needs a Verify channel, and the bot Send Messages, Embed Links and Pin Messages there (409 with the fix). Synq posts it in the background (202), so the caller may go: the window answers `announce_queued_at` until it's posted, then `announced`, or `announce_failure` with the fix when nothing was posted; pressing it again meanwhile is the same announcement. What Synq knows without asking Discord (no gate, announced already, the gate off, no Verify channel, the bot gone) is refused at once. An API without a background runner posts at once (200). Recorded as `discord_role.window_announced`, as who asked. Needs `org.integrations.edit`, a plan with token gating (403 `plan_feature_unavailable`) and an API with a Discord bot (409 `discord_unavailable`).","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"The gated role's Discord id","example":"1187390245566009876"},"required":true,"description":"The gated role's Discord id","name":"role","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordWindowSettingsInput"},"example":{"notice_days":365,"deadline_time":"18:00","time_zone":"America/New_York","quiet_hours":{"from":"22:00","to":"09:00"},"name_unverified":true,"headline":"Token gate: ROD.AI is becoming a home for holders and users of our products."}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordRoleWindow"},"example":{"server":"string","role":"string","role_name":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"string","to":"string"},"name_unverified":true,"headline":"string","verify_channel":"string","listing":true,"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","names":true,"done":true}],"counts":{"holders":0,"verified":0,"to_verify":0,"settled":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string"}}}},"202":{"description":"The window, its announcement handed to the background (`announce_queued_at`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordRoleWindow"},"example":{"server":"string","role":"string","role_name":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"string","to":"string"},"name_unverified":true,"headline":"string","verify_channel":"string","listing":true,"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","names":true,"done":true}],"counts":{"holders":0,"verified":0,"to_verify":0,"settled":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string"}}}},"400":{"description":"A setting that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.integrations.edit, or the org's plan has no token gating","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Announced already, no gate gives the role, no Verify channel, the bot lacks a permission it needs there, or this API has no Discord bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Discord didn't answer just now: nothing was posted","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/roles/{role}/window/extend":{"post":{"operationId":"extendDiscordRoleWindow","summary":"Move a Discord role's deadline later","description":"Moves the deadline to `ends_at`, which must be later than it is (it never moves earlier once announced), at most 365 days away and outside quiet hours. Synq posts one message in the Verify channel saying so, pinging the role, and edits the countdown; those still to verify get the new date. Recorded as `discord_role.window_extended`. Needs `org.integrations.edit`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"The gated role's Discord id","example":"1187390245566009876"},"required":true,"description":"The gated role's Discord id","name":"role","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ends_at":{"type":"string","format":"date-time","description":"The new deadline","example":"2027-12-07T23:00:00Z"}},"required":["ends_at"],"additionalProperties":false},"example":{"ends_at":"2027-12-07T23:00:00Z"}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordRoleWindow"},"example":{"server":"string","role":"string","role_name":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"string","to":"string"},"name_unverified":true,"headline":"string","verify_channel":"string","listing":true,"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","names":true,"done":true}],"counts":{"holders":0,"verified":0,"to_verify":0,"settled":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string"}}}},"400":{"description":"A deadline that is earlier, too far away or in quiet hours","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The window isn’t announced, or its deadline passed already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Discord didn't answer just now: nothing changed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/roles/{role}/window/pause":{"post":{"operationId":"pauseDiscordRoleWindow","summary":"Pause a Discord role's reminders","description":"Stops the reminders and names: the countdown and the deadline stay. Recorded as `discord_role.window_paused`. Needs `org.integrations.edit`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"The gated role's Discord id","example":"1187390245566009876"},"required":true,"description":"The gated role's Discord id","name":"role","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordRoleWindow"},"example":{"server":"string","role":"string","role_name":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"string","to":"string"},"name_unverified":true,"headline":"string","verify_channel":"string","listing":true,"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","names":true,"done":true}],"counts":{"holders":0,"verified":0,"to_verify":0,"settled":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The window isn’t announced, or its deadline passed already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/discord-servers/{server}/roles/{role}/window/resume":{"post":{"operationId":"resumeDiscordRoleWindow","summary":"Resume a Discord role's reminders","description":"Starts the reminders again, from the next one: those that came due while paused are skipped. Recorded as `discord_role.window_resumed`. Needs `org.integrations.edit`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^dsv_[0-9a-hjkmnp-tv-z]{26}$","description":"The Discord server's id","example":"dsv_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The Discord server's id","name":"server","in":"path"},{"schema":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"The gated role's Discord id","example":"1187390245566009876"},"required":true,"description":"The gated role's Discord id","name":"role","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"The window","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscordRoleWindow"},"example":{"server":"string","role":"string","role_name":"string","state":"draft","notice_days":0,"deadline_time":"string","time_zone":"string","quiet_hours":{"from":"string","to":"string"},"name_unverified":true,"headline":"string","verify_channel":"string","listing":true,"starts_at":"2026-10-21T12:00:00.000Z","ends_at":"2026-10-21T12:00:00.000Z","paused_at":"2026-10-21T12:00:00.000Z","extended_at":"2026-10-21T12:00:00.000Z","closed_at":"2026-10-21T12:00:00.000Z","schedule":[{"reminder":"m1","kind":"monthly","at":"2026-10-21T12:00:00.000Z","names":true,"done":true}],"counts":{"holders":0,"verified":0,"to_verify":0,"settled":0},"problem":"members_unknown","problem_detail":"string","announce_queued_at":"2026-10-21T12:00:00.000Z","announce_failure":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The window isn’t announced, or its deadline passed already","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/own-bots":{"get":{"operationId":"listOwnBots","summary":"Read the org's own Discord app and Telegram bot","description":"What the org set: each bot's ids and names, how many servers or groups it serves, and what to set in Discord's portal. Never its token or client secret. Needs `org.integrations.view`.","security":[{"bearer":[]}],"x-permission":"org.integrations.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"200":{"description":"Its own bots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnBotList"},"example":{"discord":{"id":"bot_01h455vb4pex5vsknk084sn02q","platform":"discord","external_id":"1203847562019384756","name":"Mollyverse Bot","username":"MollyverseBot","serves":0,"setup":{"interactions_endpoint_url":"https://app.acme.example","redirect_uri":"https://app.acme.example","webhook_url":"https://app.acme.example"},"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"},"telegram":{"id":"bot_01h455vb4pex5vsknk084sn02q","platform":"discord","external_id":"1203847562019384756","name":"Mollyverse Bot","username":"MollyverseBot","serves":0,"setup":{"interactions_endpoint_url":"https://app.acme.example","redirect_uri":"https://app.acme.example","webhook_url":"https://app.acme.example"},"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/own-bots/discord":{"put":{"operationId":"setOwnDiscordBot","summary":"Set the org's own Discord app","description":"A Discord app of the org's own serves the servers it adds (`POST …/discord-servers/install` with `own_bot: true`) in place of Synq's: its install screen, its name and picture. Checked with Discord first: the token must be the bot of the app `application_id` names, and `public_key` that app's key (400 at the field with the fix; 503 when Discord doesn't answer). Its token and client secret are sealed, never shown again. Then set the answer's `setup.interactions_endpoint_url` as the app's Interactions Endpoint URL and add `setup.redirect_uri` on its OAuth2 page. Sending the same app again replaces its credentials; another app can't replace one that still serves servers (409). Needs `org.integrations.edit` and a plan with `integration.own_bots` (Scale and up). Recorded as `own_bot.set`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"application_id":{"type":"string","pattern":"^[1-9][0-9]{16,19}$","description":"The app's Application ID, from its General Information page","example":"1203847562019384756"},"public_key":{"type":"string","pattern":"^[0-9a-fA-F]{64}$","description":"The app's Public Key, from the same page: what its interactions are signed with"},"client_secret":{"type":"string","minLength":16,"maxLength":256,"description":"The app's client secret, from its OAuth2 page: sealed, never shown again"},"token":{"type":"string","minLength":50,"maxLength":100,"description":"Its bot's token, from its Bot page: sealed, never shown again"}},"required":["application_id","public_key","client_secret","token"],"additionalProperties":false},"example":{"application_id":"1203847562019384756","public_key":"string","client_secret":"string","token":"string"}}}},"responses":{"200":{"description":"The app, set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnBot"},"example":{"id":"bot_01h455vb4pex5vsknk084sn02q","platform":"discord","external_id":"1203847562019384756","name":"Mollyverse Bot","username":"MollyverseBot","serves":0,"setup":{"interactions_endpoint_url":"https://app.acme.example","redirect_uri":"https://app.acme.example","webhook_url":"https://app.acme.example"},"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A field that is not valid, or credentials Discord refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.integrations.edit, or the org's plan has no own bots","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Another app still serves servers, or this API has no Discord bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Discord didn’t answer just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/own-bots/telegram":{"put":{"operationId":"setOwnTelegramBot","summary":"Set the org's own Telegram bot","description":"A Telegram bot of the org's own serves the groups it connects (`POST …/telegram-groups/connect` with `own_bot: true`) in place of Synq's: its name and picture in the group and in what it writes to people. Checked with Telegram first (getMe; 400 at `token` with the fix, 503 when Telegram doesn't answer), its token sealed and never shown again, and its webhook pointed at Synq with a secret of its own. To be a group's guard bot, turn on join request queries for it in @BotFather. Sending the same bot again replaces its token; another bot can't replace one that still serves groups (409). Needs `org.integrations.edit` and a plan with `integration.own_bots` (Scale and up). Recorded as `own_bot.set`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","pattern":"^[1-9][0-9]{4,19}:[A-Za-z0-9_-]{30,100}$","description":"The bot's token, from @BotFather: sealed, never shown again"}},"required":["token"],"additionalProperties":false},"example":{"token":"string"}}}},"responses":{"200":{"description":"The bot, set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnBot"},"example":{"id":"bot_01h455vb4pex5vsknk084sn02q","platform":"discord","external_id":"1203847562019384756","name":"Mollyverse Bot","username":"MollyverseBot","serves":0,"setup":{"interactions_endpoint_url":"https://app.acme.example","redirect_uri":"https://app.acme.example","webhook_url":"https://app.acme.example"},"created_at":"2026-10-21T12:00:00.000Z","updated_at":"2026-10-21T12:00:00.000Z"}}}},"400":{"description":"A token that is not valid, or one Telegram refused","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.integrations.edit, or the org's plan has no own bots","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PlanProblem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Another bot still serves groups, or this API has no Telegram bot","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Telegram didn’t answer just now","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/own-bots/{platform}":{"delete":{"operationId":"removeOwnBot","summary":"Remove the org's own Discord app or Telegram bot","description":"Disconnects every server or group it serves (the list's `serves` says how many), from now on: whoever holds a role or is in a group keeps it, and nobody is checked there again. The bot leaves each of them, best effort. Connecting them again with Synq's bot starts afresh. Never wants the plan, so an org that moved down can still remove it. Needs `org.integrations.edit`. Recorded as `own_bot.removed`.","security":[{"bearer":[]}],"x-permission":"org.integrations.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","enum":["discord","telegram"],"description":"`discord` or `telegram`","example":"discord"},"required":true,"description":"`discord` or `telegram`","name":"platform","in":"path"}],"responses":{"204":{"description":"Removed"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/audit-log":{"get":{"operationId":"listAuditEvents","summary":"Read the org's audit log","description":"Newest first, filtered by action, actor, resource, brand and time. Needs `org.auditLog.view`: a brand's entries (`brand_id`) show where the credential has it in that brand, and the org's own entries (no brand: its members, billing, settings) where it has it across the org, an org role's. Rows are kept as long as the org's plan says: 7, 30 or 365 days, or for ever.","security":[{"bearer":[]}],"x-permission":"org.auditLog.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"},{"schema":{"type":"string","description":"Only this action: org.created, org.claimed, org.updated, org.agent_approvals_updated, org.deleted, org.plan_changed, org.trial_ended, org.audit_log_exported, org.disabled, org.enabled, org.contacted, brand.created, brand.updated, brand.deleted, brand.reply_to_confirmed, brand.app_registrations_full, brand.email_allowance_reached, brand.transfer_requested, brand.transfer_accepted, brand.transfer_notice_sent, brand.transfer_declined, brand.transfer_cancelled, brand.claimed, app.created, app.registered, app.updated, app.secret_rotated, app.deleted, app.api_access_changed, app.refresh_token_replayed, api.created, api.updated, api.deleted, org.ownership_transferred, member.added, member.role_assigned, member.removed, member.left, member.sessions_ended, member.agent_approvals_updated, role.created, role.updated, role.deleted, invite.created, invite.revoked, invite.accepted, webhook.created, webhook.updated, webhook.secret_rotated, webhook.deleted, webhook.disabled, token_gate.created, token_gate.updated, token_gate.deleted, discord_server.connected, discord_server.updated, discord_server.disconnected, discord_role.granted, discord_role.recognized, discord_role.removal_scheduled, discord_role.removed, discord_role.grant_failed, discord_role.removal_failed, discord_role.adoption_started, discord_role.adoption_reminded, discord_role.adoption_failed, discord_role.window_announced, discord_role.window_updated, discord_role.window_reminded, discord_role.window_extended, discord_role.window_paused, discord_role.window_resumed, discord_role.window_waiting, discord_role.window_deadline_started, discord_role.window_closed, telegram_group.disconnected, own_bot.set, own_bot.removed, telegram_group.connected, telegram_group.updated, telegram_group.bot_removed, telegram_group.adoption_started, telegram_group.adoption_reminded, telegram_group.window_announced, telegram_group.window_updated, telegram_group.window_reminded, telegram_group.window_extended, telegram_group.window_moved, telegram_group.window_paused, telegram_group.window_resumed, telegram_group.window_waiting, telegram_group.window_deadline_started, telegram_group.window_closed, telegram_member.approved, telegram_member.recognized, telegram_member.declined, telegram_member.removal_scheduled, telegram_member.muted, telegram_member.unmuted, telegram_member.removed, telegram_member.banned_by_admin, telegram_member.muted_by_admin, telegram_member.action_failed, email_domain.created, email_domain.verified, email_domain.failed, email_domain.deleted, org_domain.created, org_domain.verified, org_domain.failing, org_domain.unverified, org_domain.deleted, brand.custom_domain_added, brand.custom_domain_verified, brand.custom_domain_activated, brand.custom_domain_failed, brand.custom_domain_suspended, brand.custom_domain_restored, brand.custom_domain_removed, api_key.created, api_key.revoked, api_key.rotated, api_key.expired, approval_request.created, approval_request.approved, approval_request.declined, approval_request.applied, approval_request.change_added, file.uploaded, file.rejected, file.downloaded, staff.role_granted, user.created, user.updated, user.looked_up, user.email_verified, user.password_reset, user.passkey_added, user.passkey_removed, user.identity_linked, user.identity_unlinked, user.provider_token_read, user.identity_token_revoked, user.identity_pending, user.identity_rejected, user.sign_in_ticket_created, user.sign_in_ticket_used, user.consent_granted, user.consent_revoked, user.api_key_created, user.api_key_revoked, user.sessions_revoked, user.deletion_scheduled, user.deletion_cancelled, user.deleted, user.merged, user.sign_in_failed, user.token_gate_checked, user.token_gate_dry_run.","example":"org.updated"},"required":false,"description":"Only this action: org.created, org.claimed, org.updated, org.agent_approvals_updated, org.deleted, org.plan_changed, org.trial_ended, org.audit_log_exported, org.disabled, org.enabled, org.contacted, brand.created, brand.updated, brand.deleted, brand.reply_to_confirmed, brand.app_registrations_full, brand.email_allowance_reached, brand.transfer_requested, brand.transfer_accepted, brand.transfer_notice_sent, brand.transfer_declined, brand.transfer_cancelled, brand.claimed, app.created, app.registered, app.updated, app.secret_rotated, app.deleted, app.api_access_changed, app.refresh_token_replayed, api.created, api.updated, api.deleted, org.ownership_transferred, member.added, member.role_assigned, member.removed, member.left, member.sessions_ended, member.agent_approvals_updated, role.created, role.updated, role.deleted, invite.created, invite.revoked, invite.accepted, webhook.created, webhook.updated, webhook.secret_rotated, webhook.deleted, webhook.disabled, token_gate.created, token_gate.updated, token_gate.deleted, discord_server.connected, discord_server.updated, discord_server.disconnected, discord_role.granted, discord_role.recognized, discord_role.removal_scheduled, discord_role.removed, discord_role.grant_failed, discord_role.removal_failed, discord_role.adoption_started, discord_role.adoption_reminded, discord_role.adoption_failed, discord_role.window_announced, discord_role.window_updated, discord_role.window_reminded, discord_role.window_extended, discord_role.window_paused, discord_role.window_resumed, discord_role.window_waiting, discord_role.window_deadline_started, discord_role.window_closed, telegram_group.disconnected, own_bot.set, own_bot.removed, telegram_group.connected, telegram_group.updated, telegram_group.bot_removed, telegram_group.adoption_started, telegram_group.adoption_reminded, telegram_group.window_announced, telegram_group.window_updated, telegram_group.window_reminded, telegram_group.window_extended, telegram_group.window_moved, telegram_group.window_paused, telegram_group.window_resumed, telegram_group.window_waiting, telegram_group.window_deadline_started, telegram_group.window_closed, telegram_member.approved, telegram_member.recognized, telegram_member.declined, telegram_member.removal_scheduled, telegram_member.muted, telegram_member.unmuted, telegram_member.removed, telegram_member.banned_by_admin, telegram_member.muted_by_admin, telegram_member.action_failed, email_domain.created, email_domain.verified, email_domain.failed, email_domain.deleted, org_domain.created, org_domain.verified, org_domain.failing, org_domain.unverified, org_domain.deleted, brand.custom_domain_added, brand.custom_domain_verified, brand.custom_domain_activated, brand.custom_domain_failed, brand.custom_domain_suspended, brand.custom_domain_restored, brand.custom_domain_removed, api_key.created, api_key.revoked, api_key.rotated, api_key.expired, approval_request.created, approval_request.approved, approval_request.declined, approval_request.applied, approval_request.change_added, file.uploaded, file.rejected, file.downloaded, staff.role_granted, user.created, user.updated, user.looked_up, user.email_verified, user.password_reset, user.passkey_added, user.passkey_removed, user.identity_linked, user.identity_unlinked, user.provider_token_read, user.identity_token_revoked, user.identity_pending, user.identity_rejected, user.sign_in_ticket_created, user.sign_in_ticket_used, user.consent_granted, user.consent_revoked, user.api_key_created, user.api_key_revoked, user.sessions_revoked, user.deletion_scheduled, user.deletion_cancelled, user.deleted, user.merged, user.sign_in_failed, user.token_gate_checked, user.token_gate_dry_run.","name":"action","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Only this actor's changes: a user's or an API key's id, someone who has left the org included (`GET /v1/orgs/{org}/former-members` lists them).","example":"usr_01h455vb4pex5vsknk084sn02q"},"required":false,"description":"Only this actor's changes: a user's or an API key's id, someone who has left the org included (`GET /v1/orgs/{org}/former-members` lists them).","name":"actor","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Only what happened to this resource: an org's, user's, app's… id. A member's or former member's id also finds the invitations sent to their address and an ownership they handed on; the org's own id, everything recorded about the org, a handover of it included."},"required":false,"description":"Only what happened to this resource: an org's, user's, app's… id. A member's or former member's id also finds the invitations sent to their address and an ownership they handed on; the org's own id, everything recorded about the org, a handover of it included.","name":"resource","in":"query"},{"schema":{"type":"string","description":"Only in this brand."},"required":false,"description":"Only in this brand.","name":"brand","in":"query"},{"schema":{"type":"string","format":"date-time","description":"From this time on."},"required":false,"description":"From this time on.","name":"since","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Up to this time."},"required":false,"description":"Up to this time.","name":"until","in":"query"}],"responses":{"200":{"description":"A page of audit events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventPage"},"example":{"data":[{"id":"aud_01h455vb4pex5vsknk084sn02q","created_at":"2026-10-21T12:00:00.000Z","action":"org.updated","actor":{"type":"member","id":"usr_01h455vb4pex5vsknk084sn02q"},"act_client_id":"string","approval_id":"string","brand_id":"brd_01h455vb4pex5vsknk084sn02q","resource":{"type":"org","id":"org_01h455vb4pex5vsknk084sn02q"},"metadata":{},"ip":"string","user_agent":"string"}],"next_cursor":"string"}}}},"400":{"description":"A filter, limit or cursor that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/audit-log/export":{"get":{"operationId":"exportAuditEvents","summary":"Download the org's audit log","description":"Every entry between `since` and `until` (at most 366 days), oldest first: the org's own and every brand's, each with the brand it happened in (`brand`, its id and name, or null for the org's own), to keep a copy or for a security tool such as a SIEM. CSV, JSON or NDJSON, streamed. On every plan, as far back as the org's plan keeps entries (its `audit_retention_days` in `GET /v1/plans`: 7, 30 or 365 days, or for ever, then 366 days at a time). Needs `org.auditLog.export` across the org. Ten an hour for an org. Each export is recorded as `org.audit_log_exported`, with the window it covered.","security":[{"bearer":[]}],"x-permission":"org.auditLog.export","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","format":"date-time","description":"From this time on, inclusive. Left out, or before the oldest entry the org's plan keeps: from that oldest entry (the plan's `audit_retention_days` back), or 366 days before `until` on a plan that keeps entries for ever.","example":"2026-10-01T00:00:00Z"},"required":false,"description":"From this time on, inclusive. Left out, or before the oldest entry the org's plan keeps: from that oldest entry (the plan's `audit_retention_days` back), or 366 days before `until` on a plan that keeps entries for ever.","name":"since","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Up to this time, exclusive: now when left out, or when later. At most 366 days after since.","example":"2026-11-01T00:00:00Z"},"required":false,"description":"Up to this time, exclusive: now when left out, or when later. At most 366 days after since.","name":"until","in":"query"},{"schema":{"type":"string","description":"Only this brand's entries. Left out: the org's own and every brand's."},"required":false,"description":"Only this brand's entries. Left out: the org's own and every brand's.","name":"brand","in":"query"},{"schema":{"type":"string","enum":["ndjson","json","csv"],"default":"ndjson","description":"`ndjson`: one JSON object a line, an audit event with its `brand`. `json`: one JSON array of them. `csv`: a header row, then one row an entry, `metadata` as JSON in its cell.","example":"csv"},"required":false,"description":"`ndjson`: one JSON object a line, an audit event with its `brand`. `json`: one JSON array of them. `csv`: a header row, then one row an entry, `metadata` as JSON in its cell.","name":"format","in":"query"}],"responses":{"200":{"description":"The entries: NDJSON, one audit event with `org_id` and `brand` a line; JSON, one array of them; or CSV with a header row","content":{"application/x-ndjson":{"example":"{\"id\":\"aud_01h455vb4pex5vsknk084sn02q\",\"created_at\":\"2026-10-01T09:00:00.000Z\",\"action\":\"org.updated\",\"actor\":{\"type\":\"system\",\"id\":null},\"act_client_id\":null,\"approval_id\":null,\"brand_id\":null,\"resource\":{\"type\":\"org\",\"id\":\"org_01h455vb4pex5vsknk084sn02q\"},\"metadata\":{},\"ip\":null,\"user_agent\":null,\"org_id\":\"org_01h455vb4pex5vsknk084sn02q\",\"brand\":null}\n","schema":{"type":"string","description":"One JSON object a line: an audit event with `org_id` and `brand`","example":"{\"id\":\"aud_01h455vb4pex5vsknk084sn02q\",\"created_at\":\"2026-10-01T09:00:00.000Z\",\"action\":\"org.updated\",\"org_id\":\"org_01h455vb4pex5vsknk084sn02q\",\"brand\":null}\n"}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExportedAuditEvent"}},"example":[{"id":"aud_01h455vb4pex5vsknk084sn02q","created_at":"2026-10-21T12:00:00.000Z","action":"org.updated","actor":{"type":"member","id":"usr_01h455vb4pex5vsknk084sn02q"},"act_client_id":"string","approval_id":"string","brand_id":"brd_01h455vb4pex5vsknk084sn02q","resource":{"type":"org","id":"org_01h455vb4pex5vsknk084sn02q"},"metadata":{},"ip":"string","user_agent":"string","org_id":"org_01h455vb4pex5vsknk084sn02q","brand":{"id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme"}}]},"text/csv":{"schema":{"type":"string","description":"A header row (id, created_at, action, actor_type, actor_id, act_client_id, approval_id, brand_id, brand_name, resource_type, resource_id, ip, user_agent, metadata), then one row an entry","example":"id,created_at,action,actor_type,actor_id,act_client_id,approval_id,brand_id,brand_name,resource_type,resource_id,ip,user_agent,metadata\n"}}}},"400":{"description":"A time, brand or format that is not valid, or a window over 366 days","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks org.auditLog.export across the org","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/checkout":{"post":{"operationId":"createCheckout","summary":"Start checkout for a plan","description":"Stripe Checkout for one of the plans sold (`GET /v1/plans`), billed monthly or yearly, with the plan's overage for monthly active users above the allowance as a metered item; promotion codes are taken. Send the person to `url`; once they've paid, Stripe's webhook moves the org to the plan, moments later. An org that pays for a plan already changes it in the billing portal instead. A paid or contract plan assigned by Synq staff without a subscription must be changed by staff (`conflict`). Needs `org.billing.edit`.","security":[{"bearer":[]}],"x-permission":"org.billing.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"},"example":{"plan":"pro","interval":"month","success_url":"https://app.example.com/settings/billing","cancel_url":"https://app.example.com/settings/billing"}}}},"responses":{"201":{"description":"Stripe's checkout page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSession"},"example":{"id":"cs_test_a1b2c3","url":"https://example.com"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org has a subscription (`subscription_exists`) or a paid or contract plan assigned by Synq staff (`conflict`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A plan checkout doesn’t sell (`plan_not_sold`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Billing through Stripe is not set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/plan":{"post":{"operationId":"changePlan","summary":"Change a paying org's plan","description":"Moves an org that pays for a plan to another plan or cadence. An upgrade (a dearer plan, or monthly to yearly) applies at once: Stripe prorates it and invoices the difference now, on the card it has. A declined card is `payment_failed`, and nothing changes. When the person's bank wants to confirm the payment (3-D Secure) it is `payment_requires_action`: nothing is charged and nothing changes yet, `hosted_invoice_url` is Stripe's page where they confirm it, and once they do Stripe takes the payment and the upgrade applies, as Stripe's webhook tells Synq (with the email and `org.plan_changed`, by whoever asked); it waits a day at most (`expires_at`), and `GET …/billing` says it meanwhile. Any other change, the plan the org is on included, calls off a payment still waiting. While the plan is set to end, an upgrade that waits for the bank is refused (`conflict`): renew the plan first, then upgrade. A downgrade (a cheaper plan, or yearly to monthly) applies at the end of the period paid for. On a trial nothing has been paid, so nothing is prorated: an upgrade changes the plan the trial is of, and a downgrade waits for the trial's last day, the trial carrying on until then. The free plan ends the paid one at the end of its period (a trial's last day), as cancelling in the billing portal does, and calls off a downgrade waiting for then (`called_off_change` in `GET …/billing`). A paid plan chosen while the plan is set to end calls the end off. The plan the org is on, at its cadence, keeps it: it renews a plan set to end, bringing back a downgrade that end called off, as renewing in the portal does, or calls off a waiting downgrade. The org's owners and admins get an email for each change: the plan, its price and the day. The org's plan follows Stripe's webhook, moments after. Needs `org.billing.edit`.","security":[{"bearer":[]}],"x-permission":"org.billing.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeRequest"},"example":{"plan":"scale","interval":"month"}}}},"responses":{"200":{"description":"When it applies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"},"example":{"applies":"now","at":"2026-11-04T16:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"The card was declined (`payment_failed`): nothing was charged, and nothing changed. Or the person's bank wants to confirm the payment (`payment_requires_action`): nothing is charged or changed yet; `hosted_invoice_url` is Stripe's page where they confirm it, and the upgrade applies once they do (`GET …/billing` says it meanwhile, as `payment_requires_action`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PaymentProblem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org pays for no plan (`no_subscription`), is on this one already with nothing waiting to change it, is set to move to the free plan already, or is set to end while an upgrade's payment waits for the person's bank (`conflict`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A plan sold by contract, or not one of the plans (`plan_not_sold`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Billing through Stripe is not set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/portal":{"post":{"operationId":"createBillingPortalSession","summary":"Open Stripe's billing portal","description":"Stripe's customer portal for the org: its payment method, billing details, invoices, and cancelling (at the end of the period paid for) or renewing. Changing plan, the free plan included, is `POST /v1/orgs/{org}/billing/plan`. Send the person to `url`. Needs `org.billing.edit`.","security":[{"bearer":[]}],"x-permission":"org.billing.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"},"example":{"return_url":"https://app.example.com/settings/billing","flow":"payment_method_update"}}}},"responses":{"201":{"description":"Stripe's customer portal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalSession"},"example":{"url":"https://example.com"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org has never checked out (`no_billing_account`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Billing through Stripe is not set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/invoices":{"get":{"operationId":"listInvoices","summary":"List the org's invoices","description":"Its invoices from Stripe, newest first, a page at a time (at most 100 to a page, whatever `limit` asks); none before it has checked out. Needs `org.billing.view`.","security":[{"bearer":[]}],"x-permission":"org.billing.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"Its invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceList"},"example":{"data":[{"id":"in_1Abc","number":"SYNQ-0001","status":"paid","currency":"usd","total_cents":"2500","amount_due_cents":"2500","created":"2026-10-04T16:00:00.000Z","period_start":"2026-10-21T12:00:00.000Z","period_end":"2026-10-21T12:00:00.000Z","hosted_invoice_url":"https://example.com","invoice_pdf":"https://example.com"}],"next_cursor":"string"}}}},"400":{"description":"A query that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Billing through Stripe is not set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/usage":{"get":{"operationId":"getUsage","summary":"Read the org's usage","description":"Its monthly active users in a month against its plan's allowance (never refused; above it each is billed at the plan's overage price, and on a plan with none, such as free Starter, nothing is), and its apps and brands against the plan's limits, with the apps that hold the plan's places (`apps.held_by`), so a full plan can be said, naming them, before a new app is refused. A user is active in a month once they get tokens in it: signing in, or an app refreshing their tokens, so someone who stays signed in counts each month an app uses their session. Users deleted since still count, as they did while active. Needs `org.billing.view`.","security":[{"bearer":[]}],"x-permission":"org.billing.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"The calendar month, in UTC; this one when not given","example":"2026-10"},"required":false,"description":"The calendar month, in UTC; this one when not given","name":"month","in":"query"}],"responses":{"200":{"description":"Its usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"},"example":{"month":"2026-10","plan":"pro","monthly_active_users":{"count":51200,"included":50000,"over":1200},"apps":{"count":1,"limit":1,"development":1,"held_by":[{"id":"app_01h455vb4pex5vsknk084sn02q","brand_id":"brd_01h455vb4pex5vsknk084sn02q","name":"Acme web"}]},"brands":{"count":0,"limit":0}}}}},"400":{"description":"A month that is not one","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing":{"get":{"operationId":"getBilling","summary":"Read the org's billing state","description":"Its plan and where it stands with billing: free, on a trial (and when it ends, whether a card is on file to carry on, and a payment to end it now that waits for the bank's confirmation), paying, past due, or set to end at the period's end and move to the free plan; a downgrade waiting for the period's end (a trial's, on a trial), never beside an end; and whether a trial is still open to it. Needs `org.billing.view`.","security":[{"bearer":[]}],"x-permission":"org.billing.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"200":{"description":"Its billing state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingState"},"example":{"plan":"pro","status":"trialing","interval":"month","trial_ends_at":"2026-11-04T16:00:00.000Z","current_period_end":"2026-10-21T12:00:00.000Z","cancel_at":"2026-11-22T16:00:00.000Z","scheduled_change":{"plan":"string","interval":"month","at":"2026-10-21T12:00:00.000Z"},"called_off_change":{"plan":"string","interval":"month"},"card_on_file":true,"payment_requires_action":{"hosted_invoice_url":"https://invoice.stripe.com/i/acct_1Abc/test_YWNj","invoice":{"id":"in_1Abc","number":"SYNQ-0001","status":"paid","currency":"usd","total_cents":"2500","amount_due_cents":"2500","created":"2026-10-04T16:00:00.000Z","period_start":"2026-10-21T12:00:00.000Z","period_end":"2026-10-21T12:00:00.000Z","hosted_invoice_url":"https://example.com","invoice_pdf":"https://example.com"},"expires_at":"2026-11-17T16:00:00.000Z","change":"change_plan","plan":"scale","interval":"month"},"trial_available":true}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/trial":{"post":{"operationId":"startTrial","summary":"Start a plan's trial","description":"Puts the org on a plan that has trial days (`GET /v1/plans`, `trial_days`) for that many days, free and with no card. Add a card in the billing portal before it ends (`flow: payment_method_update`) to carry on; without one the org moves to the free plan on the last day, and sign-in never stops. An org gets one trial; after it, start the plan with checkout. A paid or contract plan assigned by Synq staff without a subscription must be changed by staff. The org is on the plan when this returns. Needs `org.billing.edit`.","security":[{"bearer":[]}],"x-permission":"org.billing.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialRequest"},"example":{"plan":"pro","interval":"month"}}}},"responses":{"201":{"description":"The trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trial"},"example":{"plan":"pro","interval":"month","trial_ends_at":"2026-11-04T16:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The plan has no trial, the org had its trial or has a staff-assigned paid or contract plan (`trial_unavailable`), or it has a subscription (`subscription_exists`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A plan not sold through Stripe (`plan_not_sold`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Billing through Stripe is not set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/trial/end/preview":{"post":{"operationId":"previewTrialEnd","summary":"Preview ending the trial now","description":"What ending the org's trial now and paying for its plan would do, changing nothing: what Stripe charges today and on which card, the plan's price, and when Stripe charges next (a period from today). Refused as ending it would be: no trial (`no_trial`), a trial set to end or a move down waiting for its end (`conflict`), or no card saved (`card_required`). Needs `org.billing.view`, so a member who can't pay can see what to ask for.","security":[{"bearer":[]}],"x-permission":"org.billing.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"200":{"description":"What it would do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialEndPreview"},"example":{"plan":"pro","interval":"month","currency":"usd","amount_due_today_cents":"2500","price_cents":"2500","next_charge_at":"2026-12-16T16:00:00.000Z","trial_ends_at":"2026-11-29T16:00:00.000Z","card":{"brand":"visa","last4":"4242"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"No trial to end (`no_trial`), a trial set to end or a move down waiting for its end (`conflict`), or no card saved (`card_required`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Billing through Stripe is not set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/trial/end":{"post":{"operationId":"endTrial","summary":"End the trial now and pay","description":"Ends the org's trial now and pays for its plan: Stripe charges the first period's invoice today on the card it has (nothing prorated), the billing date moves to today, and the plan carries on, charged a period from now; users over the allowance are billed at the period's end, as ever. Answers Stripe's paid invoice, whose `hosted_invoice_url` is the receipt. A declined card is `payment_failed`, nothing is charged, and the trial carries on. When the person's bank wants to confirm the payment (3-D Secure) it is `payment_requires_action`: nothing is charged yet and the trial carries on, `hosted_invoice_url` is Stripe's page where they confirm it, and once they do Stripe takes the payment and the trial ends, as Stripe's webhook tells Synq (with the email and the audit row); it waits a day at most (`expires_at`). Refused while the trial is set to end (renew the plan first, `POST …/billing/plan` with the plan the org is on) and while a move down waits for its end (call the move off the same way, then end the trial; or keep the move and pay when the trial ends): `conflict`. Without a card it is `card_required`, and with no trial `no_trial`. `POST …/billing/trial/end/preview` says what it charges first. The owners and admins get an email of it. Recorded as `org.trial_ended`. Needs `org.billing.edit`.","security":[{"bearer":[]}],"x-permission":"org.billing.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"responses":{"200":{"description":"The trial ended, and the paid invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialEnded"},"example":{"plan":"pro","interval":"month","current_period_end":"2026-12-16T16:00:00.000Z","invoice":{"id":"in_1Abc","number":"SYNQ-0001","status":"paid","currency":"usd","total_cents":"2500","amount_due_cents":"2500","created":"2026-10-04T16:00:00.000Z","period_start":"2026-10-21T12:00:00.000Z","period_end":"2026-10-21T12:00:00.000Z","hosted_invoice_url":"https://example.com","invoice_pdf":"https://example.com"}}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Stripe couldn't charge the card (`payment_failed`): nothing was charged, and the trial carries on. Or the person's bank wants to confirm the payment (`payment_requires_action`): nothing is charged yet and the trial carries on; `hosted_invoice_url` is Stripe's page where they confirm it, and the trial ends once they do (`GET …/billing` says it meanwhile, as `payment_requires_action`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/PaymentProblem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"No trial to end (`no_trial`), a trial set to end or a move down waiting for its end (`conflict`), or no card saved (`card_required`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Billing through Stripe is not set up here","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/plan/preview":{"post":{"operationId":"previewPlanChange","summary":"Preview a plan change","description":"What moving the org to a plan would do, changing nothing: which step it takes (`action`), what it costs today (an upgrade prorated by Stripe), when it applies, the features it gains and loses, its limits before and after, and what the org has above the new limits. Needs `org.billing.view`, so a member who can't change the plan can see what to ask for.","security":[{"bearer":[]}],"x-permission":"org.billing.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangePreviewRequest"},"example":{"plan":"scale","interval":"month"}}}},"responses":{"200":{"description":"What it would do","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangePreview"},"example":{"action":"upgrade","plan":"scale","interval":"month","currency":"usd","amount_due_today_cents":"17500","price_cents":"20000","trial_days":14,"applies":"now","at":"2026-10-21T12:00:00.000Z","gains":["auth.byo_connections"],"loses":["auth.byo_connections"],"quotas":{"apps":{"from":0,"to":0},"brands":{"from":0,"to":0},"monthly_active_users":{"from":0,"to":0},"audit_retention_days":{"from":0,"to":0}},"over_limits":[{"quota":"apps","count":0,"limit":0}]}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Not one of the plans (`plan_not_sold`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/upgrade-requests":{"post":{"operationId":"createUpgradeRequest","summary":"Ask the owners to upgrade","description":"For a member who can't change the org's plan: asks its owners and admins to move it to a plan, by email and on their billing page, until the org reaches the plan or one of them dismisses it. Asking again for the same plan while a request is open answers that one and emails nobody. A person's credential only. Needs `org.read`.","security":[{"bearer":[]}],"x-permission":"org.read","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequestCreate"},"example":{"plan":"pro","interval":"month","note":"string"}}}},"responses":{"200":{"description":"The open request for the plan, already made","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequest"},"example":{"id":"upr_01h455vb4pex5vsknk084sn02q","plan":"pro","interval":"month","note":"string","requested_by":{"email":"ana@acme.example","name":"Acme"},"created":"2026-10-21T12:00:00.000Z"}}}},"201":{"description":"The request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequest"},"example":{"id":"upr_01h455vb4pex5vsknk084sn02q","plan":"pro","interval":"month","note":"string","requested_by":{"email":"ana@acme.example","name":"Acme"},"created":"2026-10-21T12:00:00.000Z"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"The org is on the plan or above (`conflict`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A plan not sold through Stripe (`plan_not_sold`)","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"operationId":"listUpgradeRequests","summary":"List the open upgrade requests","description":"Members' open requests to move the org to a plan, oldest first, a page at a time (50 by default). Each closes once the org reaches its plan, or when dismissed. Needs `org.billing.view`.","security":[{"bearer":[]}],"x-permission":"org.billing.view","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"At most this many items, 200 at the most.","example":20},"required":false,"description":"At most this many items, 200 at the most.","name":"limit","in":"query"},{"schema":{"type":"string","description":"The previous page's `next_cursor`, for the page after it."},"required":false,"description":"The previous page's `next_cursor`, for the page after it.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of the open requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeRequestPage"},"example":{"data":[{"id":"upr_01h455vb4pex5vsknk084sn02q","plan":"pro","interval":"month","note":"string","requested_by":{"email":"ana@acme.example","name":"Acme"},"created":"2026-10-21T12:00:00.000Z"}],"next_cursor":"string"}}}},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/billing/upgrade-requests/{request}":{"delete":{"operationId":"dismissUpgradeRequest","summary":"Dismiss an upgrade request","description":"Closes an open request without changing the plan. Needs `org.billing.edit`.","security":[{"bearer":[]}],"x-permission":"org.billing.edit","parameters":[{"schema":{"type":"string","pattern":"^org_[0-9a-hjkmnp-tv-z]{26}$","description":"The org's id","example":"org_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The org's id","name":"org","in":"path"},{"schema":{"type":"string","pattern":"^upr_[0-9a-hjkmnp-tv-z]{26}$","description":"The upgrade request's id","example":"upr_01h455vb4pex5vsknk084sn02q"},"required":true,"description":"The upgrade request's id","name":"request","in":"path"}],"responses":{"204":{"description":"Dismissed"},"401":{"description":"No credential, or one that is not valid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"The credential lacks the permission this route needs","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such org, or one the credential may not act in","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{"org.created":{"post":{"summary":"org.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.claimed":{"post":{"summary":"org.claimed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.updated":{"post":{"summary":"org.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.agent_approvals_updated":{"post":{"summary":"org.agent_approvals_updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.deleted":{"post":{"summary":"org.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.plan_changed":{"post":{"summary":"org.plan_changed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.trial_ended":{"post":{"summary":"org.trial_ended","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.audit_log_exported":{"post":{"summary":"org.audit_log_exported","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.disabled":{"post":{"summary":"org.disabled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.enabled":{"post":{"summary":"org.enabled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.contacted":{"post":{"summary":"org.contacted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.created":{"post":{"summary":"brand.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.updated":{"post":{"summary":"brand.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.deleted":{"post":{"summary":"brand.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.reply_to_confirmed":{"post":{"summary":"brand.reply_to_confirmed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.app_registrations_full":{"post":{"summary":"brand.app_registrations_full","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.email_allowance_reached":{"post":{"summary":"brand.email_allowance_reached","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.transfer_requested":{"post":{"summary":"brand.transfer_requested","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.transfer_accepted":{"post":{"summary":"brand.transfer_accepted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.transfer_notice_sent":{"post":{"summary":"brand.transfer_notice_sent","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.transfer_declined":{"post":{"summary":"brand.transfer_declined","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.transfer_cancelled":{"post":{"summary":"brand.transfer_cancelled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.claimed":{"post":{"summary":"brand.claimed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"app.created":{"post":{"summary":"app.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"app.registered":{"post":{"summary":"app.registered","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"app.updated":{"post":{"summary":"app.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"app.secret_rotated":{"post":{"summary":"app.secret_rotated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"app.deleted":{"post":{"summary":"app.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"app.api_access_changed":{"post":{"summary":"app.api_access_changed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"app.refresh_token_replayed":{"post":{"summary":"app.refresh_token_replayed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"api.created":{"post":{"summary":"api.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"api.updated":{"post":{"summary":"api.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"api.deleted":{"post":{"summary":"api.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org.ownership_transferred":{"post":{"summary":"org.ownership_transferred","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"member.added":{"post":{"summary":"member.added","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"member.role_assigned":{"post":{"summary":"member.role_assigned","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"member.removed":{"post":{"summary":"member.removed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"member.left":{"post":{"summary":"member.left","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"member.sessions_ended":{"post":{"summary":"member.sessions_ended","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"member.agent_approvals_updated":{"post":{"summary":"member.agent_approvals_updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"role.created":{"post":{"summary":"role.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"role.updated":{"post":{"summary":"role.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"role.deleted":{"post":{"summary":"role.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"invite.created":{"post":{"summary":"invite.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"invite.revoked":{"post":{"summary":"invite.revoked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"invite.accepted":{"post":{"summary":"invite.accepted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"webhook.created":{"post":{"summary":"webhook.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"webhook.updated":{"post":{"summary":"webhook.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"webhook.secret_rotated":{"post":{"summary":"webhook.secret_rotated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"webhook.deleted":{"post":{"summary":"webhook.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"webhook.disabled":{"post":{"summary":"webhook.disabled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"token_gate.created":{"post":{"summary":"token_gate.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"token_gate.updated":{"post":{"summary":"token_gate.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"token_gate.deleted":{"post":{"summary":"token_gate.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_server.connected":{"post":{"summary":"discord_server.connected","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_server.updated":{"post":{"summary":"discord_server.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_server.disconnected":{"post":{"summary":"discord_server.disconnected","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.granted":{"post":{"summary":"discord_role.granted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.recognized":{"post":{"summary":"discord_role.recognized","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.removal_scheduled":{"post":{"summary":"discord_role.removal_scheduled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.removed":{"post":{"summary":"discord_role.removed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.grant_failed":{"post":{"summary":"discord_role.grant_failed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.removal_failed":{"post":{"summary":"discord_role.removal_failed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.adoption_started":{"post":{"summary":"discord_role.adoption_started","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.adoption_reminded":{"post":{"summary":"discord_role.adoption_reminded","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.adoption_failed":{"post":{"summary":"discord_role.adoption_failed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_announced":{"post":{"summary":"discord_role.window_announced","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_updated":{"post":{"summary":"discord_role.window_updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_reminded":{"post":{"summary":"discord_role.window_reminded","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_extended":{"post":{"summary":"discord_role.window_extended","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_paused":{"post":{"summary":"discord_role.window_paused","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_resumed":{"post":{"summary":"discord_role.window_resumed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_waiting":{"post":{"summary":"discord_role.window_waiting","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_deadline_started":{"post":{"summary":"discord_role.window_deadline_started","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"discord_role.window_closed":{"post":{"summary":"discord_role.window_closed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.disconnected":{"post":{"summary":"telegram_group.disconnected","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"own_bot.set":{"post":{"summary":"own_bot.set","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"own_bot.removed":{"post":{"summary":"own_bot.removed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.connected":{"post":{"summary":"telegram_group.connected","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.updated":{"post":{"summary":"telegram_group.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.bot_removed":{"post":{"summary":"telegram_group.bot_removed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.adoption_started":{"post":{"summary":"telegram_group.adoption_started","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.adoption_reminded":{"post":{"summary":"telegram_group.adoption_reminded","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_announced":{"post":{"summary":"telegram_group.window_announced","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_updated":{"post":{"summary":"telegram_group.window_updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_reminded":{"post":{"summary":"telegram_group.window_reminded","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_extended":{"post":{"summary":"telegram_group.window_extended","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_moved":{"post":{"summary":"telegram_group.window_moved","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_paused":{"post":{"summary":"telegram_group.window_paused","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_resumed":{"post":{"summary":"telegram_group.window_resumed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_waiting":{"post":{"summary":"telegram_group.window_waiting","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_deadline_started":{"post":{"summary":"telegram_group.window_deadline_started","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_group.window_closed":{"post":{"summary":"telegram_group.window_closed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.approved":{"post":{"summary":"telegram_member.approved","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.recognized":{"post":{"summary":"telegram_member.recognized","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.declined":{"post":{"summary":"telegram_member.declined","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.removal_scheduled":{"post":{"summary":"telegram_member.removal_scheduled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.muted":{"post":{"summary":"telegram_member.muted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.unmuted":{"post":{"summary":"telegram_member.unmuted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.removed":{"post":{"summary":"telegram_member.removed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.banned_by_admin":{"post":{"summary":"telegram_member.banned_by_admin","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.muted_by_admin":{"post":{"summary":"telegram_member.muted_by_admin","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"telegram_member.action_failed":{"post":{"summary":"telegram_member.action_failed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"email_domain.created":{"post":{"summary":"email_domain.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"email_domain.verified":{"post":{"summary":"email_domain.verified","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"email_domain.failed":{"post":{"summary":"email_domain.failed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"email_domain.deleted":{"post":{"summary":"email_domain.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org_domain.created":{"post":{"summary":"org_domain.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org_domain.verified":{"post":{"summary":"org_domain.verified","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org_domain.failing":{"post":{"summary":"org_domain.failing","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org_domain.unverified":{"post":{"summary":"org_domain.unverified","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"org_domain.deleted":{"post":{"summary":"org_domain.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.custom_domain_added":{"post":{"summary":"brand.custom_domain_added","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.custom_domain_verified":{"post":{"summary":"brand.custom_domain_verified","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.custom_domain_activated":{"post":{"summary":"brand.custom_domain_activated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.custom_domain_failed":{"post":{"summary":"brand.custom_domain_failed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.custom_domain_suspended":{"post":{"summary":"brand.custom_domain_suspended","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.custom_domain_restored":{"post":{"summary":"brand.custom_domain_restored","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"brand.custom_domain_removed":{"post":{"summary":"brand.custom_domain_removed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"api_key.created":{"post":{"summary":"api_key.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"api_key.revoked":{"post":{"summary":"api_key.revoked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"api_key.rotated":{"post":{"summary":"api_key.rotated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"api_key.expired":{"post":{"summary":"api_key.expired","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"approval_request.created":{"post":{"summary":"approval_request.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"approval_request.approved":{"post":{"summary":"approval_request.approved","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"approval_request.declined":{"post":{"summary":"approval_request.declined","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"approval_request.applied":{"post":{"summary":"approval_request.applied","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"approval_request.change_added":{"post":{"summary":"approval_request.change_added","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"file.uploaded":{"post":{"summary":"file.uploaded","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"file.rejected":{"post":{"summary":"file.rejected","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"file.downloaded":{"post":{"summary":"file.downloaded","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.created":{"post":{"summary":"user.created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.updated":{"post":{"summary":"user.updated","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.looked_up":{"post":{"summary":"user.looked_up","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.email_verified":{"post":{"summary":"user.email_verified","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.password_reset":{"post":{"summary":"user.password_reset","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.passkey_added":{"post":{"summary":"user.passkey_added","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.passkey_removed":{"post":{"summary":"user.passkey_removed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.identity_linked":{"post":{"summary":"user.identity_linked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.identity_unlinked":{"post":{"summary":"user.identity_unlinked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.provider_token_read":{"post":{"summary":"user.provider_token_read","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.identity_token_revoked":{"post":{"summary":"user.identity_token_revoked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.identity_pending":{"post":{"summary":"user.identity_pending","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.identity_rejected":{"post":{"summary":"user.identity_rejected","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.sign_in_ticket_created":{"post":{"summary":"user.sign_in_ticket_created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.sign_in_ticket_used":{"post":{"summary":"user.sign_in_ticket_used","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.consent_granted":{"post":{"summary":"user.consent_granted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.consent_revoked":{"post":{"summary":"user.consent_revoked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.api_key_created":{"post":{"summary":"user.api_key_created","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.api_key_revoked":{"post":{"summary":"user.api_key_revoked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.sessions_revoked":{"post":{"summary":"user.sessions_revoked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.deletion_scheduled":{"post":{"summary":"user.deletion_scheduled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.deletion_cancelled":{"post":{"summary":"user.deletion_cancelled","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.deleted":{"post":{"summary":"user.deleted","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.merged":{"post":{"summary":"user.merged","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.sign_in_failed":{"post":{"summary":"user.sign_in_failed","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.token_gate_checked":{"post":{"summary":"user.token_gate_checked","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"user.token_gate_dry_run":{"post":{"summary":"user.token_gate_dry_run","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}},"webhook.test":{"post":{"summary":"webhook.test","description":"Sent to each subscription that wants it, with `webhook-id`, `webhook-timestamp` and `webhook-signature` (Standard Webhooks). Answer 2xx within 10 seconds; anything else is tried again, 6 times in all.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Received"}}}}}}