{"openapi":"3.1.0","info":{"title":"SaaS Template API","description":"Public REST API for SaaS Template. Authenticate with a bearer API key or an OAuth 2.1 access token. Scopes narrow what a credential may do; team permissions are still enforced per request. Errors are RFC 9457 problem documents whose `code` member is a stable, untranslated identifier. Every response carries `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (seconds until the window resets) for the bucket the request was charged against.","version":"1.0.0"},"servers":[{"url":"https://nextjs-saas-template.lubomirgeorgiev.com","description":"SaaS Template"}],"tags":[{"name":"Account"},{"name":"Teams"},{"name":"Members"},{"name":"Invitations"},{"name":"Billing"},{"name":"API keys"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key created from account or team settings, sent as `Authorization: Bearer <key>`."},"oauth2":{"type":"oauth2","description":"OAuth 2.1 authorization code flow with PKCE, for third-party apps and agent clients.","flows":{"authorizationCode":{"authorizationUrl":"https://nextjs-saas-template.lubomirgeorgiev.com/oauth/authorize","tokenUrl":"https://nextjs-saas-template.lubomirgeorgiev.com/oauth/token","scopes":{"profile:read":"Read your account profile, sessions, and preferences.","profile:write":"Update your account profile and revoke your sessions.","teams:read":"List the teams you belong to and read their details.","teams:write":"Create teams and change team details.","members:read":"List the members of your teams.","members:write":"Change and remove members of your teams.","invites:write":"Send and revoke invitations to your teams.","billing:read":"Read the subscription and billing status of your teams.","api-keys:read":"List the API keys on your account and when they were last used.","api-keys:write":"Create and revoke API keys on your account."}}}}}},"paths":{"/api/v1/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Get the authenticated account","description":"Returns the profile of the account the credential belongs to: id, email, name, role, avatar, preferred locale, and verification/creation timestamps. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["profile:read"]},{"oauth2":["profile:read"]}],"responses":{"200":{"description":"The authenticated account.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"preferredLocale":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","email","firstName","lastName","role","avatar","preferredLocale","emailVerified","createdAt","updatedAt"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}}},"patch":{"operationId":"updateMe","tags":["Account"],"summary":"Update the authenticated account","description":"Updates the first and last name of the authenticated account. Both fields are required; the response is the account as it stands after the update. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["profile:write"]},{"oauth2":["profile:write"]}],"responses":{"200":{"description":"The updated account.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"preferredLocale":{"anyOf":[{"type":"string"},{"type":"null"}]},"emailVerified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","email","firstName","lastName","role","avatar","preferredLocale","emailVerified","createdAt","updatedAt"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":2,"maxLength":255},"lastName":{"type":"string","minLength":2,"maxLength":255}},"required":["firstName","lastName"]}}}}}},"/api/v1/me/sessions":{"get":{"operationId":"listMySessions","tags":["Account"],"summary":"List sign-in sessions","description":"Lists the account's active browser/app sign-in sessions, newest first, with the device and location recorded at sign-in. `isCurrentSession` is false for every bearer credential. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["profile:read"]},{"oauth2":["profile:read"]}],"responses":{"200":{"description":"The account's sessions.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"isCurrentSession":{"type":"boolean"},"authenticationType":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"browser":{"anyOf":[{"type":"string"},{"type":"null"}]},"os":{"anyOf":[{"type":"string"},{"type":"null"}]},"deviceType":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","createdAt","expiresAt","isCurrentSession","authenticationType","country","city","browser","os","deviceType"]}}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}}}},"/api/v1/me/sessions/{sessionId}":{"delete":{"operationId":"revokeMySession","tags":["Account"],"summary":"Revoke a sign-in session","description":"Signs the account out of one session. Revocation is scoped to the caller's own sessions, so an unknown session id is a no-op rather than an error. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["profile:write"]},{"oauth2":["profile:write"]}],"responses":{"200":{"description":"The session was revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"sessionId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/api/v1/teams":{"get":{"operationId":"listTeams","tags":["Teams"],"summary":"List the caller's teams","description":"Lists every team the authenticated account is an active member of, with the account's role in each. Teams whose membership is inactive or expired are omitted. A team-scoped API key lists only the single team it is scoped to.","x-audience":"any","security":[{"apiKey":["teams:read"]},{"oauth2":["teams:read"]}],"responses":{"200":{"description":"The caller's teams.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","name","slug","description","avatarUrl","role"]}}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}}},"post":{"operationId":"createTeam","tags":["Teams"],"summary":"Create a team","description":"Creates a team owned by the authenticated account, which also becomes its first member. The slug is derived from the name. Fails with 403 when the account is at its team limit. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["teams:write"]},{"oauth2":["teams:write"]}],"responses":{"201":{"description":"The created team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","name","slug","description","avatarUrl","role"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":1000}},"required":["name"]}}}}}},"/api/v1/teams/{teamId}":{"get":{"operationId":"getTeam","tags":["Teams"],"summary":"Get a team","description":"Returns one team the authenticated account belongs to. Teams the account is not an active member of answer 404, never 403, so team ids cannot be probed.","x-audience":"team","security":[{"apiKey":["teams:read"]},{"oauth2":["teams:read"]}],"responses":{"200":{"description":"The team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","name","slug","description","avatarUrl","role"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"patch":{"operationId":"updateTeam","tags":["Teams"],"summary":"Rename a team","description":"Changes a team's display name. Requires the `edit_team_settings` permission on that team. The slug is deliberately left alone so existing links and invitations keep working.","x-audience":"team","security":[{"apiKey":["teams:write"]},{"oauth2":["teams:write"]}],"responses":{"200":{"description":"The renamed team.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","name","slug","description","avatarUrl","role"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}}}},"/api/v1/teams/{teamId}/members":{"get":{"operationId":"listTeamMembers","tags":["Members"],"summary":"List team members","description":"Lists every membership of a team with the member's identity, role, and join date. Requires the `access_dashboard` permission on that team.","x-audience":"team","security":[{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"responses":{"200":{"description":"The team's members.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"membershipId":{"type":"string"},"userId":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"roleId":{"type":"string"},"roleName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isSystemRole":{"type":"boolean"},"isActive":{"type":"boolean"},"joinedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["membershipId","userId","email","firstName","lastName","avatar","roleId","roleName","isSystemRole","isActive","joinedAt"]}}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/api/v1/teams/{teamId}/members/{userId}":{"delete":{"operationId":"removeTeamMember","tags":["Members"],"summary":"Remove a team member","description":"Removes a member from a team. Requires the `remove_members` permission on that team; the team owner can never be removed this way.","x-audience":"team","security":[{"apiKey":["members:write"]},{"oauth2":["members:write"]}],"responses":{"200":{"description":"The member was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"userId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/api/v1/teams/{teamId}/roles":{"get":{"operationId":"listTeamRoles","tags":["Invitations"],"summary":"List the roles a team can assign","description":"Lists every role id accepted by createTeamInvitation, with the permissions each one grants. System roles (`owner`, `member`, `guest`) exist on every team and are passed with `isSystemRole: true`; roles the team defined itself are passed with `isSystemRole: false`. `isAssignable` is false for roles an invitation cannot grant, such as `owner`. Requires the `access_dashboard` permission.","x-audience":"team","security":[{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"responses":{"200":{"description":"The roles this team can assign.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"roleId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"isSystemRole":{"type":"boolean"},"isAssignable":{"type":"boolean"},"permissions":{"type":"array","items":{"type":"string"}}},"required":["roleId","name","isSystemRole","isAssignable","permissions"]}}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/api/v1/teams/{teamId}/invitations":{"get":{"operationId":"listTeamInvitations","tags":["Invitations"],"summary":"List pending team invitations","description":"Lists invitations that have not been accepted and have not expired. Requires the `invite_members` permission; callers without it receive an empty list, never invitee emails.","x-audience":"team","security":[{"apiKey":["members:read"]},{"oauth2":["members:read"]}],"responses":{"200":{"description":"The team's pending invitations.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"roleId":{"type":"string"},"roleName":{"anyOf":[{"type":"string"},{"type":"null"}]},"isSystemRole":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["id","email","roleId","roleName","isSystemRole","createdAt","expiresAt"]}}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]},"post":{"operationId":"createTeamInvitation","tags":["Invitations"],"summary":"Invite someone to a team","description":"Sends an invitation email for a team seat. `roleId` is optional and defaults to `member`; call listTeamRoles for the other ids this team accepts, and pass `isSystemRole: false` alongside a role the team defined itself. Requires the `invite_members` permission and a free seat on the team's plan — inviting past the seat limit answers 403, and the response detail names the limit. The response never reveals whether the address already has an account or is already a member.","x-audience":"team","security":[{"apiKey":["invites:write"]},{"oauth2":["invites:write"]}],"responses":{"201":{"description":"The invitation was sent.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","minLength":1,"maxLength":255,"format":"email"},"roleId":{"type":"string","minLength":1,"maxLength":255,"default":"member"},"isSystemRole":{"type":"boolean","default":true}},"required":["email"]}}}}}},"/api/v1/teams/{teamId}/invitations/{invitationId}":{"delete":{"operationId":"revokeTeamInvitation","tags":["Invitations"],"summary":"Revoke a pending invitation","description":"Deletes a pending invitation so its link stops working. Requires the `invite_members` permission. An already accepted or unknown invitation answers 404.","x-audience":"team","security":[{"apiKey":["invites:write"]},{"oauth2":["invites:write"]}],"responses":{"200":{"description":"The invitation was revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true},{"in":"path","name":"invitationId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/api/v1/teams/{teamId}/billing":{"get":{"operationId":"getTeamBilling","tags":["Billing"],"summary":"Get a team's subscription","description":"Read-only summary of a team's plan, subscription status, billing interval, add-on units, and renewal date. Requires the `access_billing` permission. Checkout and plan changes are not exposed over the API.","x-audience":"team","security":[{"apiKey":["billing:read"]},{"oauth2":["billing:read"]}],"responses":{"200":{"description":"The team's subscription.","content":{"application/json":{"schema":{"type":"object","properties":{"planId":{"type":"string"},"planName":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"interval":{"anyOf":[{"type":"string"},{"type":"null"}]},"addons":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"planExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"needsPaymentAction":{"type":"boolean"}},"required":["planId","planName","status","interval","addons","planExpiresAt","cancelAtPeriodEnd","needsPaymentAction"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}},"/api/v1/api-keys":{"get":{"operationId":"listApiKeys","tags":["API keys"],"summary":"List API keys","description":"Lists the caller's personal API keys, or a team's keys when `teamId` is given (which requires the `manage_api_keys` permission on that team). Revoked keys are never listed, and no response can ever contain a key's secret. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["api-keys:read"]},{"oauth2":["api-keys:read"]}],"responses":{"200":{"description":"The matching API keys.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"last4":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","keyPrefix","last4","scopes","teamId","createdAt","lastUsedAt","expiresAt"]}}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"query","name":"teamId","schema":{"type":"string","minLength":1,"maxLength":255}}]},"post":{"operationId":"createApiKey","tags":["API keys"],"summary":"Create an API key","description":"Creates an API key for the caller, or for a team when `teamId` is given. The scopes requested must be a subset of the calling credential's own scopes. The `secret` in the response is returned exactly once and is not recoverable afterwards. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["api-keys:write"]},{"oauth2":["api-keys:write"]}],"responses":{"201":{"description":"The created key and its one-time secret.","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"last4":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","keyPrefix","last4","scopes","teamId","createdAt","lastUsedAt","expiresAt"]},"secret":{"type":"string"}},"required":["key","secret"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"enum":["profile:read","profile:write","teams:read","teams:write","members:read","members:write","invites:write","billing:read","api-keys:read","api-keys:write"],"type":"string"},"minItems":1,"maxItems":10},"teamId":{"type":"string","minLength":1,"maxLength":255},"expiresInDays":{"type":"integer","minimum":1,"maximum":365}},"required":["name","scopes"]}}}}}},"/api/v1/api-keys/{keyId}":{"patch":{"operationId":"updateApiKey","tags":["API keys"],"summary":"Update an API key's scopes","description":"Replaces the scopes granted to an API key; the list is not merged with the key's current scopes, so send the full set you want it to end up with. The new scopes must be a subset of the calling credential's own scopes. The change takes effect immediately, including for the key making the call. Keys belonging to another account, and revoked keys, answer 404 so key ids cannot be probed. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["api-keys:write"]},{"oauth2":["api-keys:write"]}],"responses":{"200":{"description":"The updated key.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"last4":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","keyPrefix","last4","scopes","teamId","createdAt","lastUsedAt","expiresAt"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"keyId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scopes":{"type":"array","items":{"enum":["profile:read","profile:write","teams:read","teams:write","members:read","members:write","invites:write","billing:read","api-keys:read","api-keys:write"],"type":"string"},"minItems":1,"maxItems":10}},"required":["scopes"]}}}}},"delete":{"operationId":"revokeApiKey","tags":["API keys"],"summary":"Revoke an API key","description":"Revokes an API key immediately, including the key making the call. Keys belonging to another account answer 404 so key ids cannot be probed. Account-level: a team-scoped API key is refused with 403.","x-audience":"account","security":[{"apiKey":["api-keys:write"]},{"oauth2":["api-keys:write"]}],"responses":{"200":{"description":"The key was revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"const":true}},"required":["success"]}}}},"400":{"description":"The request body, query, or path failed validation.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"401":{"description":"The credential is missing, malformed, expired, or revoked.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"403":{"description":"The credential lacks the required scope or the caller lacks the team permission.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"404":{"description":"The addressed resource does not exist or is not visible to this credential.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}},"429":{"description":"Rate limit exceeded; retry after the number of seconds in `retry-after`. The `RateLimit-*` headers describe the exhausted bucket.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"number"},"code":{"type":"string"},"detail":{"type":"string"},"requestId":{"type":"string"},"retryAfter":{"type":"number"},"errors":{"type":"array","items":{"type":"object","properties":{"in":{"enum":["body","query","path","header","cookie"],"type":"string"},"pointer":{"type":"string"},"code":{"enum":["required","invalid_type","invalid_value","invalid_format","min_length","max_length","min_value","max_value"],"type":"string"},"params":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"}]}}},"required":["in","pointer","code"]}}},"required":["type","title","status","code","detail"]}}}}},"parameters":[{"in":"path","name":"keyId","schema":{"type":"string","minLength":1,"maxLength":255},"required":true}]}}}}