{"paths":{"/api/v1/auth/providers":{"get":{"tags":["auth"],"summary":"The social providers this server can sign in with","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["providers"],"properties":{"providers":{"type":"array","items":{"type":"string"}}}}}}}},"operationId":"getApiV1AuthProviders"}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"The authenticated user","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["user","session"],"properties":{"user":{"type":"object","required":["id","email","name","emailVerified","image"],"properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"emailVerified":{"type":"boolean"},"image":{"nullable":true,"type":["string","null"]}}},"session":{"type":"object","required":["id","expiresAt"],"properties":{"id":{"type":"string"},"expiresAt":{"type":"string"}}}}}}}},"401":{"description":"Response for status 401","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","enum":["bad_request","unauthenticated","forbidden","not_found","conflict","rate_limited","unprocessable","internal"]},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}}}}}}}}},"operationId":"getApiV1AuthMe"}},"/api/v1/organizations/{organizationId}/members/me":{"get":{"tags":["members"],"summary":"Get the signed-in member record","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["member"],"properties":{"member":{"type":"object","required":["memberId","userId","email","name","avatar","role","joinedAt"],"properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"type":["string","null"]},"role":{"type":"string"},"joinedAt":{"format":"date-time","type":"string"}}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdMembersMe"},"patch":{"tags":["members"],"summary":"Update the signed-in member name","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["member"],"properties":{"member":{"type":"object","required":["memberId","userId","email","name","avatar","role","joinedAt"],"properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"type":["string","null"]},"role":{"type":"string"},"joinedAt":{"format":"date-time","type":"string"}}}},"additionalProperties":false}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdMembersMe"}},"/api/v1/organizations/{organizationId}/members/{memberId}/role":{"put":{"tags":["members"],"summary":"Give a member a role","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"minLength":1,"maxLength":40,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["role"],"properties":{"role":{"minLength":1,"maxLength":40,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["role"],"properties":{"role":{"minLength":1,"maxLength":40,"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["member"],"properties":{"member":{"type":"object","required":["memberId","userId","email","name","avatar","role","joinedAt"],"properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"type":["string","null"]},"role":{"type":"string"},"joinedAt":{"format":"date-time","type":"string"}}}},"additionalProperties":false}}}}},"operationId":"putApiV1OrganizationsByOrganizationIdMembersByMemberIdRole"}},"/api/v1/organizations/{organizationId}/members":{"get":{"tags":["members"],"summary":"List the members of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["members"],"properties":{"members":{"type":"array","items":{"type":"object","required":["memberId","userId","email","name","avatar","role","joinedAt"],"properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"type":["string","null"]},"role":{"type":"string"},"joinedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdMembers"}},"/api/v1/organizations/{organizationId}/members/{memberId}":{"patch":{"tags":["members"],"summary":"Rename a member of the organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["member"],"properties":{"member":{"type":"object","required":["memberId","userId","email","name","avatar","role","joinedAt"],"properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"type":["string","null"]},"role":{"type":"string"},"joinedAt":{"format":"date-time","type":"string"}}}},"additionalProperties":false}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdMembersByMemberId"}},"/api/v1/organizations/{organizationId}/members/me/avatar":{"post":{"tags":["members"],"summary":"Request a presigned url to upload this member's avatar","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["upload"],"properties":{"upload":{"type":"object","required":["uploadUrl","key","expiresAt","maxBytes","allowedTypes"],"properties":{"uploadUrl":{"type":"string"},"key":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"maxBytes":{"type":"number"},"allowedTypes":{"type":"array","items":{"type":"string"}}}}},"additionalProperties":false}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdMembersMeAvatar"},"put":{"tags":["members"],"summary":"Attach an uploaded avatar to this member","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["member"],"properties":{"member":{"type":"object","required":["memberId","userId","email","name","avatar","role","joinedAt"],"properties":{"memberId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"avatar":{"type":["string","null"]},"role":{"type":"string"},"joinedAt":{"format":"date-time","type":"string"}}}},"additionalProperties":false}}}}},"operationId":"putApiV1OrganizationsByOrganizationIdMembersMeAvatar"}},"/api/v1/organizations/{organizationId}/platforms":{"get":{"tags":["platforms"],"summary":"List organization platforms","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["platforms"],"properties":{"platforms":{"type":"array","items":{"type":"object","required":["id","organizationId","name","slug","description","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdPlatforms"},"post":{"tags":["platforms"],"summary":"Create a platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":500,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":500,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","slug"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":500,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["platform"],"properties":{"platform":{"type":"object","required":["id","organizationId","name","slug","description","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdPlatforms"}},"/api/v1/organizations/{organizationId}/platforms/{platformId}":{"get":{"tags":["platforms"],"summary":"Get one platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["platform"],"properties":{"platform":{"type":"object","required":["id","organizationId","name","slug","description","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdPlatformsByPlatformId"},"patch":{"tags":["platforms"],"summary":"Update a platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"description":{"maxLength":500,"type":["string","null"]}}}},"application/x-www-form-urlencoded":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"description":{"maxLength":500,"type":["string","null"]}}}},"multipart/form-data":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"description":{"maxLength":500,"type":["string","null"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["platform"],"properties":{"platform":{"type":"object","required":["id","organizationId","name","slug","description","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdPlatformsByPlatformId"},"delete":{"tags":["platforms"],"summary":"Delete a platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdPlatformsByPlatformId"}},"/api/v1/organizations/{organizationId}/keys":{"get":{"tags":["api-keys"],"summary":"List every api key of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"object","required":["id","name","prefix","scope","platformId","enabled","createdAt","expiresAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["organization","platform"]},"platformId":{"type":["string","null"]},"enabled":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":["string","null"]}}}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdKeys"},"post":{"tags":["api-keys"],"summary":"Create an api key for an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","permissions"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"scope":{"type":"string","enum":["organization","platform"]},"platformId":{"type":"string"},"expiresInSeconds":{"minimum":3600,"maximum":31536000,"type":"number"},"permissions":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","permissions"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"scope":{"type":"string","enum":["organization","platform"]},"platformId":{"type":"string"},"expiresInSeconds":{"minimum":3600,"maximum":31536000,"type":"number"},"permissions":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","permissions"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"scope":{"type":"string","enum":["organization","platform"]},"platformId":{"type":"string"},"expiresInSeconds":{"minimum":3600,"maximum":31536000,"type":"number"},"permissions":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"type":"object","required":["id","name","prefix","scope","platformId","key","expiresAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["organization","platform"]},"platformId":{"type":["string","null"]},"key":{"type":"string"},"expiresAt":{"format":"date-time","type":["string","null"]}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdKeys"}},"/api/v1/organizations/{organizationId}/keys/{keyId}":{"patch":{"tags":["api-keys"],"summary":"Rename or revoke an api key","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"type":"object","required":["id","name","prefix","scope","platformId","enabled","createdAt","expiresAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"scope":{"type":"string","enum":["organization","platform"]},"platformId":{"type":["string","null"]},"enabled":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":["string","null"]}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdKeysByKeyId"},"delete":{"tags":["api-keys"],"summary":"Delete an api key","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdKeysByKeyId"}},"/api/v1/organizations/{organizationId}/roles":{"get":{"tags":["roles"],"summary":"List the custom roles of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["roles"],"properties":{"roles":{"type":"array","items":{"type":"object","required":["role","permission","createdAt","updatedAt"],"properties":{"role":{"type":"string"},"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdRoles"},"post":{"tags":["roles"],"summary":"Create a custom role","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role","permission"],"properties":{"role":{"minLength":1,"maxLength":40,"type":"string"},"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["role","permission"],"properties":{"role":{"minLength":1,"maxLength":40,"type":"string"},"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["role","permission"],"properties":{"role":{"minLength":1,"maxLength":40,"type":"string"},"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"object","required":["role","permission","createdAt","updatedAt"],"properties":{"role":{"type":"string"},"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdRoles"}},"/api/v1/organizations/{organizationId}/roles/{role}":{"patch":{"tags":["roles"],"summary":"Change what a custom role may do","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"role","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["permission"],"properties":{"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["permission"],"properties":{"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["permission"],"properties":{"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"object","required":["role","permission","createdAt","updatedAt"],"properties":{"role":{"type":"string"},"permission":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{"type":"string"}}}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdRolesByRole"},"delete":{"tags":["roles"],"summary":"Delete a custom role","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"role","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdRolesByRole"}},"/api/v1/organizations/{organizationId}/usage":{"get":{"tags":["usage"],"summary":"Read the usage of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}$","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["period","counters","storageBytes"],"properties":{"period":{"type":"object","required":["start","end"],"properties":{"start":{"format":"date-time","type":"string"},"end":{"format":"date-time","type":"string"}}},"counters":{"type":"array","items":{"type":"object","required":["platformId","metric","value"],"properties":{"platformId":{"type":["string","null"]},"metric":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created","bandwidth_bytes"]},"value":{"type":"number"}}}},"storageBytes":{"type":"number"}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdUsage"}},"/api/v1/organizations/{organizationId}/usage/daily":{"get":{"tags":["usage"],"summary":"Daily breakdown for a metric","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"metric","in":"query","required":true,"schema":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created"]}},{"name":"from","in":"query","required":true,"schema":{"format":"date-time","type":"string"}},{"name":"to","in":"query","required":true,"schema":{"format":"date-time","type":"string"}},{"name":"platformId","in":"query","required":false,"schema":{"type":"string"}},{"name":"gameId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["metric","rows"],"properties":{"metric":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created"]},"rows":{"type":"array","items":{"type":"object","required":["date","value"],"properties":{"date":{"type":"string"},"value":{"type":"number"}}}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdUsageDaily"}},"/api/v1/organizations/{organizationId}/usage/storage":{"get":{"tags":["usage"],"summary":"Storage breakdown by game and template","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["games","templates","totalGames","totalTemplates","total"],"properties":{"games":{"type":"array","items":{"type":"object","required":["id","name","slug","sizeBytes","fileCount"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"sizeBytes":{"type":"number"},"fileCount":{"type":"number"}}}},"templates":{"type":"array","items":{"type":"object","required":["id","name","slug","sizeBytes"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"sizeBytes":{"type":"number"}}}},"totalGames":{"type":"number"},"totalTemplates":{"type":"number"},"total":{"type":"number"}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdUsageStorage"}},"/api/v1/platforms/{platformId}/usage":{"get":{"tags":["usage"],"summary":"Read the usage of the calling platform","parameters":[{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"pattern":"^\\d{4}-\\d{2}$","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["period","counters"],"properties":{"period":{"type":"object","required":["start","end"],"properties":{"start":{"format":"date-time","type":"string"},"end":{"format":"date-time","type":"string"}}},"counters":{"type":"object","required":["sessions_created","scores_submitted","matches_created","tournaments_created"],"properties":{"sessions_created":{"type":"number"},"scores_submitted":{"type":"number"},"matches_created":{"type":"number"},"tournaments_created":{"type":"number"}}}}}}}}},"operationId":"getApiV1PlatformsByPlatformIdUsage"}},"/api/v1/organizations/{organizationId}/quotas":{"get":{"tags":["usage"],"summary":"List the quotas of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["quotas"],"properties":{"quotas":{"type":"array","items":{"type":"object","required":["id","metric","period","limitValue"],"properties":{"id":{"type":"string"},"metric":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created","bandwidth_bytes"]},"period":{"const":"monthly","type":"string"},"limitValue":{"type":"number"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdQuotas"},"put":{"tags":["usage"],"summary":"Set a monthly quota","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["metric","limitValue"],"properties":{"metric":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created","bandwidth_bytes"]},"limitValue":{"minimum":0,"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["metric","limitValue"],"properties":{"metric":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created","bandwidth_bytes"]},"limitValue":{"minimum":0,"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["metric","limitValue"],"properties":{"metric":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created","bandwidth_bytes"]},"limitValue":{"minimum":0,"type":"number"}}}}}},"operationId":"putApiV1OrganizationsByOrganizationIdQuotas"}},"/api/v1/organizations/{organizationId}/quotas/{metric}":{"delete":{"tags":["usage"],"summary":"Remove a monthly quota","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"metric","in":"path","required":true,"schema":{"type":"string","enum":["sessions_created","scores_submitted","matches_created","tournaments_created","bandwidth_bytes"]}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdQuotasByMetric"}},"/api/v1/organizations/{organizationId}/agents/specs":{"get":{"tags":["agents"],"summary":"List the model providers this API can reach","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["specs"],"properties":{"specs":{"type":"array","items":{"type":"object","required":["id","label","baseUrl","models"],"properties":{"id":{"minLength":1,"maxLength":120,"type":"string"},"label":{"type":"string"},"baseUrl":{"type":"string"},"models":{"type":"array","items":{"type":"object","required":["id","label"],"properties":{"id":{"type":"string"},"label":{"type":"string"}}}}}}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAgentsSpecs"}},"/api/v1/organizations/{organizationId}/agents/providers":{"get":{"tags":["agents"],"summary":"List the model providers of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["providers"],"properties":{"providers":{"type":"array","items":{"type":"object","required":["id","name","spec","baseUrl","model","hasKey","isDefault","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"spec":{"minLength":1,"maxLength":120,"type":"string"},"baseUrl":{"type":"string"},"model":{"type":"string"},"hasKey":{"type":"boolean"},"isDefault":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAgentsProviders"},"post":{"tags":["agents"],"summary":"Add a model provider","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","spec","model"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"spec":{"minLength":1,"maxLength":120,"type":"string"},"model":{"minLength":1,"maxLength":200,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"isDefault":{"type":"boolean"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","spec","model"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"spec":{"minLength":1,"maxLength":120,"type":"string"},"model":{"minLength":1,"maxLength":200,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"isDefault":{"type":"boolean"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","required":["name","spec","model"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"},"spec":{"minLength":1,"maxLength":120,"type":"string"},"model":{"minLength":1,"maxLength":200,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"isDefault":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["id","name","spec","baseUrl","model","hasKey","isDefault","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"spec":{"minLength":1,"maxLength":120,"type":"string"},"baseUrl":{"type":"string"},"model":{"type":"string"},"hasKey":{"type":"boolean"},"isDefault":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"}},"additionalProperties":false}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdAgentsProviders"}},"/api/v1/organizations/{organizationId}/agents/providers/{providerId}":{"patch":{"tags":["agents"],"summary":"Update a model provider","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"providerId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"minLength":1,"maxLength":200,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"isDefault":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"model":{"minLength":1,"maxLength":200,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"isDefault":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"model":{"minLength":1,"maxLength":200,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"isDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["id","name","spec","baseUrl","model","hasKey","isDefault","createdAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"spec":{"minLength":1,"maxLength":120,"type":"string"},"baseUrl":{"type":"string"},"model":{"type":"string"},"hasKey":{"type":"boolean"},"isDefault":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"}},"additionalProperties":false}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdAgentsProvidersByProviderId"},"delete":{"tags":["agents"],"summary":"Remove a model provider","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"providerId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdAgentsProvidersByProviderId"}},"/api/v1/organizations/{organizationId}/agents/sessions":{"get":{"tags":["agents"],"summary":"List the agent sessions of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["sessions"],"properties":{"sessions":{"type":"array","items":{"type":"object","required":["id","gameId","projectId","title","pinned","runs","updatedAt"],"properties":{"id":{"type":"string"},"gameId":{"nullable":true,"type":["string","null"]},"projectId":{"nullable":true,"type":["string","null"]},"title":{"type":"string"},"pinned":{"type":"boolean"},"runs":{"type":"number"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAgentsSessions"},"post":{"tags":["agents"],"summary":"Start an agent session","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":120,"type":"string"},"gameId":{"type":"string"},"projectId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":120,"type":"string"},"gameId":{"type":"string"},"projectId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":120,"type":"string"},"gameId":{"type":"string"},"projectId":{"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["id","gameId","projectId","title","pinned","runs","updatedAt"],"properties":{"id":{"type":"string"},"gameId":{"nullable":true,"type":["string","null"]},"projectId":{"nullable":true,"type":["string","null"]},"title":{"type":"string"},"pinned":{"type":"boolean"},"runs":{"type":"number"},"updatedAt":{"format":"date-time","type":"string"}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdAgentsSessions"}},"/api/v1/organizations/{organizationId}/agents/projects":{"get":{"tags":["agents"],"summary":"List the agent projects of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["projects"],"properties":{"projects":{"type":"array","items":{"type":"object","required":["id","name","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAgentsProjects"},"post":{"tags":["agents"],"summary":"Create an agent project","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["id","name","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdAgentsProjects"}},"/api/v1/organizations/{organizationId}/agents/projects/{projectId}":{"patch":{"tags":["agents"],"summary":"Rename an agent project","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":80,"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["id","name","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdAgentsProjectsByProjectId"},"delete":{"tags":["agents"],"summary":"Delete an agent project and free its sessions","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdAgentsProjectsByProjectId"}},"/api/v1/organizations/{organizationId}/agents/sessions/{sessionId}":{"patch":{"tags":["agents"],"summary":"Rename, pin, move, or bind an agent session to a game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":120,"type":"string"},"pinned":{"type":"boolean"},"projectId":{"nullable":true,"type":["string","null"]},"gameId":{"nullable":true,"type":["string","null"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":120,"type":"string"},"pinned":{"type":"boolean"},"projectId":{"nullable":true,"type":["string","null"]},"gameId":{"nullable":true,"type":["string","null"]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"title":{"minLength":1,"maxLength":120,"type":"string"},"pinned":{"type":"boolean"},"projectId":{"nullable":true,"type":["string","null"]},"gameId":{"nullable":true,"type":["string","null"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["id","gameId","projectId","title","pinned","runs","updatedAt"],"properties":{"id":{"type":"string"},"gameId":{"nullable":true,"type":["string","null"]},"projectId":{"nullable":true,"type":["string","null"]},"title":{"type":"string"},"pinned":{"type":"boolean"},"runs":{"type":"number"},"updatedAt":{"format":"date-time","type":"string"}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdAgentsSessionsBySessionId"},"delete":{"tags":["agents"],"summary":"Delete an agent session and its runs","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdAgentsSessionsBySessionId"}},"/api/v1/organizations/{organizationId}/agents/sessions/{sessionId}/messages":{"get":{"tags":["agents"],"summary":"List the turns of an agent session","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["turns"],"properties":{"turns":{"type":"array","items":{"type":"object","required":["id","runId","role","text","model","status","durationMs","createdAt"],"properties":{"id":{"type":"string"},"runId":{"type":"string"},"role":{"type":"string","enum":["user","assistant"]},"text":{"type":"string"},"model":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","refused","awaiting_approval"]},"durationMs":{"type":"number"},"createdAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAgentsSessionsBySessionIdMessages"}},"/api/v1/organizations/{organizationId}/agents/models":{"post":{"tags":["agents"],"summary":"List the models a provider exposes","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spec":{"minLength":1,"maxLength":120,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"providerId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"spec":{"minLength":1,"maxLength":120,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"providerId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"spec":{"minLength":1,"maxLength":120,"type":"string"},"baseUrl":{"format":"uri","maxLength":500,"type":"string"},"apiKey":{"minLength":1,"maxLength":400,"type":"string"},"providerId":{"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["models"],"properties":{"models":{"type":"array","items":{"type":"string"}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdAgentsModels"}},"/api/v1/organizations/{organizationId}/agents/runs":{"get":{"tags":["agents"],"summary":"List the recent agent runs","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["runs"],"properties":{"runs":{"type":"array","items":{"type":"object","required":["id","providerId","model","prompt","output","status","durationMs","error","createdAt"],"properties":{"id":{"type":"string"},"providerId":{"nullable":true,"type":["string","null"]},"model":{"type":"string"},"prompt":{"type":"string"},"output":{"nullable":true,"type":["string","null"]},"status":{"type":"string","enum":["succeeded","failed","refused","awaiting_approval"]},"durationMs":{"type":"number"},"error":{"nullable":true,"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAgentsRuns"}},"/api/v1/organizations/{organizationId}/agents/run":{"post":{"tags":["agents"],"summary":"Run a prompt through a model provider","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"minLength":1,"maxLength":32000,"type":"string"},"providerId":{"type":"string"},"sessionId":{"type":"string"},"gameId":{"type":"string"},"mode":{"type":"string","enum":["agent","plan"]},"attachments":{"maxItems":8,"type":"array","items":{"type":"object","required":["name","mediaType","data"],"properties":{"name":{"minLength":1,"maxLength":200,"type":"string"},"mediaType":{"minLength":1,"maxLength":120,"type":"string"},"data":{"minLength":1,"maxLength":8000000,"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"minLength":1,"maxLength":32000,"type":"string"},"providerId":{"type":"string"},"sessionId":{"type":"string"},"gameId":{"type":"string"},"mode":{"type":"string","enum":["agent","plan"]},"attachments":{"maxItems":8,"type":"array","items":{"type":"object","required":["name","mediaType","data"],"properties":{"name":{"minLength":1,"maxLength":200,"type":"string"},"mediaType":{"minLength":1,"maxLength":120,"type":"string"},"data":{"minLength":1,"maxLength":8000000,"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"minLength":1,"maxLength":32000,"type":"string"},"providerId":{"type":"string"},"sessionId":{"type":"string"},"gameId":{"type":"string"},"mode":{"type":"string","enum":["agent","plan"]},"attachments":{"maxItems":8,"type":"array","items":{"type":"object","required":["name","mediaType","data"],"properties":{"name":{"minLength":1,"maxLength":200,"type":"string"},"mediaType":{"minLength":1,"maxLength":120,"type":"string"},"data":{"minLength":1,"maxLength":8000000,"type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdAgentsRun"}},"/api/v1/organizations/{organizationId}/agents/sessions/{sessionId}/approvals":{"get":{"tags":["agents"],"summary":"List the tool calls an agent session is waiting on","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["pending"],"properties":{"pending":{"type":"array","items":{"type":"object","required":["agentRunId","callId","tool","args"],"properties":{"agentRunId":{"type":"string"},"callId":{"type":"string"},"tool":{"type":"string"},"args":{}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAgentsSessionsBySessionIdApprovals"},"post":{"tags":["agents"],"summary":"Allow or deny a tool call the agent is waiting on","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agentRunId","callId","approved"],"properties":{"agentRunId":{"minLength":1,"maxLength":64,"type":"string"},"callId":{"minLength":1,"maxLength":200,"type":"string"},"approved":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["agentRunId","callId","approved"],"properties":{"agentRunId":{"minLength":1,"maxLength":64,"type":"string"},"callId":{"minLength":1,"maxLength":200,"type":"string"},"approved":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["agentRunId","callId","approved"],"properties":{"agentRunId":{"minLength":1,"maxLength":64,"type":"string"},"callId":{"minLength":1,"maxLength":200,"type":"string"},"approved":{"type":"boolean"}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdAgentsSessionsBySessionIdApprovals"}},"/api/v1/assistant":{"post":{"tags":["assistant"],"summary":"Ask the Wasanni docs assistant a question","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messages"],"properties":{"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","required":["role","text"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"minLength":1,"maxLength":8000,"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["messages"],"properties":{"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","required":["role","text"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"minLength":1,"maxLength":8000,"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["messages"],"properties":{"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","required":["role","text"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"text":{"minLength":1,"maxLength":8000,"type":"string"}}}}}}}}},"operationId":"postApiV1Assistant"}},"/api/v1/organizations/{organizationId}/export":{"post":{"tags":["organization"],"summary":"Export all organization data as JSON","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["exportedAt","organization","counts","limits","data"],"properties":{"exportedAt":{"format":"date-time","type":"string"},"organization":{"type":"object","required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}},"counts":{"type":"object","patternProperties":{"^(.*)$":{"type":"number"}}},"limits":{"type":"object","required":["sessions","scores"],"properties":{"sessions":{"type":"number"},"scores":{"type":"number"}}},"data":{"type":"object","patternProperties":{"^(.*)$":{"type":"array","items":{}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdExport"}},"/api/v1/organizations/{organizationId}/logo":{"post":{"tags":["organizations"],"summary":"Request a presigned url to upload this organization's logo","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["upload"],"properties":{"upload":{"type":"object","required":["uploadUrl","key","expiresAt","maxBytes","allowedTypes"],"properties":{"uploadUrl":{"type":"string"},"key":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"maxBytes":{"type":"number"},"allowedTypes":{"type":"array","items":{"type":"string"}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdLogo"},"put":{"tags":["organizations"],"summary":"Attach an uploaded organization logo","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["logo"],"properties":{"logo":{"type":["string","null"]}}}}}}},"operationId":"putApiV1OrganizationsByOrganizationIdLogo"}},"/api/v1/organizations/{organizationId}/games":{"get":{"tags":["games"],"summary":"List the organization's games","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"hosting","in":"query","required":false,"schema":{"type":"string","enum":["hosted","external"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","active","archived"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["games"],"properties":{"games":{"type":"array","items":{"type":"object","required":["id","organizationId","name","slug","description","imageUrl","hints","hosting","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"hints":{"type":"array","items":{"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]},"status":{"type":"string","enum":["draft","active","archived"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdGames"},"post":{"tags":["games"],"summary":"Create a game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","slug","hosting"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":"string"},"hints":{"maxLength":20,"type":"array","items":{"minLength":1,"maxLength":200,"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","slug","hosting"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":"string"},"hints":{"maxLength":20,"type":"array","items":{"minLength":1,"maxLength":200,"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","slug","hosting"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":"string"},"hints":{"maxLength":20,"type":"array","items":{"minLength":1,"maxLength":200,"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"object","required":["id","organizationId","name","slug","description","imageUrl","hints","hosting","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"hints":{"type":"array","items":{"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]},"status":{"type":"string","enum":["draft","active","archived"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGames"}},"/api/v1/organizations/{organizationId}/games/{gameId}":{"get":{"tags":["games"],"summary":"Get one game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"object","required":["id","organizationId","name","slug","description","imageUrl","hints","hosting","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"hints":{"type":"array","items":{"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]},"status":{"type":"string","enum":["draft","active","archived"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdGamesByGameId"},"patch":{"tags":["games"],"summary":"Update a game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"imageUrl":{"type":"null"},"hints":{"maxLength":20,"type":"array","items":{"minLength":1,"maxLength":200,"type":"string"}}}}},"application/x-www-form-urlencoded":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"imageUrl":{"type":"null"},"hints":{"maxLength":20,"type":"array","items":{"minLength":1,"maxLength":200,"type":"string"}}}}},"multipart/form-data":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"description":{"maxLength":1000,"type":["string","null"]},"imageUrl":{"type":"null"},"hints":{"maxLength":20,"type":"array","items":{"minLength":1,"maxLength":200,"type":"string"}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"object","required":["id","organizationId","name","slug","description","imageUrl","hints","hosting","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"hints":{"type":"array","items":{"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]},"status":{"type":"string","enum":["draft","active","archived"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdGamesByGameId"},"delete":{"tags":["games"],"summary":"Delete a game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdGamesByGameId"}},"/api/v1/organizations/{organizationId}/games/{gameId}/image":{"post":{"tags":["games"],"summary":"Request a presigned url to upload this game's image","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["upload"],"properties":{"upload":{"type":"object","required":["uploadUrl","key","expiresAt","maxBytes","allowedTypes"],"properties":{"uploadUrl":{"type":"string"},"key":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"maxBytes":{"type":"number"},"allowedTypes":{"type":"array","items":{"type":"string"}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdImage"},"put":{"tags":["games"],"summary":"Attach an uploaded game image","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"object","required":["id","organizationId","name","slug","description","imageUrl","hints","hosting","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"hints":{"type":"array","items":{"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]},"status":{"type":"string","enum":["draft","active","archived"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"putApiV1OrganizationsByOrganizationIdGamesByGameIdImage"}},"/api/v1/organizations/{organizationId}/games/{gameId}/publish":{"post":{"tags":["games"],"summary":"Publish a game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"object","required":["id","organizationId","name","slug","description","imageUrl","hints","hosting","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"hints":{"type":"array","items":{"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]},"status":{"type":"string","enum":["draft","active","archived"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdPublish"}},"/api/v1/organizations/{organizationId}/games/{gameId}/archive":{"post":{"tags":["games"],"summary":"Archive a game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["game"],"properties":{"game":{"type":"object","required":["id","organizationId","name","slug","description","imageUrl","hints","hosting","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"hints":{"type":"array","items":{"type":"string"}},"hosting":{"type":"string","enum":["hosted","external"]},"status":{"type":"string","enum":["draft","active","archived"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdArchive"}},"/api/v1/organizations/{organizationId}/games/{gameId}/files":{"get":{"tags":["game-files"],"summary":"List the files of a game","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","platformId","platformSlug","version","sizeBytes","contentType","etag","status","kind","entryPoint","crossOriginIsolation","spaFallback","servedPrefix","isCurrent","createdAt","readyAt","uploadExpiresAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":["string","null"]},"platformSlug":{"type":["string","null"]},"version":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"},"etag":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","extracting","ready","failed"]},"kind":{"type":"string","enum":["single","bundle"]},"entryPoint":{"type":"string"},"crossOriginIsolation":{"type":"boolean"},"spaFallback":{"type":"boolean"},"servedPrefix":{"type":["string","null"]},"isCurrent":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"readyAt":{"format":"date-time","type":["string","null"]},"uploadExpiresAt":{"format":"date-time","type":["string","null"]}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdGamesByGameIdFiles"}},"/api/v1/organizations/{organizationId}/games/{gameId}/files/upload":{"post":{"tags":["game-files"],"summary":"Ask for an upload url for a game file","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","version","contentType","sizeBytes"],"properties":{"filename":{"minLength":1,"maxLength":200,"type":"string"},"platformId":{"minLength":1,"maxLength":64,"type":"string"},"version":{"minLength":1,"maxLength":40,"type":"string"},"contentType":{"minLength":1,"maxLength":120,"type":"string"},"sizeBytes":{"minimum":1,"maximum":5368709120,"type":"number"},"kind":{"type":"string","enum":["single","bundle"]},"entryPoint":{"minLength":1,"maxLength":200,"type":"string"},"crossOriginIsolation":{"type":"boolean"},"spaFallback":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["filename","version","contentType","sizeBytes"],"properties":{"filename":{"minLength":1,"maxLength":200,"type":"string"},"platformId":{"minLength":1,"maxLength":64,"type":"string"},"version":{"minLength":1,"maxLength":40,"type":"string"},"contentType":{"minLength":1,"maxLength":120,"type":"string"},"sizeBytes":{"minimum":1,"maximum":5368709120,"type":"number"},"kind":{"type":"string","enum":["single","bundle"]},"entryPoint":{"minLength":1,"maxLength":200,"type":"string"},"crossOriginIsolation":{"type":"boolean"},"spaFallback":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["filename","version","contentType","sizeBytes"],"properties":{"filename":{"minLength":1,"maxLength":200,"type":"string"},"platformId":{"minLength":1,"maxLength":64,"type":"string"},"version":{"minLength":1,"maxLength":40,"type":"string"},"contentType":{"minLength":1,"maxLength":120,"type":"string"},"sizeBytes":{"minimum":1,"maximum":5368709120,"type":"number"},"kind":{"type":"string","enum":["single","bundle"]},"entryPoint":{"minLength":1,"maxLength":200,"type":"string"},"crossOriginIsolation":{"type":"boolean"},"spaFallback":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["file","upload"],"properties":{"file":{"type":"object","required":["id","organizationId","gameId","platformId","platformSlug","version","sizeBytes","contentType","etag","status","kind","entryPoint","crossOriginIsolation","spaFallback","servedPrefix","isCurrent","createdAt","readyAt","uploadExpiresAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":["string","null"]},"platformSlug":{"type":["string","null"]},"version":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"},"etag":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","extracting","ready","failed"]},"kind":{"type":"string","enum":["single","bundle"]},"entryPoint":{"type":"string"},"crossOriginIsolation":{"type":"boolean"},"spaFallback":{"type":"boolean"},"servedPrefix":{"type":["string","null"]},"isCurrent":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"readyAt":{"format":"date-time","type":["string","null"]},"uploadExpiresAt":{"format":"date-time","type":["string","null"]}}},"upload":{"type":"object","required":["key","url","method","headers","sizeBytes","expiresAt"],"properties":{"key":{"type":"string"},"url":{"type":"string"},"method":{"const":"PUT","type":"string"},"headers":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"sizeBytes":{"type":"number"},"expiresAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdFilesUpload"}},"/api/v1/organizations/{organizationId}/games/{gameId}/files/{fileId}/complete":{"post":{"tags":["game-files"],"summary":"Confirm an uploaded game file","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"object","required":["id","organizationId","gameId","platformId","platformSlug","version","sizeBytes","contentType","etag","status","kind","entryPoint","crossOriginIsolation","spaFallback","servedPrefix","isCurrent","createdAt","readyAt","uploadExpiresAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":["string","null"]},"platformSlug":{"type":["string","null"]},"version":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"},"etag":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","extracting","ready","failed"]},"kind":{"type":"string","enum":["single","bundle"]},"entryPoint":{"type":"string"},"crossOriginIsolation":{"type":"boolean"},"spaFallback":{"type":"boolean"},"servedPrefix":{"type":["string","null"]},"isCurrent":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"readyAt":{"format":"date-time","type":["string","null"]},"uploadExpiresAt":{"format":"date-time","type":["string","null"]}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdFilesByFileIdComplete"}},"/api/v1/organizations/{organizationId}/games/{gameId}/files/{fileId}/download-url":{"get":{"tags":["game-files"],"summary":"Ask for a download url for a game file","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdGamesByGameIdFilesByFileIdDownload-url"}},"/api/v1/organizations/{organizationId}/games/{gameId}/files/{fileId}":{"delete":{"tags":["game-files"],"summary":"Delete a game file","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdGamesByGameIdFilesByFileId"}},"/api/v1/organizations/{organizationId}/assignments":{"get":{"tags":["assignments"],"summary":"List every assignment in an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["assignments"],"properties":{"assignments":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","platformId","status","createdAt","updatedAt","gameName","gameSlug","gameHosting","gameStatus","platformName","platformSlug"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"gameName":{"type":"string"},"gameSlug":{"type":"string"},"gameHosting":{"type":"string"},"gameStatus":{"type":"string"},"platformName":{"type":"string"},"platformSlug":{"type":"string"}}}}},"additionalProperties":false}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAssignments"}},"/api/v1/organizations/{organizationId}/games/{gameId}/assignments":{"get":{"tags":["assignments"],"summary":"List the platforms a game is on","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["assignments"],"properties":{"assignments":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","platformId","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdGamesByGameIdAssignments"},"post":{"tags":["assignments"],"summary":"Put a game on a platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"minLength":1,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"minLength":1,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"minLength":1,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["assignment"],"properties":{"assignment":{"type":"object","required":["id","organizationId","gameId","platformId","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdAssignments"}},"/api/v1/organizations/{organizationId}/games/{gameId}/assignments/{assignmentId}":{"delete":{"tags":["assignments"],"summary":"Take a game off a platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assignmentId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdGamesByGameIdAssignmentsByAssignmentId"}},"/api/v1/organizations/{organizationId}/platforms/{platformId}/games":{"get":{"tags":["assignments"],"summary":"List the games on a platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["assignments"],"properties":{"assignments":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","platformId","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdGames"}},"/api/v1/organizations/{organizationId}/games/{gameId}/assignments/{assignmentId}/configs":{"get":{"tags":["game-configs"],"summary":"List the configs of an assignment","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assignmentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["configs"],"properties":{"configs":{"type":"array","items":{"type":"object","required":["id","assignmentId","name","config","isDefault","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"assignmentId":{"type":"string"},"name":{"type":"string"},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"isDefault":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdGamesByGameIdAssignmentsByAssignmentIdConfigs"},"post":{"tags":["game-configs"],"summary":"Create a config for an assignment","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assignmentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"config":{"allOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"object","properties":{"scoreVerification":{"anyOf":[{"type":"object","required":["mode"],"properties":{"mode":{"const":"none","type":"string"}}},{"type":"object","required":["mode","callback"],"properties":{"mode":{"const":"callback","type":"string"},"callback":{"type":"object","required":["url"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"},"timeoutMs":{"minimum":100,"maximum":10000,"type":"number"}}}}},{"type":"object","required":["mode"],"properties":{"mode":{"const":"vision","type":"string"},"timeoutMs":{"minimum":100,"maximum":20000,"type":"number"}}}]}}}]},"schemaVersion":{"minimum":1,"maximum":1000,"type":"number"},"isDefault":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"config":{"allOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"object","properties":{"scoreVerification":{"anyOf":[{"type":"object","required":["mode"],"properties":{"mode":{"const":"none","type":"string"}}},{"type":"object","required":["mode","callback"],"properties":{"mode":{"const":"callback","type":"string"},"callback":{"type":"object","required":["url"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"},"timeoutMs":{"minimum":100,"maximum":10000,"type":"number"}}}}},{"type":"object","required":["mode"],"properties":{"mode":{"const":"vision","type":"string"},"timeoutMs":{"minimum":100,"maximum":20000,"type":"number"}}}]}}}]},"schemaVersion":{"minimum":1,"maximum":1000,"type":"number"},"isDefault":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"config":{"allOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"object","properties":{"scoreVerification":{"anyOf":[{"type":"object","required":["mode"],"properties":{"mode":{"const":"none","type":"string"}}},{"type":"object","required":["mode","callback"],"properties":{"mode":{"const":"callback","type":"string"},"callback":{"type":"object","required":["url"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"},"timeoutMs":{"minimum":100,"maximum":10000,"type":"number"}}}}},{"type":"object","required":["mode"],"properties":{"mode":{"const":"vision","type":"string"},"timeoutMs":{"minimum":100,"maximum":20000,"type":"number"}}}]}}}]},"schemaVersion":{"minimum":1,"maximum":1000,"type":"number"},"isDefault":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["config"],"properties":{"config":{"type":"object","required":["id","assignmentId","name","config","isDefault","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"assignmentId":{"type":"string"},"name":{"type":"string"},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"isDefault":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdAssignmentsByAssignmentIdConfigs"}},"/api/v1/organizations/{organizationId}/games/{gameId}/assignments/{assignmentId}/configs/{configId}":{"patch":{"tags":["game-configs"],"summary":"Update a config of an assignment","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assignmentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"configId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"config":{"allOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"object","properties":{"scoreVerification":{"anyOf":[{"type":"object","required":["mode"],"properties":{"mode":{"const":"none","type":"string"}}},{"type":"object","required":["mode","callback"],"properties":{"mode":{"const":"callback","type":"string"},"callback":{"type":"object","required":["url"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"},"timeoutMs":{"minimum":100,"maximum":10000,"type":"number"}}}}},{"type":"object","required":["mode"],"properties":{"mode":{"const":"vision","type":"string"},"timeoutMs":{"minimum":100,"maximum":20000,"type":"number"}}}]}}}]},"schemaVersion":{"minimum":1,"maximum":1000,"type":"number"},"isDefault":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"config":{"allOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"object","properties":{"scoreVerification":{"anyOf":[{"type":"object","required":["mode"],"properties":{"mode":{"const":"none","type":"string"}}},{"type":"object","required":["mode","callback"],"properties":{"mode":{"const":"callback","type":"string"},"callback":{"type":"object","required":["url"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"},"timeoutMs":{"minimum":100,"maximum":10000,"type":"number"}}}}},{"type":"object","required":["mode"],"properties":{"mode":{"const":"vision","type":"string"},"timeoutMs":{"minimum":100,"maximum":20000,"type":"number"}}}]}}}]},"schemaVersion":{"minimum":1,"maximum":1000,"type":"number"},"isDefault":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"config":{"allOf":[{"type":"object","patternProperties":{"^(.*)$":{}}},{"type":"object","properties":{"scoreVerification":{"anyOf":[{"type":"object","required":["mode"],"properties":{"mode":{"const":"none","type":"string"}}},{"type":"object","required":["mode","callback"],"properties":{"mode":{"const":"callback","type":"string"},"callback":{"type":"object","required":["url"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"secret":{"minLength":16,"maxLength":200,"type":"string"},"timeoutMs":{"minimum":100,"maximum":10000,"type":"number"}}}}},{"type":"object","required":["mode"],"properties":{"mode":{"const":"vision","type":"string"},"timeoutMs":{"minimum":100,"maximum":20000,"type":"number"}}}]}}}]},"schemaVersion":{"minimum":1,"maximum":1000,"type":"number"},"isDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["config"],"properties":{"config":{"type":"object","required":["id","assignmentId","name","config","isDefault","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"assignmentId":{"type":"string"},"name":{"type":"string"},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"isDefault":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdGamesByGameIdAssignmentsByAssignmentIdConfigsByConfigId"},"delete":{"tags":["game-configs"],"summary":"Delete a config of an assignment","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assignmentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"configId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdGamesByGameIdAssignmentsByAssignmentIdConfigsByConfigId"}},"/api/v1/platforms/{platformId}/games":{"get":{"tags":["games"],"summary":"List the games assigned to a platform of your organization","parameters":[{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["assignments"],"properties":{"assignments":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","platformId","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1PlatformsByPlatformIdGames"}},"/api/v1/games/{gameId}/configs":{"get":{"tags":["games"],"summary":"List the configs of a game across your organization","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["configs"],"properties":{"configs":{"type":"array","items":{"type":"object","required":["id","assignmentId","name","config","isDefault","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"assignmentId":{"type":"string"},"name":{"type":"string"},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"isDefault":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1GamesByGameIdConfigs"}},"/api/v1/games/{gameId}/files":{"get":{"tags":["games"],"summary":"List the files of a game in your organization","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","platformId","platformSlug","version","sizeBytes","contentType","etag","status","kind","entryPoint","crossOriginIsolation","spaFallback","servedPrefix","isCurrent","createdAt","readyAt","uploadExpiresAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"platformId":{"type":["string","null"]},"platformSlug":{"type":["string","null"]},"version":{"type":"string"},"sizeBytes":{"type":"number"},"contentType":{"type":"string"},"etag":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","extracting","ready","failed"]},"kind":{"type":"string","enum":["single","bundle"]},"entryPoint":{"type":"string"},"crossOriginIsolation":{"type":"boolean"},"spaFallback":{"type":"boolean"},"servedPrefix":{"type":["string","null"]},"isCurrent":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"readyAt":{"format":"date-time","type":["string","null"]},"uploadExpiresAt":{"format":"date-time","type":["string","null"]}}}}}}}}}},"operationId":"getApiV1GamesByGameIdFiles"}},"/api/v1/games/{gameId}/files/{fileId}/download-url":{"get":{"tags":["games"],"summary":"Ask for a download url of a game file","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}}},"operationId":"getApiV1GamesByGameIdFilesByFileIdDownload-url"}},"/play/{gameId}/{fileId}/*":{"get":{"tags":["play"],"summary":"Serve a game file","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getPlayByGameIdByFileId*"}},"/play/{gameId}":{"get":{"tags":["play"],"summary":"Redirect to the current build of a game","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getPlayByGameId"}},"/play/{gameId}/*":{"get":{"tags":["play"],"summary":"Redirect to the current build of a game","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getPlayByGameId*"}},"/s/{platformSlug}/{gameSlug}/":{"get":{"tags":["play"],"summary":"Redirect to the current build of a game on a platform","parameters":[{"name":"platformSlug","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameSlug","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getSByPlatformSlugByGameSlug"}},"/s/{platformSlug}/{gameSlug}/*":{"get":{"tags":["play"],"summary":"Serve a timestamped build of a game on a platform","parameters":[{"name":"platformSlug","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameSlug","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"getSByPlatformSlugByGameSlug*"}},"/api/v1/organizations/{organizationId}/templates":{"get":{"tags":["templates"],"summary":"List the organization's templates","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["game","tournament"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["templates"],"properties":{"templates":{"type":"array","items":{"type":"object","required":["id","organizationId","kind","name","slug","description","sizeBytes","contentType","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"kind":{"type":"string","enum":["game","tournament"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"sizeBytes":{"type":["number","null"]},"contentType":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","ready","failed"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTemplates"},"post":{"tags":["templates"],"summary":"Create a template","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","name","slug"],"properties":{"kind":{"type":"string","enum":["game","tournament"]},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["kind","name","slug"],"properties":{"kind":{"type":"string","enum":["game","tournament"]},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["kind","name","slug"],"properties":{"kind":{"type":"string","enum":["game","tournament"]},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["template"],"properties":{"template":{"type":"object","required":["id","organizationId","kind","name","slug","description","sizeBytes","contentType","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"kind":{"type":"string","enum":["game","tournament"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"sizeBytes":{"type":["number","null"]},"contentType":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","ready","failed"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTemplates"}},"/api/v1/organizations/{organizationId}/templates/{templateId}":{"get":{"tags":["templates"],"summary":"Read one template","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["template"],"properties":{"template":{"type":"object","required":["id","organizationId","kind","name","slug","description","sizeBytes","contentType","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"kind":{"type":"string","enum":["game","tournament"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"sizeBytes":{"type":["number","null"]},"contentType":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","ready","failed"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTemplatesByTemplateId"},"patch":{"tags":["templates"],"summary":"Update a template","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":["string","null"]}}}},"application/x-www-form-urlencoded":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":["string","null"]}}}},"multipart/form-data":{"schema":{"minProperties":1,"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":1000,"type":["string","null"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["template"],"properties":{"template":{"type":"object","required":["id","organizationId","kind","name","slug","description","sizeBytes","contentType","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"kind":{"type":"string","enum":["game","tournament"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"sizeBytes":{"type":["number","null"]},"contentType":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","ready","failed"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdTemplatesByTemplateId"},"delete":{"tags":["templates"],"summary":"Delete a template","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdTemplatesByTemplateId"}},"/api/v1/organizations/{organizationId}/templates/{templateId}/upload":{"post":{"tags":["templates"],"summary":"Ask for an upload url for a template bundle","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","contentType","sizeBytes"],"properties":{"filename":{"minLength":1,"maxLength":200,"type":"string"},"contentType":{"minLength":1,"maxLength":120,"type":"string"},"sizeBytes":{"minimum":1,"maximum":5368709120,"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["filename","contentType","sizeBytes"],"properties":{"filename":{"minLength":1,"maxLength":200,"type":"string"},"contentType":{"minLength":1,"maxLength":120,"type":"string"},"sizeBytes":{"minimum":1,"maximum":5368709120,"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["filename","contentType","sizeBytes"],"properties":{"filename":{"minLength":1,"maxLength":200,"type":"string"},"contentType":{"minLength":1,"maxLength":120,"type":"string"},"sizeBytes":{"minimum":1,"maximum":5368709120,"type":"number"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["template","upload"],"properties":{"template":{"type":"object","required":["id","organizationId","kind","name","slug","description","sizeBytes","contentType","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"kind":{"type":"string","enum":["game","tournament"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"sizeBytes":{"type":["number","null"]},"contentType":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","ready","failed"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"upload":{"type":"object","required":["key","url","method","headers","sizeBytes","expiresAt"],"properties":{"key":{"type":"string"},"url":{"type":"string"},"method":{"const":"PUT","type":"string"},"headers":{"type":"object","patternProperties":{"^(.*)$":{"type":"string"}}},"sizeBytes":{"type":"number"},"expiresAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTemplatesByTemplateIdUpload"}},"/api/v1/organizations/{organizationId}/templates/{templateId}/complete":{"post":{"tags":["templates"],"summary":"Confirm an uploaded template bundle","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["template"],"properties":{"template":{"type":"object","required":["id","organizationId","kind","name","slug","description","sizeBytes","contentType","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"kind":{"type":"string","enum":["game","tournament"]},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"sizeBytes":{"type":["number","null"]},"contentType":{"type":["string","null"]},"status":{"type":"string","enum":["pending_upload","ready","failed"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTemplatesByTemplateIdComplete"}},"/api/v1/organizations/{organizationId}/templates/{templateId}/download-url":{"get":{"tags":["templates"],"summary":"Ask for a download url for a template bundle","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTemplatesByTemplateIdDownload-url"}},"/api/v1/organizations/{organizationId}/webhooks":{"get":{"tags":["webhooks"],"summary":"List every webhook of an organization","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["webhooks"],"properties":{"webhooks":{"type":"array","items":{"type":"object","required":["id","organizationId","platformId","url","description","secretLast4","events","enabled","expiresAt","lastDeliveryAt","lastFailureAt","createdAt","updatedAt","platformName","platformSlug"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"secretLast4":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"expiresAt":{"format":"date-time","type":["string","null"]},"lastDeliveryAt":{"format":"date-time","type":["string","null"]},"lastFailureAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"platformName":{"type":["string","null"]},"platformSlug":{"type":["string","null"]}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdWebhooks"}},"/api/v1/organizations/{organizationId}/webhooks/{webhookId}/deliveries":{"get":{"tags":["webhooks"],"summary":"List the recent deliveries of a webhook","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["deliveries"],"properties":{"deliveries":{"type":"array","items":{"type":"object","required":["id","eventId","eventType","attempt","status","statusCode","responseBody","error","durationMs","createdAt"],"properties":{"id":{"type":"string"},"eventId":{"type":"string"},"eventType":{"type":"string"},"attempt":{"type":"number"},"status":{"type":"string","enum":["delivered","failed","retrying"]},"statusCode":{"type":["number","null"]},"responseBody":{"type":["string","null"]},"error":{"type":["string","null"]},"durationMs":{"type":["number","null"]},"createdAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdWebhooksByWebhookIdDeliveries"}},"/api/v1/organizations/{organizationId}/platforms/{platformId}/webhooks":{"get":{"tags":["webhooks"],"summary":"List the webhooks of a platform","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["webhooks"],"properties":{"webhooks":{"type":"array","items":{"type":"object","required":["id","organizationId","platformId","url","description","secretLast4","events","enabled","expiresAt","lastDeliveryAt","lastFailureAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"secretLast4":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"expiresAt":{"format":"date-time","type":["string","null"]},"lastDeliveryAt":{"format":"date-time","type":["string","null"]},"lastFailureAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdWebhooks"},"post":{"tags":["webhooks"],"summary":"Create a webhook","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"description":{"maxLength":500,"type":"string"},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["score.submitted","score.expired","score.hidden","session.created","session.ended","webhook.test"]}},"enabled":{"type":"boolean"},"expiresInSeconds":{"minimum":3600,"maximum":31536000,"type":"number"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"description":{"maxLength":500,"type":"string"},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["score.submitted","score.expired","score.hidden","session.created","session.ended","webhook.test"]}},"enabled":{"type":"boolean"},"expiresInSeconds":{"minimum":3600,"maximum":31536000,"type":"number"}}}},"multipart/form-data":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"description":{"maxLength":500,"type":"string"},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["score.submitted","score.expired","score.hidden","session.created","session.ended","webhook.test"]}},"enabled":{"type":"boolean"},"expiresInSeconds":{"minimum":3600,"maximum":31536000,"type":"number"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["webhook","secret"],"properties":{"webhook":{"type":"object","required":["id","organizationId","platformId","url","description","secretLast4","events","enabled","expiresAt","lastDeliveryAt","lastFailureAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"secretLast4":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"expiresAt":{"format":"date-time","type":["string","null"]},"lastDeliveryAt":{"format":"date-time","type":["string","null"]},"lastFailureAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"secret":{"type":"string"}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdWebhooks"}},"/api/v1/organizations/{organizationId}/platforms/{platformId}/webhooks/{webhookId}/test":{"post":{"tags":["webhooks"],"summary":"Send a test event to a webhook","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"type":"object","required":["accepted"],"properties":{"accepted":{"type":"boolean"}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdWebhooksByWebhookIdTest"}},"/api/v1/organizations/{organizationId}/platforms/{platformId}/webhooks/{webhookId}":{"get":{"tags":["webhooks"],"summary":"Read one webhook","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["webhook"],"properties":{"webhook":{"type":"object","required":["id","organizationId","platformId","url","description","secretLast4","events","enabled","expiresAt","lastDeliveryAt","lastFailureAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"secretLast4":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"expiresAt":{"format":"date-time","type":["string","null"]},"lastDeliveryAt":{"format":"date-time","type":["string","null"]},"lastFailureAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdWebhooksByWebhookId"},"patch":{"tags":["webhooks"],"summary":"Update a webhook","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minProperties":1,"type":"object","properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"description":{"maxLength":500,"type":["string","null"]},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["score.submitted","score.expired","score.hidden","session.created","session.ended","webhook.test"]}},"enabled":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"minProperties":1,"type":"object","properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"description":{"maxLength":500,"type":["string","null"]},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["score.submitted","score.expired","score.hidden","session.created","session.ended","webhook.test"]}},"enabled":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"minProperties":1,"type":"object","properties":{"url":{"format":"uri","maxLength":2000,"type":"string"},"description":{"maxLength":500,"type":["string","null"]},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["score.submitted","score.expired","score.hidden","session.created","session.ended","webhook.test"]}},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["webhook"],"properties":{"webhook":{"type":"object","required":["id","organizationId","platformId","url","description","secretLast4","events","enabled","expiresAt","lastDeliveryAt","lastFailureAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"secretLast4":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"expiresAt":{"format":"date-time","type":["string","null"]},"lastDeliveryAt":{"format":"date-time","type":["string","null"]},"lastFailureAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdWebhooksByWebhookId"},"delete":{"tags":["webhooks"],"summary":"Delete a webhook","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdWebhooksByWebhookId"}},"/api/v1/organizations/{organizationId}/platforms/{platformId}/webhooks/{webhookId}/rotate-secret":{"post":{"tags":["webhooks"],"summary":"Rotate the secret of a webhook","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["webhook","secret"],"properties":{"webhook":{"type":"object","required":["id","organizationId","platformId","url","description","secretLast4","events","enabled","expiresAt","lastDeliveryAt","lastFailureAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"url":{"type":"string"},"description":{"type":["string","null"]},"secretLast4":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"expiresAt":{"format":"date-time","type":["string","null"]},"lastDeliveryAt":{"format":"date-time","type":["string","null"]},"lastFailureAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"secret":{"type":"string"}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdPlatformsByPlatformIdWebhooksByWebhookIdRotate-secret"}},"/api/v1/organizations/{organizationId}/tournaments":{"get":{"tags":["tournaments"],"summary":"List tournaments","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["leaderboard","bracket"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournaments"],"properties":{"tournaments":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTournaments"},"post":{"tags":["tournaments"],"summary":"Create a tournament","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["gameId","name","slug","format"],"properties":{"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameConfigId":{"type":"string"},"templateId":{"type":"string"},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":"string"},"format":{"type":"string","enum":["leaderboard","bracket"]},"maxParticipants":{"minimum":2,"maximum":256,"type":"number"},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["gameId","name","slug","format"],"properties":{"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameConfigId":{"type":"string"},"templateId":{"type":"string"},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":"string"},"format":{"type":"string","enum":["leaderboard","bracket"]},"maxParticipants":{"minimum":2,"maximum":256,"type":"number"},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["gameId","name","slug","format"],"properties":{"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameConfigId":{"type":"string"},"templateId":{"type":"string"},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":"string"},"format":{"type":"string","enum":["leaderboard","bracket"]},"maxParticipants":{"minimum":2,"maximum":256,"type":"number"},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTournaments"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}":{"get":{"tags":["tournaments"],"summary":"Get a tournament","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTournamentsByTournamentId"},"patch":{"tags":["tournaments"],"summary":"Update a tournament","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":["string","null"]},"imageUrl":{"type":"null"},"maxParticipants":{"minimum":2,"maximum":256,"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":["string","null"]},"imageUrl":{"type":"null"},"maxParticipants":{"minimum":2,"maximum":256,"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":["string","null"]},"imageUrl":{"type":"null"},"maxParticipants":{"minimum":2,"maximum":256,"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"patchApiV1OrganizationsByOrganizationIdTournamentsByTournamentId"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/open":{"post":{"tags":["tournaments"],"summary":"Open registration","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdOpen"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/seed":{"post":{"tags":["tournaments"],"summary":"Seed a bracket and start","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["bracket"],"properties":{"bracket":{"type":"object","required":["tournamentId","bracketSize","totalRounds","currentRound","rounds"],"properties":{"tournamentId":{"type":"string"},"bracketSize":{"type":"number"},"totalRounds":{"type":"number"},"currentRound":{"type":["number","null"]},"rounds":{"type":"array","items":{"type":"object","required":["round","matches"],"properties":{"round":{"type":"number"},"matches":{"type":"array","items":{"type":"object","required":["id","tournamentId","bracketRound","bracketSlot","status","name","winnerParticipantId","nextRound","nextSlot","nextSide","participants"],"properties":{"id":{"type":"string"},"tournamentId":{"type":"string"},"bracketRound":{"type":"number"},"bracketSlot":{"type":"number"},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"name":{"type":["string","null"]},"winnerParticipantId":{"type":["string","null"]},"nextRound":{"type":["number","null"]},"nextSlot":{"type":["number","null"]},"nextSide":{"type":["number","null"]},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}}}}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdSeed"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/cancel":{"post":{"tags":["tournaments"],"summary":"Cancel a tournament","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdCancel"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/participants":{"get":{"tags":["tournaments"],"summary":"List participants","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["participants"],"properties":{"participants":{"type":"array","items":{"type":"object","required":["id","organizationId","tournamentId","platformId","externalUserId","displayName","seed","status","registeredAt","withdrawnAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"tournamentId":{"type":"string"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"status":{"type":"string","enum":["registered","active","withdrawn","eliminated","winner"]},"registeredAt":{"format":"date-time","type":"string"},"withdrawnAt":{"format":"date-time","type":["string","null"]}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdParticipants"},"post":{"tags":["tournaments"],"summary":"Register a player","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["participant"],"properties":{"participant":{"type":"object","required":["id","organizationId","tournamentId","platformId","externalUserId","displayName","seed","status","registeredAt","withdrawnAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"tournamentId":{"type":"string"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"status":{"type":"string","enum":["registered","active","withdrawn","eliminated","winner"]},"registeredAt":{"format":"date-time","type":"string"},"withdrawnAt":{"format":"date-time","type":["string","null"]}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdParticipants"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/participants/{participantId}":{"delete":{"tags":["tournaments"],"summary":"Withdraw a participant","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"participantId","in":"path","required":true,"schema":{"type":"string"}}],"operationId":"deleteApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdParticipantsByParticipantId"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/complete":{"post":{"tags":["tournaments"],"summary":"Mark a leaderboard tournament complete","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdComplete"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/standings":{"get":{"tags":["tournaments"],"summary":"Standings for a tournament","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["format","rows"],"properties":{"format":{"const":"leaderboard","type":"string"},"rows":{"type":"array","items":{"type":"object","required":["position","participantId","externalUserId","displayName","seed","status","score","flagged","flags","submittedAt"],"properties":{"position":{"type":"number"},"participantId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"status":{"type":"string"},"score":{"type":["number","null"]},"flagged":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"submittedAt":{"format":"date-time","type":["string","null"]}}}}}},{"type":"object","required":["format","bracket"],"properties":{"format":{"const":"bracket","type":"string"},"bracket":{"type":"object","required":["tournamentId","bracketSize","totalRounds","currentRound","rounds"],"properties":{"tournamentId":{"type":"string"},"bracketSize":{"type":"number"},"totalRounds":{"type":"number"},"currentRound":{"type":["number","null"]},"rounds":{"type":"array","items":{"type":"object","required":["round","matches"],"properties":{"round":{"type":"number"},"matches":{"type":"array","items":{"type":"object","required":["id","tournamentId","bracketRound","bracketSlot","status","name","winnerParticipantId","nextRound","nextSlot","nextSide","participants"],"properties":{"id":{"type":"string"},"tournamentId":{"type":"string"},"bracketRound":{"type":"number"},"bracketSlot":{"type":"number"},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"name":{"type":["string","null"]},"winnerParticipantId":{"type":["string","null"]},"nextRound":{"type":["number","null"]},"nextSlot":{"type":["number","null"]},"nextSide":{"type":["number","null"]},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}}}}}}}}}]}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdStandings"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/participants/{participantId}/sessions":{"get":{"tags":["tournaments"],"summary":"A player's sessions in a tournament","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"participantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["sessions"],"properties":{"sessions":{"type":"array","items":{"type":"object","required":["sessionId","status","score","flagged","flags","startedAt","submittedAt"],"properties":{"sessionId":{"type":"string"},"status":{"type":"string"},"score":{"type":["number","null"]},"flagged":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"startedAt":{"format":"date-time","type":"string"},"submittedAt":{"format":"date-time","type":["string","null"]}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdParticipantsByParticipantIdSessions"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/bracket":{"get":{"tags":["tournaments"],"summary":"Read the bracket","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["bracket"],"properties":{"bracket":{"type":"object","required":["tournamentId","bracketSize","totalRounds","currentRound","rounds"],"properties":{"tournamentId":{"type":"string"},"bracketSize":{"type":"number"},"totalRounds":{"type":"number"},"currentRound":{"type":["number","null"]},"rounds":{"type":"array","items":{"type":"object","required":["round","matches"],"properties":{"round":{"type":"number"},"matches":{"type":"array","items":{"type":"object","required":["id","tournamentId","bracketRound","bracketSlot","status","name","winnerParticipantId","nextRound","nextSlot","nextSide","participants"],"properties":{"id":{"type":"string"},"tournamentId":{"type":"string"},"bracketRound":{"type":"number"},"bracketSlot":{"type":"number"},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"name":{"type":["string","null"]},"winnerParticipantId":{"type":["string","null"]},"nextRound":{"type":["number","null"]},"nextSlot":{"type":["number","null"]},"nextSide":{"type":["number","null"]},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}}}}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdBracket"}},"/api/v1/organizations/{organizationId}/tournaments/{tournamentId}/image":{"post":{"tags":["tournaments"],"summary":"Request a presigned url to upload this tournament's image","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"minLength":1,"maxLength":100,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["upload"],"properties":{"upload":{"type":"object","required":["uploadUrl","key","expiresAt","maxBytes","allowedTypes"],"properties":{"uploadUrl":{"type":"string"},"key":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"maxBytes":{"type":"number"},"allowedTypes":{"type":"array","items":{"type":"string"}}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdImage"},"put":{"tags":["tournaments"],"summary":"Attach an uploaded tournament image","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["key"],"properties":{"key":{"minLength":1,"maxLength":512,"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"putApiV1OrganizationsByOrganizationIdTournamentsByTournamentIdImage"}},"/api/v1/organizations/{organizationId}/matches":{"post":{"tags":["matches"],"summary":"Create a standalone match","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["gameId","participants"],"properties":{"gameId":{"type":"string"},"tournamentId":{"type":"string"},"name":{"maxLength":120,"type":"string"},"participants":{"minItems":2,"maxItems":64,"type":"array","items":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["gameId","participants"],"properties":{"gameId":{"type":"string"},"tournamentId":{"type":"string"},"name":{"maxLength":120,"type":"string"},"participants":{"minItems":2,"maxItems":64,"type":"array","items":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["gameId","participants"],"properties":{"gameId":{"type":"string"},"tournamentId":{"type":"string"},"name":{"maxLength":120,"type":"string"},"participants":{"minItems":2,"maxItems":64,"type":"array","items":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["match"],"properties":{"match":{"type":"object","required":["id","organizationId","gameId","tournamentId","name","bracketRound","bracketSlot","status","winnerParticipantId","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"tournamentId":{"type":["string","null"]},"name":{"type":["string","null"]},"bracketRound":{"type":["number","null"]},"bracketSlot":{"type":["number","null"]},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"winnerParticipantId":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdMatches"},"get":{"tags":["matches"],"summary":"List the organization's matches","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"query","required":false,"schema":{"type":"string"}},{"name":"tournamentId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","active","completed","cancelled"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":200,"type":"number"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["data","page"],"properties":{"data":{"type":"array","items":{"type":"object","required":["match","participants"],"properties":{"match":{"type":"object","required":["id","organizationId","gameId","tournamentId","name","bracketRound","bracketSlot","status","winnerParticipantId","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"tournamentId":{"type":["string","null"]},"name":{"type":["string","null"]},"bracketRound":{"type":["number","null"]},"bracketSlot":{"type":["number","null"]},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"winnerParticipantId":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}},"page":{"type":"object","required":["limit","hasMore","cursor"],"properties":{"limit":{"type":"number"},"hasMore":{"type":"boolean"},"cursor":{"type":["string","null"]}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdMatches"}},"/api/v1/organizations/{organizationId}/matches/{matchId}":{"get":{"tags":["matches"],"summary":"Get a match","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"matchId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["match","participants"],"properties":{"match":{"type":"object","required":["id","organizationId","gameId","tournamentId","name","bracketRound","bracketSlot","status","winnerParticipantId","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"tournamentId":{"type":["string","null"]},"name":{"type":["string","null"]},"bracketRound":{"type":["number","null"]},"bracketSlot":{"type":["number","null"]},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"winnerParticipantId":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdMatchesByMatchId"}},"/api/v1/organizations/{organizationId}/matches/{matchId}/complete":{"post":{"tags":["matches"],"summary":"Complete a match","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"matchId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"winnerParticipantId":{"type":"string"},"winnerExternal":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"winnerParticipantId":{"type":"string"},"winnerExternal":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"}}}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"winnerParticipantId":{"type":"string"},"winnerExternal":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"}}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["match"],"properties":{"match":{"type":"object","required":["id","organizationId","gameId","tournamentId","name","bracketRound","bracketSlot","status","winnerParticipantId","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"tournamentId":{"type":["string","null"]},"name":{"type":["string","null"]},"bracketRound":{"type":["number","null"]},"bracketSlot":{"type":["number","null"]},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"winnerParticipantId":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdMatchesByMatchIdComplete"}},"/api/v1/matches/{matchId}":{"get":{"tags":["matches"],"summary":"Get a match and its players","parameters":[{"name":"matchId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["match","participants"],"properties":{"match":{"type":"object","required":["id","organizationId","gameId","tournamentId","name","bracketRound","bracketSlot","status","winnerParticipantId","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"tournamentId":{"type":["string","null"]},"name":{"type":["string","null"]},"bracketRound":{"type":["number","null"]},"bracketSlot":{"type":["number","null"]},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"winnerParticipantId":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}}}}},"operationId":"getApiV1MatchesByMatchId"}},"/api/v1/matches/{matchId}/players/{externalUserId}/win":{"post":{"tags":["matches"],"summary":"Declare the winning player of a match","parameters":[{"name":"matchId","in":"path","required":true,"schema":{"type":"string"}},{"name":"externalUserId","in":"path","required":true,"schema":{"minLength":1,"maxLength":200,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["match"],"properties":{"match":{"type":"object","required":["id","organizationId","gameId","tournamentId","name","bracketRound","bracketSlot","status","winnerParticipantId","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"tournamentId":{"type":["string","null"]},"name":{"type":["string","null"]},"bracketRound":{"type":["number","null"]},"bracketSlot":{"type":["number","null"]},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"winnerParticipantId":{"type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1MatchesByMatchIdPlayersByExternalUserIdWin"}},"/api/v1/tournaments":{"get":{"tags":["tournaments"],"summary":"List tournaments","parameters":[{"name":"gameId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournaments"],"properties":{"tournaments":{"type":"array","items":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}}},"operationId":"getApiV1Tournaments"},"post":{"tags":["tournaments"],"summary":"Create a tournament","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["gameId","name","slug","format"],"properties":{"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameConfigId":{"type":"string"},"templateId":{"type":"string"},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":"string"},"format":{"type":"string","enum":["leaderboard","bracket"]},"maxParticipants":{"minimum":2,"maximum":256,"type":"number"},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["gameId","name","slug","format"],"properties":{"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameConfigId":{"type":"string"},"templateId":{"type":"string"},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":"string"},"format":{"type":"string","enum":["leaderboard","bracket"]},"maxParticipants":{"minimum":2,"maximum":256,"type":"number"},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["gameId","name","slug","format"],"properties":{"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameConfigId":{"type":"string"},"templateId":{"type":"string"},"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":"string"},"format":{"type":"string","enum":["leaderboard","bracket"]},"maxParticipants":{"minimum":2,"maximum":256,"type":"number"},"startsAt":{"format":"date-time","type":"string"},"endsAt":{"format":"date-time","type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1Tournaments"}},"/api/v1/tournaments/{tournamentId}":{"patch":{"tags":["tournaments"],"summary":"Update a tournament","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":["string","null"]},"imageUrl":{"type":"null"},"maxParticipants":{"minimum":2,"maximum":256,"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":["string","null"]},"imageUrl":{"type":"null"},"maxParticipants":{"minimum":2,"maximum":256,"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"minLength":1,"maxLength":120,"type":"string"},"slug":{"minLength":2,"maxLength":60,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"description":{"maxLength":2000,"type":["string","null"]},"imageUrl":{"type":"null"},"maxParticipants":{"minimum":2,"maximum":256,"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"patchApiV1TournamentsByTournamentId"},"get":{"tags":["tournaments"],"summary":"Get a tournament","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"getApiV1TournamentsByTournamentId"}},"/api/v1/tournaments/{tournamentId}/open":{"post":{"tags":["tournaments"],"summary":"Open registration","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1TournamentsByTournamentIdOpen"}},"/api/v1/tournaments/{tournamentId}/seed":{"post":{"tags":["tournaments"],"summary":"Seed a bracket and start","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["bracket"],"properties":{"bracket":{"type":"object","required":["tournamentId","bracketSize","totalRounds","currentRound","rounds"],"properties":{"tournamentId":{"type":"string"},"bracketSize":{"type":"number"},"totalRounds":{"type":"number"},"currentRound":{"type":["number","null"]},"rounds":{"type":"array","items":{"type":"object","required":["round","matches"],"properties":{"round":{"type":"number"},"matches":{"type":"array","items":{"type":"object","required":["id","tournamentId","bracketRound","bracketSlot","status","name","winnerParticipantId","nextRound","nextSlot","nextSide","participants"],"properties":{"id":{"type":"string"},"tournamentId":{"type":"string"},"bracketRound":{"type":"number"},"bracketSlot":{"type":"number"},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"name":{"type":["string","null"]},"winnerParticipantId":{"type":["string","null"]},"nextRound":{"type":["number","null"]},"nextSlot":{"type":["number","null"]},"nextSide":{"type":["number","null"]},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}}}}}}}}}}}}},"operationId":"postApiV1TournamentsByTournamentIdSeed"}},"/api/v1/tournaments/{tournamentId}/cancel":{"post":{"tags":["tournaments"],"summary":"Cancel a tournament","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1TournamentsByTournamentIdCancel"}},"/api/v1/tournaments/{tournamentId}/complete":{"post":{"tags":["tournaments"],"summary":"Mark a leaderboard tournament complete","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["tournament"],"properties":{"tournament":{"type":"object","required":["id","organizationId","gameId","assignmentId","gameConfigId","templateId","name","slug","gameSeed","description","imageUrl","format","status","maxParticipants","startsAt","endsAt","startedAt","completedAt","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"templateId":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"},"gameSeed":{"type":"string"},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"format":{"type":"string","enum":["leaderboard","bracket"]},"status":{"type":"string","enum":["draft","scheduled","open","running","completed","cancelled"]},"maxParticipants":{"type":["number","null"]},"startsAt":{"format":"date-time","type":["string","null"]},"endsAt":{"format":"date-time","type":["string","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"completedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"game":{"type":["object","null"],"required":["id","name","slug","hosting"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"hosting":{"type":"string"}}},"platform":{"type":["object","null"],"required":["id","name","slug"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}}}}}}}}}}},"operationId":"postApiV1TournamentsByTournamentIdComplete"}},"/api/v1/tournaments/{tournamentId}/players/{externalUserId}/leave":{"delete":{"tags":["tournaments"],"summary":"Remove a player from a tournament","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"externalUserId","in":"path","required":true,"schema":{"minLength":1,"maxLength":200,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["platformId"],"properties":{"platformId":{"type":"string"}}}}}},"operationId":"deleteApiV1TournamentsByTournamentIdPlayersByExternalUserIdLeave"}},"/api/v1/tournaments/{tournamentId}/leaderboards":{"get":{"tags":["tournaments"],"summary":"Read the ranked players of a tournament","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["rows"],"properties":{"rows":{"type":"array","items":{"type":"object","required":["position","participantId","externalUserId","displayName","seed","status","score","flagged","flags","submittedAt"],"properties":{"position":{"type":"number"},"participantId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"status":{"type":"string"},"score":{"type":["number","null"]},"flagged":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"submittedAt":{"format":"date-time","type":["string","null"]}}}}}}}}}},"operationId":"getApiV1TournamentsByTournamentIdLeaderboards"}},"/api/v1/tournaments/{tournamentId}/bracket":{"get":{"tags":["tournaments"],"summary":"Read the bracket of a tournament","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["bracket"],"properties":{"bracket":{"type":"object","required":["tournamentId","bracketSize","totalRounds","currentRound","rounds"],"properties":{"tournamentId":{"type":"string"},"bracketSize":{"type":"number"},"totalRounds":{"type":"number"},"currentRound":{"type":["number","null"]},"rounds":{"type":"array","items":{"type":"object","required":["round","matches"],"properties":{"round":{"type":"number"},"matches":{"type":"array","items":{"type":"object","required":["id","tournamentId","bracketRound","bracketSlot","status","name","winnerParticipantId","nextRound","nextSlot","nextSide","participants"],"properties":{"id":{"type":"string"},"tournamentId":{"type":"string"},"bracketRound":{"type":"number"},"bracketSlot":{"type":"number"},"status":{"type":"string","enum":["pending","active","completed","cancelled"]},"name":{"type":["string","null"]},"winnerParticipantId":{"type":["string","null"]},"nextRound":{"type":["number","null"]},"nextSlot":{"type":["number","null"]},"nextSide":{"type":["number","null"]},"participants":{"type":"array","items":{"type":"object","required":["id","matchId","slot","platformId","externalUserId","displayName","seed","sessionId","score","placement","outcome"],"properties":{"id":{"type":"string"},"matchId":{"type":"string"},"slot":{"type":"number"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"displayName":{"type":["string","null"]},"seed":{"type":["number","null"]},"sessionId":{"type":["string","null"]},"score":{"type":["number","null"]},"placement":{"type":["number","null"]},"outcome":{"type":"string","enum":["pending","won","lost","draw","disqualified"]}}}}}}}}}}}}}}}}}},"operationId":"getApiV1TournamentsByTournamentIdBracket"}},"/api/v1/duels/enter":{"post":{"tags":["tournaments"],"summary":"Enter the duel pool for a game","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["platformId","gameId","externalUserId"],"properties":{"platformId":{"type":"string"},"gameId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"externalName":{"maxLength":200,"type":"string"},"configId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["platformId","gameId","externalUserId"],"properties":{"platformId":{"type":"string"},"gameId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"externalName":{"maxLength":200,"type":"string"},"configId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["platformId","gameId","externalUserId"],"properties":{"platformId":{"type":"string"},"gameId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"externalName":{"maxLength":200,"type":"string"},"configId":{"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["matchId","opponent","session","sessionToken","realtimeUrl","joinCode","playUrl"],"properties":{"matchId":{"type":"string"},"opponent":{"nullable":true,"type":["string","null"]},"session":{"type":"object","required":["id","organizationId","platformId","gameId","assignmentId","gameFileId","gameConfigId","tournamentId","matchId","externalUserId","externalName","mode","status","config","configSchemaVersion","startedAt","expiresAt","endedAt","createdAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameFileId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"tournamentId":{"type":["string","null"]},"matchId":{"type":["string","null"]},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"mode":{"type":["string","null"]},"status":{"type":"string","enum":["active","ended","expired"]},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"configSchemaVersion":{"type":"number"},"startedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}}},"sessionToken":{"type":"string"},"realtimeUrl":{"type":"string"},"joinCode":{"type":"string"},"playUrl":{"type":"string"}}}}}}},"operationId":"postApiV1DuelsEnter"}},"/api/v1/tournaments/{tournamentId}/enter":{"post":{"tags":["tournaments"],"summary":"Register and open a play session in one call","parameters":[{"name":"tournamentId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["platformId","externalUserId"],"properties":{"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"displayName":{"maxLength":200,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["session","sessionToken","realtimeUrl","joinCode","playUrl"],"properties":{"session":{"type":"object","required":["id","organizationId","platformId","gameId","assignmentId","gameFileId","gameConfigId","tournamentId","matchId","externalUserId","externalName","mode","status","config","configSchemaVersion","startedAt","expiresAt","endedAt","createdAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameFileId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"tournamentId":{"type":["string","null"]},"matchId":{"type":["string","null"]},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"mode":{"type":["string","null"]},"status":{"type":"string","enum":["active","ended","expired"]},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"configSchemaVersion":{"type":"number"},"startedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}}},"sessionToken":{"type":"string"},"realtimeUrl":{"type":"string"},"joinCode":{"type":"string"},"playUrl":{"type":"string"},"matchId":{"type":"string"},"opponent":{"nullable":true,"type":["string","null"]}}}}}}},"operationId":"postApiV1TournamentsByTournamentIdEnter"}},"/api/v1/sessions":{"post":{"tags":["sessions"],"summary":"Open a game session for a player","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["gameId","platformId","externalUserId"],"properties":{"gameId":{"type":"string"},"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"externalName":{"maxLength":200,"type":"string"},"mode":{"maxLength":80,"type":"string"},"configId":{"type":"string"},"gameFileId":{"type":"string"},"tournamentId":{"type":"string"},"matchId":{"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["gameId","platformId","externalUserId"],"properties":{"gameId":{"type":"string"},"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"externalName":{"maxLength":200,"type":"string"},"mode":{"maxLength":80,"type":"string"},"configId":{"type":"string"},"gameFileId":{"type":"string"},"tournamentId":{"type":"string"},"matchId":{"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["gameId","platformId","externalUserId"],"properties":{"gameId":{"type":"string"},"platformId":{"type":"string"},"externalUserId":{"minLength":1,"maxLength":200,"type":"string"},"externalName":{"maxLength":200,"type":"string"},"mode":{"maxLength":80,"type":"string"},"configId":{"type":"string"},"gameFileId":{"type":"string"},"tournamentId":{"type":"string"},"matchId":{"type":"string"},"metadata":{"type":"object","patternProperties":{"^(.*)$":{}}}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["session","sessionToken","realtimeUrl","joinCode","playUrl"],"properties":{"session":{"type":"object","required":["id","organizationId","platformId","gameId","assignmentId","gameFileId","gameConfigId","tournamentId","matchId","externalUserId","externalName","mode","status","config","configSchemaVersion","startedAt","expiresAt","endedAt","createdAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameFileId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"tournamentId":{"type":["string","null"]},"matchId":{"type":["string","null"]},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"mode":{"type":["string","null"]},"status":{"type":"string","enum":["active","ended","expired"]},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"configSchemaVersion":{"type":"number"},"startedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}}},"sessionToken":{"type":"string"},"realtimeUrl":{"type":"string"},"joinCode":{"type":"string"},"playUrl":{"type":"string"}}}}}}},"operationId":"postApiV1Sessions"}},"/api/v1/sessions/{sessionId}":{"get":{"tags":["sessions"],"summary":"Read one game session","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["session"],"properties":{"session":{"type":"object","required":["id","organizationId","platformId","gameId","assignmentId","gameFileId","gameConfigId","tournamentId","matchId","externalUserId","externalName","mode","status","config","configSchemaVersion","startedAt","expiresAt","endedAt","createdAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameFileId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"tournamentId":{"type":["string","null"]},"matchId":{"type":["string","null"]},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"mode":{"type":["string","null"]},"status":{"type":"string","enum":["active","ended","expired"]},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"configSchemaVersion":{"type":"number"},"startedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"getApiV1SessionsBySessionId"}},"/api/v1/sessions/{sessionId}/end":{"post":{"tags":["sessions"],"summary":"End a game session","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["session"],"properties":{"session":{"type":"object","required":["id","organizationId","platformId","gameId","assignmentId","gameFileId","gameConfigId","tournamentId","matchId","externalUserId","externalName","mode","status","config","configSchemaVersion","startedAt","expiresAt","endedAt","createdAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"platformId":{"type":"string"},"gameId":{"type":"string"},"assignmentId":{"type":"string"},"gameFileId":{"type":["string","null"]},"gameConfigId":{"type":["string","null"]},"tournamentId":{"type":["string","null"]},"matchId":{"type":["string","null"]},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"mode":{"type":["string","null"]},"status":{"type":"string","enum":["active","ended","expired"]},"config":{"type":"object","patternProperties":{"^(.*)$":{}}},"configSchemaVersion":{"type":"number"},"startedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1SessionsBySessionIdEnd"}},"/api/v1/play/sessions/{sessionId}/score":{"post":{"tags":["scores"],"summary":"Send the score of a game session (game session token)","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["score"],"properties":{"score":{"minimum":0,"maximum":9007199254740991,"type":"number"},"endSession":{"type":"boolean"},"screenshot":{"maxLength":300000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$","contentEncoding":"base64","description":"A data-url png, jpeg or webp of the final frame. Required when the game's score verification mode is vision; the referee reads the on-screen score from it and compares it with the submitted score.","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["score"],"properties":{"score":{"minimum":0,"maximum":9007199254740991,"type":"number"},"endSession":{"type":"boolean"},"screenshot":{"maxLength":300000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$","contentEncoding":"base64","description":"A data-url png, jpeg or webp of the final frame. Required when the game's score verification mode is vision; the referee reads the on-screen score from it and compares it with the submitted score.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["score"],"properties":{"score":{"minimum":0,"maximum":9007199254740991,"type":"number"},"endSession":{"type":"boolean"},"screenshot":{"maxLength":300000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$","contentEncoding":"base64","description":"A data-url png, jpeg or webp of the final frame. Required when the game's score verification mode is vision; the referee reads the on-screen score from it and compares it with the submitted score.","type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["score"],"properties":{"score":{"type":"object","required":["id","organizationId","sessionId","platformId","gameId","externalUserId","externalName","mode","score","status","flagged","flags","source","verificationStatus","verificationReason","submittedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"sessionId":{"type":"string"},"platformId":{"type":"string"},"gameId":{"type":"string"},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"mode":{"type":["string","null"]},"score":{"type":"number"},"status":{"type":"string","enum":["accepted","hidden"]},"flagged":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"source":{"type":"string","enum":["server","client"]},"verificationStatus":{"type":"string","enum":["not_required","passed","failed","unavailable"]},"verificationReason":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1PlaySessionsBySessionIdScore"}},"/api/v1/sessions/{sessionId}/score":{"post":{"tags":["scores"],"summary":"Record the score of a game session","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["score"],"properties":{"score":{"minimum":0,"maximum":9007199254740991,"type":"number"},"endSession":{"type":"boolean"},"screenshot":{"maxLength":300000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$","contentEncoding":"base64","description":"A data-url png, jpeg or webp of the final frame. Required when the game's score verification mode is vision; the referee reads the on-screen score from it and compares it with the submitted score.","type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["score"],"properties":{"score":{"minimum":0,"maximum":9007199254740991,"type":"number"},"endSession":{"type":"boolean"},"screenshot":{"maxLength":300000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$","contentEncoding":"base64","description":"A data-url png, jpeg or webp of the final frame. Required when the game's score verification mode is vision; the referee reads the on-screen score from it and compares it with the submitted score.","type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","required":["score"],"properties":{"score":{"minimum":0,"maximum":9007199254740991,"type":"number"},"endSession":{"type":"boolean"},"screenshot":{"maxLength":300000,"pattern":"^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$","contentEncoding":"base64","description":"A data-url png, jpeg or webp of the final frame. Required when the game's score verification mode is vision; the referee reads the on-screen score from it and compares it with the submitted score.","type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["score"],"properties":{"score":{"type":"object","required":["id","organizationId","sessionId","platformId","gameId","externalUserId","externalName","mode","score","status","flagged","flags","source","verificationStatus","verificationReason","submittedAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"sessionId":{"type":"string"},"platformId":{"type":"string"},"gameId":{"type":"string"},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"mode":{"type":["string","null"]},"score":{"type":"number"},"status":{"type":"string","enum":["accepted","hidden"]},"flagged":{"type":"boolean"},"flags":{"type":"array","items":{"type":"string"}},"source":{"type":"string","enum":["server","client"]},"verificationStatus":{"type":"string","enum":["not_required","passed","failed","unavailable"]},"verificationReason":{"type":["string","null"]},"submittedAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"postApiV1SessionsBySessionIdScore"}},"/api/v1/players/{externalUserId}/scores/hide":{"post":{"tags":["scores"],"summary":"Hide the scores of a player","parameters":[{"name":"externalUserId","in":"path","required":true,"schema":{"minLength":1,"maxLength":200,"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gameId":{"type":"string"},"platformId":{"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"gameId":{"type":"string"},"platformId":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"gameId":{"type":"string"},"platformId":{"type":"string"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["hidden"],"properties":{"hidden":{"type":"number"}}}}}}},"operationId":"postApiV1PlayersByExternalUserIdScoresHide"}},"/api/v1/games/{gameId}/leaderboards":{"get":{"tags":["leaderboards"],"summary":"Read the best scores of a game","parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}},{"name":"platformId","in":"query","required":false,"schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"schema":{"maxLength":80,"description":"Restrict the board to one game mode.","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":200,"type":"number"}},{"name":"cursor","in":"query","required":false,"schema":{"description":"The page.cursor from the previous response; pages are cursor-based, so there is no offset.","type":"string"}},{"name":"includeFlagged","in":"query","required":false,"schema":{"description":"Include rows flagged by score verification. Defaults to false.","type":"boolean"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["entries","page"],"properties":{"entries":{"type":"array","items":{"type":"object","required":["rank","sessionId","platformId","externalUserId","externalName","score","flagged","submittedAt"],"properties":{"rank":{"description":"1-based position in the whole board, ordered by score descending, then earliest submittedAt, then score row id. Rank continues across pages; it does not restart at 1.","type":"number"},"sessionId":{"type":"string"},"platformId":{"type":"string"},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"score":{"description":"The player's best accepted score on this board: one entry per externalUserId.","type":"number"},"flagged":{"description":"True when score verification flagged the submission; flagged rows are omitted unless includeFlagged is true.","type":"boolean"},"submittedAt":{"format":"date-time","type":"string"}}}},"page":{"type":"object","required":["limit","hasMore","cursor"],"properties":{"limit":{"type":"number"},"hasMore":{"type":"boolean"},"cursor":{"type":["string","null"]}}}}}}}}},"operationId":"getApiV1GamesByGameIdLeaderboards"}},"/api/v1/join/{code}":{"get":{"tags":["play"],"summary":"Resolve a 10-digit join code into a play url","parameters":[{"name":"code","in":"path","required":true,"schema":{"minLength":10,"maxLength":10,"pattern":"^[A-Za-z0-9]{10}$","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["join"],"properties":{"join":{"type":"object","required":["playUrl","realtimeUrl","sessionId","platformSlug","gameSlug","gameSeed","tournamentId","matchId","externalUserId","externalName","expiresAt"],"properties":{"playUrl":{"type":"string"},"realtimeUrl":{"type":"string"},"sessionId":{"type":"string"},"platformSlug":{"type":"string"},"gameSlug":{"type":"string"},"gameSeed":{"type":["string","null"]},"tournamentId":{"type":["string","null"]},"matchId":{"type":["string","null"]},"externalUserId":{"type":"string"},"externalName":{"type":["string","null"]},"expiresAt":{"format":"date-time","type":"string"}}}}}}}}},"operationId":"getApiV1JoinByCode"}},"/api/v1/organizations/{organizationId}/games/{gameId}/play-test":{"post":{"tags":["play"],"summary":"Open a play-test session with a join code","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"gameId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"platformId":{"type":"string"},"tournamentId":{"type":"string"},"externalName":{"maxLength":200,"type":"string"}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"platformId":{"type":"string"},"tournamentId":{"type":"string"},"externalName":{"maxLength":200,"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"fileId":{"type":"string"},"platformId":{"type":"string"},"tournamentId":{"type":"string"},"externalName":{"maxLength":200,"type":"string"}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["playTest"],"properties":{"playTest":{"type":"object","required":["sessionId","joinCode","playUrl","realtimeUrl"],"properties":{"sessionId":{"type":"string"},"joinCode":{"type":"string"},"playUrl":{"type":"string"},"realtimeUrl":{"type":"string"}}}}}}}}},"operationId":"postApiV1OrganizationsByOrganizationIdGamesByGameIdPlay-test"}},"/api/v1/sessions/{sessionId}/events":{"get":{"tags":["replays"],"summary":"Read the events of a game session","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["source","events"],"properties":{"source":{"type":"string","enum":["redis","r2"]},"events":{"type":"array","items":{"type":"object","required":["seq","type","at","data"],"properties":{"seq":{"type":"number"},"type":{"type":"string"},"at":{"type":"number"},"data":{}}}}}}}}}},"operationId":"getApiV1SessionsBySessionIdEvents"}},"/":{"get":{"tags":["ops"],"summary":"API landing page","operationId":"getIndex"}},"/healthz":{"get":{"tags":["ops"],"summary":"Liveness probe","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["status","version","uptimeSeconds"],"properties":{"status":{"const":"ok","type":"string"},"version":{"type":"string"},"uptimeSeconds":{"type":"number"}},"additionalProperties":false}}}}},"operationId":"getHealthz"}},"/readyz":{"get":{"tags":["ops"],"summary":"Readiness probe","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["status","checks"],"properties":{"status":{"type":"string","enum":["ready","degraded"]},"checks":{"type":"object","required":["database","redis"],"properties":{"database":{"type":"boolean"},"redis":{"type":"boolean"}}}},"additionalProperties":false}}}},"503":{"description":"Response for status 503","content":{"application/json":{"schema":{"type":"object","required":["status","checks"],"properties":{"status":{"type":"string","enum":["ready","degraded"]},"checks":{"type":"object","required":["database","redis"],"properties":{"database":{"type":"boolean"},"redis":{"type":"boolean"}}}},"additionalProperties":false}}}}},"operationId":"getReadyz"}},"/api/v1/docs":{"get":{"tags":["docs"],"summary":"List the integration guides","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["docs"],"properties":{"docs":{"type":"array","items":{"type":"object","required":["slug","title","summary"],"properties":{"slug":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"title":{"type":"string"},"summary":{"type":"string"}}}}}}}}}},"operationId":"getApiV1Docs"}},"/api/v1/docs/{slug}":{"get":{"tags":["docs"],"summary":"Read one integration guide","parameters":[{"name":"slug","in":"path","required":true,"schema":{"minLength":3,"maxLength":40,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["slug","title","summary","markdown"],"properties":{"slug":{"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"markdown":{"type":"string"}}}}}}},"operationId":"getApiV1DocsBySlug"}},"/api/v1/organizations/{organizationId}/audit":{"get":{"tags":["audit"],"summary":"Read the audit trail","parameters":[{"name":"organizationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"actorUserId","in":"query","required":false,"schema":{"type":"string"}},{"name":"actorApiKeyId","in":"query","required":false,"schema":{"type":"string"}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"resourceType","in":"query","required":false,"schema":{"type":"string"}},{"name":"resourceId","in":"query","required":false,"schema":{"type":"string"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["auth","organization","api","worker","agent"]}},{"name":"from","in":"query","required":false,"schema":{"format":"date-time","type":"string"}},{"name":"to","in":"query","required":false,"schema":{"format":"date-time","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"minimum":1,"maximum":200,"type":"number"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"type":"object","required":["data","page"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","organizationId","actorType","actorUserId","actorApiKeyId","actorName","actorAvatar","source","action","resourceType","resourceId","metadata","ipAddress","userAgent","createdAt"],"properties":{"id":{"type":"string"},"organizationId":{"type":["string","null"]},"actorType":{"type":"string","enum":["user","api_key","system"]},"actorUserId":{"type":["string","null"]},"actorApiKeyId":{"type":["string","null"]},"actorName":{"type":["string","null"]},"actorAvatar":{"type":["string","null"]},"source":{"type":"string","enum":["auth","organization","api","worker","agent"]},"action":{"type":"string"},"resourceType":{"type":"string"},"resourceId":{"type":["string","null"]},"metadata":{},"ipAddress":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}}}},"page":{"type":"object","required":["limit","hasMore","cursor"],"properties":{"limit":{"type":"number"},"hasMore":{"type":"boolean"},"cursor":{"type":["string","null"]}}}}}}}}},"operationId":"getApiV1OrganizationsByOrganizationIdAudit"}},"/api/v1/auth/sign-in/social":{"post":{"tags":["Default"],"description":"Sign in with a social provider","operationId":"socialSignIn","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"Callback URL to redirect to after the user has signed in"},"newUserCallbackURL":{"type":"string"},"errorCallbackURL":{"type":"string","description":"Callback URL to redirect to if an error happens"},"provider":{"anyOf":[{"type":"string","enum":["apple","atlassian","cloudflare","cognito","discord","facebook","figma","github","microsoft","google","huggingface","slack","spotify","twitch","twitter","dropbox","kick","linear","linkedin","gitlab","tiktok","reddit","roblox","salesforce","vk","zoom","notion","kakao","naver","line","paybin","paypal","polar","railway","vercel","wechat"]},{"type":"string"}]},"disableRedirect":{"type":"boolean","description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"idToken":{"type":"object","properties":{"token":{"type":"string","description":"ID token from the provider"},"nonce":{"type":"string","description":"Nonce used to generate the token"},"accessToken":{"type":"string","description":"Access token from the provider"},"refreshToken":{"type":"string","description":"Refresh token from the provider"},"expiresAt":{"type":"number","description":"Expiry date of the token"},"user":{"type":"object","properties":{"name":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}},"email":{"type":"string"}},"description":"The user object from the provider. Only available for some providers like Apple."}},"required":["token"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Array of scopes to request from the provider. This will override the default scopes passed."},"requestSignUp":{"type":"boolean","description":"Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider"},"loginHint":{"type":"string","description":"The login hint to use for the authorization code request"},"additionalParams":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Extra query parameters to append to the provider authorization URL (e.g. Cognito identity_provider, Google hd)."},"additionalData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["provider"]}}}},"responses":{"200":{"description":"Success - Returns session details (idToken branch) or an authorize URL (redirect branch)","content":{"application/json":{"schema":{"type":"object","description":"Returns session details when idToken is provided, or an authorize URL otherwise","properties":{"token":{"type":"string"},"user":{"type":"object","$ref":"#/components/schemas/User"},"url":{"type":"string"},"redirect":{"type":"boolean"}},"required":["redirect"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/callback/{id}":{"get":{"tags":["Default"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}},"post":{"tags":["Default"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"error":{"type":"string"},"device_id":{"type":"string"},"error_description":{"type":"string"},"state":{"type":"string"},"user":{"type":"string"},"iss":{"type":"string"}}}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/get-session":{"get":{"tags":["Default"],"description":"Get the current session","operationId":"getSession","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}},"post":{"tags":["Default"],"description":"Get the current session","operationId":"getSessionPost","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":["object","null"],"properties":{"session":{"$ref":"#/components/schemas/Session"},"user":{"$ref":"#/components/schemas/User"}},"required":["session","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/sign-out":{"post":{"tags":["Default"],"description":"Sign out the current user","operationId":"signOut","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The URL to redirect to after provider logout"},"disableRedirect":{"type":"boolean","description":"Return the provider logout URL without redirecting"},"state":{"type":"string","description":"State to pass to the provider logout endpoint"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string","description":"Provider logout URL when RP-initiated logout is available"},"redirect":{"type":"boolean","description":"Whether the client should redirect to the provider logout URL"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/sign-up/email":{"post":{"tags":["Default"],"description":"Sign up a user using email and password","operationId":"signUpWithEmailAndPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"email":{"type":"string","description":"The email of the user"},"password":{"type":"string","description":"The password of the user"},"image":{"type":"string","description":"The profile image URL of the user"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"required":["name","email","password"]}}}},"responses":{"200":{"description":"Successfully created user","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"Authentication token for the session"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"422":{"description":"Unprocessable Entity. User already exists or failed to create user.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/sign-in/email":{"post":{"tags":["Default"],"description":"Sign in with email and password","operationId":"signInEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email of the user"},"password":{"type":"string","description":"Password of the user"},"callbackURL":{"type":"string","description":"Callback URL to use as a redirect for email verification"},"rememberMe":{"type":"boolean","description":"If this is false, the session will not be remembered. Default is `true`."}},"required":["email","password"]}}}},"responses":{"200":{"description":"Success - Returns either session details or redirect URL","content":{"application/json":{"schema":{"type":"object","description":"Session response when idToken is provided","properties":{"redirect":{"type":"boolean","enum":[false]},"token":{"type":"string","description":"Session token"},"url":{"type":"string","nullable":true},"user":{"type":"object","$ref":"#/components/schemas/User"}},"required":["redirect","token","user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/reset-password":{"post":{"tags":["Default"],"description":"Reset the password for a user","operationId":"resetPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"token":{"type":"string","description":"The token to reset the password"}},"required":["newPassword"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/verify-password":{"post":{"tags":["Default"],"description":"Verify the current user's password","operationId":"verifyPassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"The password to verify"}},"required":["password"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/verify-email":{"get":{"tags":["Default"],"description":"Verify the email of the user","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","description":"The token to verify the email","required":true,"schema":{"type":"string"}},{"name":"callbackURL","in":"query","description":"The URL to redirect to after email verification","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the email was verified successfully"}},"required":["user","status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/send-verification-email":{"post":{"tags":["Default"],"description":"Send a verification email to the user","operationId":"sendVerificationEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email to send the verification email to","example":"user@example.com"},"callbackURL":{"type":"string","description":"The URL to use for email verification callback","example":"https://example.com/callback","nullable":true}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the email was sent successfully","example":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Verification email isn't enabled"}}}}}},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/change-email":{"post":{"tags":["Default"],"operationId":"changeEmail","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newEmail":{"type":"string","description":"The new email address to set must be a valid email address"},"callbackURL":{"type":"string","description":"The URL to redirect to after email verification"}},"required":["newEmail"]}}}},"responses":{"200":{"description":"Email change request processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"},"status":{"type":"boolean","description":"Indicates if the request was successful"},"message":{"type":"string","enum":["Email updated","Verification email sent"],"description":"Status message of the email change process","nullable":true}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/change-password":{"post":{"tags":["Default"],"description":"Change the password of the user","operationId":"changePassword","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newPassword":{"type":"string","description":"The new password to set"},"currentPassword":{"type":"string","description":"The current password is required"},"revokeOtherSessions":{"type":"boolean","description":"Must be a boolean value"}},"required":["newPassword","currentPassword"]}}}},"responses":{"200":{"description":"Password successfully changed","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","nullable":true,"description":"New session token if other sessions were revoked"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the user"},"email":{"type":"string","format":"email","description":"The email address of the user"},"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","format":"uri","nullable":true,"description":"The profile image URL of the user"},"emailVerified":{"type":"boolean","description":"Whether the email has been verified"},"createdAt":{"type":"string","format":"date-time","description":"When the user was created"},"updatedAt":{"type":"string","format":"date-time","description":"When the user was last updated"}},"required":["id","email","name","emailVerified","createdAt","updatedAt"]}},"required":["user"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/update-session":{"post":{"tags":["Default"],"description":"Update the current session","operationId":"updateSession","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string","description":"Field name must be a string"},"additionalProperties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"type":"object","$ref":"#/components/schemas/Session"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/update-user":{"post":{"tags":["Default"],"description":"Update the current user","operationId":"updateUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the user"},"image":{"type":"string","description":"The image of the user","nullable":true}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","$ref":"#/components/schemas/User"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/delete-user":{"post":{"tags":["Default"],"description":"Delete the user","operationId":"deleteUser","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The callback URL to redirect to after the user is deleted"},"password":{"type":"string","description":"The user's password. Required if session is not fresh"},"token":{"type":"string","description":"The deletion verification token"}}}}}},"responses":{"200":{"description":"User deletion processed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the operation was successful"},"message":{"type":"string","enum":["User deleted","Verification email sent"],"description":"Status message of the deletion process"}},"required":["success","message"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/request-password-reset":{"post":{"tags":["Default"],"description":"Send a password reset email to the user","operationId":"requestPasswordReset","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to send a password reset email to"},"redirectTo":{"type":"string","description":"The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN"}},"required":["email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/reset-password/{token}":{"get":{"tags":["Default"],"description":"Redirects the user to the callback URL with the token","operationId":"resetPasswordCallback","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"description":"The token to reset the password","schema":{"type":"string"}},{"name":"callbackURL","in":"query","required":true,"description":"The URL to redirect the user to reset their password","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/list-sessions":{"get":{"tags":["Default"],"description":"List all active sessions for the user","operationId":"listUserSessions","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/revoke-session":{"post":{"tags":["Default"],"description":"Revoke a single session","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The token to revoke"}},"required":["token"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if the session was revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/revoke-sessions":{"post":{"tags":["Default"],"description":"Revoke all sessions for the user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/revoke-other-sessions":{"post":{"tags":["Default"],"description":"Revoke all other sessions for the user except the current one","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean","description":"Indicates if all other sessions were revoked successfully"}},"required":["status"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/link-social":{"post":{"tags":["Default"],"description":"Link a social account to the user","operationId":"linkSocialAccount","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"callbackURL":{"type":"string","description":"The URL to redirect to after the user has signed in"},"provider":{"anyOf":[{"type":"string","enum":["apple","atlassian","cloudflare","cognito","discord","facebook","figma","github","microsoft","google","huggingface","slack","spotify","twitch","twitter","dropbox","kick","linear","linkedin","gitlab","tiktok","reddit","roblox","salesforce","vk","zoom","notion","kakao","naver","line","paybin","paypal","polar","railway","vercel","wechat"]},{"type":"string"}]},"idToken":{"type":"object","properties":{"token":{"type":"string"},"nonce":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"}},"required":["token"]},"requestSignUp":{"type":"boolean"},"scopes":{"type":"array","items":{"type":"string"},"description":"Additional scopes to request from the provider"},"errorCallbackURL":{"type":"string","description":"The URL to redirect to if there is an error during the link process"},"disableRedirect":{"type":"boolean","description":"Disable automatic redirection to the provider. Useful for handling the redirection yourself"},"loginHint":{"type":"string","description":"The login hint to use for the authorization code request"},"additionalParams":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Extra query parameters to append to the provider authorization URL (e.g. Cognito identity_provider, Google hd)."},"additionalData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["provider"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The authorization URL to redirect the user to"},"redirect":{"type":"boolean","description":"Indicates if the user should be redirected to the authorization URL"},"status":{"type":"boolean"}},"required":["redirect"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/list-accounts":{"get":{"tags":["Default"],"description":"List all accounts linked to the user","operationId":"listUserAccounts","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"accountId":{"type":"string"},"userId":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","providerId","createdAt","updatedAt","accountId","userId","scopes"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/delete-user/callback":{"get":{"tags":["Default"],"description":"Callback to complete user deletion with verification token","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"query","schema":{"type":"string","description":"The token to verify the deletion request"}},{"name":"callbackURL","in":"query","schema":{"type":"string","description":"The URL to redirect to after deletion"}}],"responses":{"200":{"description":"User successfully deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the deletion was successful"},"message":{"type":"string","enum":["User deleted"],"description":"Confirmation message"}},"required":["success","message"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/unlink-account":{"post":{"tags":["Default"],"description":"Unlink an account","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The Better Auth account ID to unlink"}},"required":["accountId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"boolean"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/refresh-token":{"post":{"tags":["Default"],"description":"Refresh the access token using a refresh token","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"accountId":{"type":"string","description":"The Better Auth account ID"},"userId":{"type":"string","description":"The user ID associated with the account"}},"required":["accountId"]},{"type":"object","properties":{"useAccountCookie":{"enum":[true],"description":"Select the current OAuth account from its signed cookie"},"userId":{"type":"string","description":"The user ID associated with the account"}},"required":["useAccountCookie"]}]}}}},"responses":{"200":{"description":"Access token refreshed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string"},"idToken":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid refresh token or provider configuration"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/get-access-token":{"post":{"tags":["Default"],"description":"Get a valid access token, doing a refresh if needed","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"accountId":{"type":"string","description":"The Better Auth account ID"},"userId":{"type":"string","description":"The user ID associated with the account"}},"required":["accountId"]},{"type":"object","properties":{"useAccountCookie":{"enum":[true],"description":"Select the current OAuth account from its signed cookie"},"userId":{"type":"string","description":"The user ID associated with the account"}},"required":["useAccountCookie"]}]}}}},"responses":{"200":{"description":"A Valid access token","content":{"application/json":{"schema":{"type":"object","properties":{"tokenType":{"type":"string"},"idToken":{"type":"string"},"accessToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Invalid refresh token or provider configuration"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/account-info":{"get":{"tags":["Default"],"description":"Get the account info provided by the provider","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","nullable":true},"image":{"type":"string"},"emailVerified":{"type":"boolean"}},"required":["emailVerified"]},"account":{"type":"object","properties":{"id":{"type":"string"},"providerId":{"type":"string"},"accountId":{"type":"string"}},"required":["id","providerId","accountId"],"additionalProperties":false},"data":{"type":"object","properties":{},"additionalProperties":true}},"required":["user","data","account"],"additionalProperties":false}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/ok":{"get":{"tags":["Default"],"description":"Check if the API is working","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"API is working","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","description":"Indicates if the API is working"}},"required":["ok"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/error":{"get":{"tags":["Default"],"description":"Displays an error page","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"text/html":{"schema":{"type":"string","description":"The HTML content of the error page"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/create":{"post":{"tags":["Organization"],"description":"Create an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the organization"},"slug":{"type":"string","minLength":1,"description":"The slug of the organization"},"userId":{"type":"string","description":"The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: \"user-id\""},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The metadata of the organization"},"keepCurrentActiveOrganization":{"type":"boolean","description":"Whether to keep the current active organization active after creating a new one. Eg: true"}},"required":["name","slug"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization that was created","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/update":{"post":{"tags":["Organization"],"description":"Update an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name of the organization"},"slug":{"type":"string","minLength":1,"description":"The slug of the organization"},"logo":{"type":["string","null"],"description":"The logo of the organization"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The metadata of the organization"}}},"organizationId":{"type":"string","description":"The organization ID. Eg: \"org-id\""}},"required":["data"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The updated organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/delete":{"post":{"tags":["Organization"],"description":"Delete an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization id to delete"}},"required":["organizationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string","description":"The organization id that was deleted"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/set-active":{"post":{"tags":["Organization"],"description":"Set the active organization","operationId":"setActiveOrganization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":["string","null"],"description":"The organization id to set as active. It can be null to unset the active organization. Eg: \"org-id\""},"organizationSlug":{"type":"string","description":"The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: \"org-slug\""}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/get-organization":{"get":{"tags":["Organization"],"description":"Get the organization metadata","operationId":"getOrganization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/get-full-organization":{"get":{"tags":["Organization"],"description":"Get the full organization","operationId":"getFullOrganization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","description":"The organization","$ref":"#/components/schemas/Organization"}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/list":{"get":{"tags":["Organization"],"description":"List all organizations","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/invite-member":{"post":{"tags":["Organization"],"description":"Create an invitation to an organization","operationId":"createOrganizationInvitation","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The email address of the user to invite"},"role":{"anyOf":[{"type":"string","description":"The role to assign to the user"},{"type":"array","items":{"type":"string","description":"The roles to assign to the user"}}],"description":"The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\""},"organizationId":{"type":"string","description":"The organization ID to invite the user to"},"resend":{"type":"boolean","description":"Resend the invitation email, if the user is already invited. Eg: true"},"teamId":{"anyOf":[{"type":"string","description":"The team ID to invite the user to"},{"type":"array","items":{"type":"string"},"description":"The team IDs to invite the user to"}]}},"required":["email","role"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","createdAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/cancel-invitation":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to cancel"}},"required":["invitationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/accept-invitation":{"post":{"tags":["Organization"],"description":"Accept an invitation to an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to accept"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object"}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/get-invitation":{"get":{"tags":["Organization"],"description":"Get an invitation by ID","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"query","schema":{"type":"string","description":"The ID of the invitation to get"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"inviterId":{"type":"string"},"status":{"type":"string"},"expiresAt":{"type":"string"},"organizationName":{"type":"string"},"organizationSlug":{"type":"string"},"inviterEmail":{"type":"string"}},"required":["id","email","role","organizationId","inviterId","status","expiresAt","organizationName","organizationSlug","inviterEmail"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/reject-invitation":{"post":{"tags":["Organization"],"description":"Reject an invitation to an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"invitationId":{"type":"string","description":"The ID of the invitation to reject"}},"required":["invitationId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invitation":{"type":"object"},"member":{"type":"object","nullable":true}}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/list-invitations":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/get-active-member":{"get":{"tags":["Organization"],"description":"Get the member details of the active organization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/check-slug":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"The organization slug to check. Eg: \"my-org\""}},"required":["slug"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/remove-member":{"post":{"tags":["Organization"],"description":"Remove a member from an organization","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"memberIdOrEmail":{"type":"string","description":"The ID or email of the member to remove"},"organizationId":{"type":"string","description":"The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\""}},"required":["memberIdOrEmail"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/update-member-role":{"post":{"tags":["Organization"],"description":"Update the role of a member in an organization","operationId":"updateOrganizationMemberRole","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]"},"memberId":{"type":"string","description":"The member id to apply the role update to. Eg: \"member-id\""},"organizationId":{"type":"string","description":"An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: \"organization-id\""}},"required":["role","memberId"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"organizationId":{"type":"string"},"role":{"type":"string"}},"required":["id","userId","organizationId","role"]}},"required":["member"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/leave":{"post":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationId":{"type":"string","description":"The organization Id for the member to leave. Eg: \"organization-id\""}},"required":["organizationId"]}}}},"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/list-user-invitations":{"get":{"tags":["Organization"],"description":"List all invitations a user has received","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"inviterId":{"type":"string","description":"The ID of the user who created the invitation"},"teamId":{"type":"string","description":"The ID of the team associated with the invitation","nullable":true},"status":{"type":"string"},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","email","role","organizationId","organizationName","inviterId","status","expiresAt","createdAt"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/list-members":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/get-active-member-role":{"get":{"tags":["Organization"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/organization/has-permission":{"post":{"tags":["Organization"],"description":"Check if the user has permission","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"permission":{"type":"object","description":"The permission to check","deprecated":true},"permissions":{"type":"object","description":"The permission to check"}},"required":["permissions"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/api-key/create":{"post":{"tags":["Api-key"],"description":"Create a new API key for a user","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configId":{"type":"string","description":"The configuration ID to use for the API key. If not provided, the default configuration will be used."},"name":{"type":"string","description":"Name of the Api Key"},"expiresIn":{"type":["number","null"],"description":"Expiration time of the Api Key in seconds"},"prefix":{"type":"string","description":"Prefix of the Api Key"},"remaining":{"type":["number","null"],"description":"Remaining number of requests. Server side only"},"metadata":{},"refillAmount":{"type":"number","description":"Amount to refill the remaining count of the Api Key. server-only. Eg: 100"},"refillInterval":{"type":"number","description":"Interval to refill the Api Key in milliseconds. server-only. Eg: 1000"},"rateLimitTimeWindow":{"type":"number","description":"The duration in milliseconds where each request is counted. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 1000"},"rateLimitMax":{"type":"number","description":"Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100"},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled. server-only. Eg: true"},"permissions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Permissions of the Api Key."},"userId":{"type":"string","description":"User Id of the user that the Api Key belongs to. server-only. Eg: \"user-id\""},"organizationId":{"type":"string","description":"Organization Id of the organization that the Api Key belongs to. Eg: 'org-id'"}}}}}},"responses":{"200":{"description":"API key created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the API key"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp"},"name":{"type":"string","nullable":true,"description":"Name of the API key"},"prefix":{"type":"string","nullable":true,"description":"Prefix of the API key"},"start":{"type":"string","nullable":true,"description":"Starting characters of the key (if configured)"},"key":{"type":"string","description":"The full API key (only returned on creation)"},"enabled":{"type":"boolean","description":"Whether the key is enabled"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiration timestamp"},"referenceId":{"type":"string","description":"ID of the reference owning the key"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"Last refill timestamp"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"Last request timestamp"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Metadata associated with the key"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum requests in time window"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"Rate limit time window in milliseconds"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests"},"refillAmount":{"type":"number","nullable":true,"description":"Amount to refill"},"refillInterval":{"type":"number","nullable":true,"description":"Refill interval in milliseconds"},"rateLimitEnabled":{"type":"boolean","description":"Whether rate limiting is enabled"},"requestCount":{"type":"number","description":"Current request count in window"},"permissions":{"type":"object","nullable":true,"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Permissions associated with the key"}},"required":["id","createdAt","updatedAt","key","enabled","referenceId","rateLimitEnabled","requestCount"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/api-key/get":{"get":{"tags":["Api-key"],"description":"Retrieve an existing API key by ID","security":[{"bearerAuth":[]}],"parameters":[{"name":"configId","in":"query","schema":{"type":"string","description":"The configuration ID to use for the API key lookup. If not provided, the default configuration will be used."}},{"name":"id","in":"query","schema":{"type":"string","description":"The id of the Api Key"}}],"responses":{"200":{"description":"API key retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/api-key/update":{"post":{"tags":["Api-key"],"description":"Update an existing API key by ID","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"configId":{"type":"string","description":"The configuration ID to use for the API key lookup. If not provided, the default configuration will be used."},"keyId":{"type":"string","description":"The id of the Api Key"},"userId":{"type":"string","description":"The id of the user which the api key belongs to. server-only. Eg: \"some-user-id\""},"name":{"type":"string","description":"The name of the key"},"enabled":{"type":"boolean","description":"Whether the Api Key is enabled or not"},"remaining":{"type":"number","description":"The number of remaining requests"},"refillAmount":{"type":"number","description":"The refill amount"},"refillInterval":{"type":"number","description":"The refill interval"},"metadata":{},"expiresIn":{"type":["number","null"],"description":"Expiration time of the Api Key in seconds"},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled."},"rateLimitTimeWindow":{"type":"number","description":"The duration in milliseconds where each request is counted. server-only. Eg: 1000"},"rateLimitMax":{"type":"number","description":"Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100"},"permissions":{"type":["object","null"],"propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Update the permissions on the API Key. server-only."}},"required":["keyId"]}}}},"responses":{"200":{"description":"API key updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/api-key/delete":{"post":{"tags":["Api-key"],"description":"Delete an existing API key","security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"keyId":{"type":"string","description":"The id of the API key to delete"}},"required":["keyId"]}}}},"responses":{"200":{"description":"API key deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the API key was successfully deleted"}},"required":["success"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}},"/api/v1/auth/api-key/list":{"get":{"tags":["Api-key"],"description":"List all API keys for the authenticated user or for a specific organization","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"API keys retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiKeys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ID"},"name":{"type":"string","nullable":true,"description":"The name of the key"},"start":{"type":"string","nullable":true,"description":"Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key."},"prefix":{"type":"string","nullable":true,"description":"The API Key prefix. Stored as plain text."},"userId":{"type":"string","description":"The owner of the user id"},"refillInterval":{"type":"number","nullable":true,"description":"The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)"},"refillAmount":{"type":"number","nullable":true,"description":"The amount to refill"},"lastRefillAt":{"type":"string","format":"date-time","nullable":true,"description":"The last refill date"},"enabled":{"type":"boolean","description":"Sets if key is enabled or disabled","default":true},"rateLimitEnabled":{"type":"boolean","description":"Whether the key has rate limiting enabled"},"rateLimitTimeWindow":{"type":"number","nullable":true,"description":"The duration in milliseconds"},"rateLimitMax":{"type":"number","nullable":true,"description":"Maximum amount of requests allowed within a window"},"requestCount":{"type":"number","description":"The number of requests made within the rate limit time window"},"remaining":{"type":"number","nullable":true,"description":"Remaining requests (every time api key is used this should updated and should be updated on refill as well)"},"lastRequest":{"type":"string","format":"date-time","nullable":true,"description":"When last request occurred"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"Expiry date of a key"},"createdAt":{"type":"string","format":"date-time","description":"created at"},"updatedAt":{"type":"string","format":"date-time","description":"updated at"},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Extra metadata about the apiKey"},"permissions":{"type":"string","nullable":true,"description":"Permissions for the api key (stored as JSON string)"}},"required":["id","userId","enabled","rateLimitEnabled","requestCount","createdAt","updatedAt"]}},"total":{"type":"number","description":"Total number of API keys"},"limit":{"type":"number","nullable":true,"description":"The limit used for pagination"},"offset":{"type":"number","nullable":true,"description":"The offset used for pagination"}},"required":["apiKeys","total"]}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Bad Request. Usually due to missing parameters, or invalid parameters."},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"description":"Unauthorized. Due to missing or invalid authentication."},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Forbidden. You do not have permission to access this resource or to perform this action."},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Not Found. The requested resource was not found."},"429":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Too Many Requests. You have exceeded the rate limit. Try again later."},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}},"description":"Internal Server Error. This is a problem with the server that you cannot fix."}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"email":{"type":"string"},"emailVerified":{"type":"boolean","default":false,"readOnly":true},"image":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","email","emailVerified","createdAt","updatedAt"]},"Session":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"expiresAt":{"type":"string","format":"date-time"},"token":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"ipAddress":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"activeOrganizationId":{"type":"string","readOnly":true}},"required":["id","expiresAt","token","createdAt","updatedAt","userId"]},"Account":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"accountId":{"type":"string"},"providerId":{"type":"string"},"userId":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"idToken":{"type":"string"},"accessTokenExpiresAt":{"type":"string","format":"date-time"},"refreshTokenExpiresAt":{"type":"string","format":"date-time"},"scope":{"type":"string"},"password":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","accountId","providerId","userId","createdAt","updatedAt"]},"Verification":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"identifier":{"type":"string"},"value":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","identifier","value","expiresAt","createdAt","updatedAt"]},"Organization":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"name":{"type":"string"},"slug":{"type":"string"},"logo":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"metadata":{"type":"string"}},"required":["id","name","slug","createdAt"]},"Member":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organizationId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","default":"member"},"createdAt":{"type":"string","format":"date-time"},"name":{"type":"string"}},"required":["id","organizationId","userId","role","createdAt"]},"Invitation":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"organizationId":{"type":"string"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string","default":"pending"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"inviterId":{"type":"string"}},"required":["id","organizationId","email","status","expiresAt","createdAt","inviterId"]},"Apikey":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"configId":{"type":"string","default":"default","readOnly":true},"name":{"type":"string","readOnly":true},"start":{"type":"string","readOnly":true},"referenceId":{"type":"string","readOnly":true},"prefix":{"type":"string","readOnly":true},"key":{"type":"string","readOnly":true},"refillInterval":{"type":"number","readOnly":true},"refillAmount":{"type":"number","readOnly":true},"lastRefillAt":{"type":"string","format":"date-time","readOnly":true},"enabled":{"type":"boolean","default":true,"readOnly":true},"rateLimitEnabled":{"type":"boolean","default":true,"readOnly":true},"rateLimitTimeWindow":{"type":"number","default":86400000,"readOnly":true},"rateLimitMax":{"type":"number","default":10,"readOnly":true},"requestCount":{"type":"number","default":0,"readOnly":true},"remaining":{"type":"number","readOnly":true},"lastRequest":{"type":"string","format":"date-time","readOnly":true},"expiresAt":{"type":"string","format":"date-time","readOnly":true},"createdAt":{"type":"string","format":"date-time","readOnly":true},"updatedAt":{"type":"string","format":"date-time","readOnly":true},"permissions":{"type":"string","readOnly":true},"metadata":{"type":"string"}},"required":["id","configId","referenceId","key","createdAt","updatedAt"]}},"securitySchemes":{"apiKeyCookie":{"type":"apiKey","in":"cookie","name":"apiKeyCookie","description":"API Key authentication via cookie"},"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer token authentication"}}},"info":{"title":"Wasanni API","description":"Sessions, scores, tournaments, and replays for games.","version":"0.0.0"},"openapi":"3.1.2"}