{"openapi":"3.0.3","info":{"title":"Colibrio Cirrus API","version":"1.0.0","description":"Machine-readable contract for the public Cirrus API."},"servers":[{"url":"https://api.cirrusreader.com"}],"paths":{"/v1/analytics":{"get":{"tags":["analytics"],"operationId":"GetAnalytics","summary":"Get analytics by scope","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","enum":["total","month"],"default":"month"}}],"responses":{"200":{"description":"Analytics were returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"period":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["from","to"]},"totals":{"type":"object","properties":{"publicationsRead":{"type":"integer","minimum":0},"totalViews":{"type":"integer","minimum":0},"activeReaders":{"type":"integer","minimum":0}},"required":["publicationsRead","totalViews","activeReaders"]},"monthly":{"type":"array","items":{"type":"object","properties":{"publicationsRead":{"type":"integer","minimum":0},"totalViews":{"type":"integer","minimum":0},"activeReaders":{"type":"integer","minimum":0},"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["publicationsRead","totalViews","activeReaders","month"]}}},"required":["period","totals"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/analytics/publications/popular":{"get":{"tags":["analytics"],"operationId":"GetPopularPublicationAnalytics","summary":"Get popular publication analytics.","parameters":[],"responses":{"200":{"description":"Popular publication analytics were returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"publicationId":{"type":"string"},"title":{"type":"string"},"views":{"type":"integer","minimum":0}},"required":["publicationId","title","views"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/analytics/publications/{id}":{"get":{"tags":["analytics"],"operationId":"GetPublicationAnalytics","summary":"Get analytics for a publication within the authenticated scope.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","enum":["total","month"],"default":"month"}}],"responses":{"200":{"description":"Publication analytics were returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"publicationId":{"type":"string"},"period":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["from","to"]},"totals":{"type":"object","properties":{"totalReads":{"type":"integer","minimum":0},"averageReadTimeMs":{"type":"number","minimum":0},"averageCompletion":{"type":"number","minimum":0,"maximum":1},"completionRate":{"type":"number","minimum":0,"maximum":1}},"required":["totalReads","averageReadTimeMs","averageCompletion","completionRate"]},"monthly":{"type":"array","items":{"type":"object","properties":{"totalReads":{"type":"integer","minimum":0},"averageReadTimeMs":{"type":"number","minimum":0},"averageCompletion":{"type":"number","minimum":0,"maximum":1},"completionRate":{"type":"number","minimum":0,"maximum":1},"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"}},"required":["totalReads","averageReadTimeMs","averageCompletion","completionRate","month"]}}},"required":["publicationId","period","totals"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/analytics/publications/{id}/activity":{"get":{"tags":["analytics"],"operationId":"GetPublicationDailyActivityAnalytics","summary":"Get daily analytics for a publication within the authenticated scope.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"}}],"responses":{"200":{"description":"Publication analytics were returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"publicationId":{"type":"string"},"period":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"to":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"}},"required":["from","to"]},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"views":{"type":"integer","minimum":0}},"required":["day","views"]}}},"required":["publicationId","period","daily"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/apikeys":{"get":{"tags":["apiKeys"],"operationId":"ListApiKeys","summary":"List API keys owned by the current user.","parameters":[],"responses":{"200":{"description":"The API keys were returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organisationId":{"type":"string"},"userId":{"type":"string"},"keyId":{"type":"string"},"prefix":{"type":"string"},"keyHash":{"type":"string"},"suffix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","delete"]}},"revoked":{},"expires":{},"created":{"type":"string","format":"date-time"},"lastUsed":{},"createdByUserId":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]}},"required":["id","name","userId","keyId","prefix","keyHash","suffix","created","createdByUserId","status"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/apikeys/{id}":{"get":{"tags":["apiKeys"],"operationId":"GetApiKey","summary":"Retrieve a single API key by ID.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The API key was returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organisationId":{"type":"string"},"userId":{"type":"string"},"keyId":{"type":"string"},"prefix":{"type":"string"},"keyHash":{"type":"string"},"suffix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","delete"]}},"revoked":{},"expires":{},"created":{"type":"string","format":"date-time"},"lastUsed":{},"createdByUserId":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]}},"required":["id","name","userId","keyId","prefix","keyHash","suffix","created","createdByUserId","status"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["apiKeys"],"operationId":"UpdateApiKey","summary":"Update the name, scopes, revocation state, or status of an API key.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","delete"]}},"status":{"type":"string","enum":["active","inactive"]}}}}}},"responses":{"200":{"description":"The API key was updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organisationId":{"type":"string"},"userId":{"type":"string"},"keyId":{"type":"string"},"prefix":{"type":"string"},"keyHash":{"type":"string"},"suffix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","delete"]}},"revoked":{},"expires":{},"created":{"type":"string","format":"date-time"},"lastUsed":{},"createdByUserId":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]}},"required":["id","name","userId","keyId","prefix","keyHash","suffix","created","createdByUserId","status"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["apiKeys"],"operationId":"DeleteApiKey","summary":"Delete an API key by ID.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The API key was deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"organisationId":{"type":"string"},"userId":{"type":"string"},"keyId":{"type":"string"},"prefix":{"type":"string"},"keyHash":{"type":"string"},"suffix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","delete"]}},"revoked":{},"expires":{},"created":{"type":"string","format":"date-time"},"lastUsed":{},"createdByUserId":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]}},"required":["id","name","userId","keyId","prefix","keyHash","suffix","created","createdByUserId","status"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/billing/usage":{"get":{"tags":["billing"],"operationId":"GetBillingUsage","summary":"Get current bandwidth usage and projected billing information.","parameters":[],"responses":{"200":{"description":"Billing usage was returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"currentPeriod":{"type":"object","properties":{"periodKey":{"type":"string"},"periodStartIso":{"type":"string","format":"date-time"},"periodEndIso":{"type":"string","format":"date-time"},"bandwidthLimitBytes":{"oneOf":[{"type":"string","pattern":"^\\d+$"},{"enum":["-1"]}]},"bytesUsed":{"type":"string","pattern":"^\\d+$"},"requestCount":{"type":"string","pattern":"^\\d+$"},"status":{"type":"string","enum":["open","settling","final"]},"bandwidthAccessStatus":{"type":"string","enum":["enabled","blocked"]},"calculatedThroughIso":{"type":"string","format":"date-time"},"finalizedAtIso":{"type":"string","format":"date-time"}},"required":["periodKey","periodStartIso","periodEndIso","bandwidthLimitBytes","bytesUsed","requestCount","status","bandwidthAccessStatus"]},"previousPeriods":{"type":"array","items":{"type":"object","properties":{"periodKey":{"type":"string"},"periodStartIso":{"type":"string","format":"date-time"},"periodEndIso":{"type":"string","format":"date-time"},"bandwidthLimitBytes":{"oneOf":[{"type":"string","pattern":"^\\d+$"},{"enum":["-1"]}]},"bytesUsed":{"type":"string","pattern":"^\\d+$"},"requestCount":{"type":"string","pattern":"^\\d+$"},"status":{"type":"string","enum":["open","settling","final"]},"bandwidthAccessStatus":{"type":"string","enum":["enabled","blocked"]},"calculatedThroughIso":{"type":"string","format":"date-time"},"finalizedAtIso":{"type":"string","format":"date-time"}},"required":["periodKey","periodStartIso","periodEndIso","bandwidthLimitBytes","bytesUsed","requestCount","status","bandwidthAccessStatus"]}},"daily":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"},"bytesSent":{"type":"string","pattern":"^\\d+$"},"requestCount":{"type":"string","pattern":"^\\d+$"},"status":{"type":"string","enum":["provisional","final"]},"calculatedThroughIso":{"type":"string","format":"date-time"}},"required":["day","bytesSent","requestCount","status","calculatedThroughIso"]}},"topPublications":{"type":"array","items":{"type":"object","properties":{"publicationKey":{"type":"string"},"publicationId":{"type":"string"},"title":{"type":"string"},"bytesSent":{"type":"string","pattern":"^\\d+$"},"requestCount":{"type":"string","pattern":"^\\d+$"}},"required":["publicationKey","bytesSent","requestCount"]}},"projection":{"oneOf":[{"type":"object","properties":{"status":{"enum":["insufficient_data"]},"monthsOfData":{"type":"integer","minimum":0},"reason":{"enum":["fewer_than_three_complete_months"]}},"required":["status","monthsOfData","reason"]},{"type":"object","properties":{"status":{"enum":["available"]},"monthsOfData":{"type":"integer","minimum":3},"projectedBytesSent":{"type":"string","pattern":"^\\d+$"},"averageMonthlyGrowth":{"type":"number"}},"required":["status","monthsOfData","projectedBytesSent","averageMonthlyGrowth"]}]}},"required":["previousPeriods","daily","topPublications","projection"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/billing/webhooks/stripe":{"post":{"tags":["billing"],"summary":"Receive signed Stripe billing webhook events.","parameters":[],"responses":{"200":{"description":"The Stripe event was received.","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"enum":[true]}},"required":["received"]}}}},"400":{"description":"The Stripe webhook request could not be verified.","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"enum":[false]},"message":{"type":"string"}},"required":["received","message"]}}}},"500":{"description":"The Stripe webhook request could not be verified.","content":{"application/json":{"schema":{"type":"object","properties":{"received":{"enum":[false]},"message":{"type":"string"}},"required":["received","message"]}}}}},"security":[]}},"/v1/resources/assets":{"get":{"tags":["resources"],"operationId":"ListAssets","summary":"List assets for the current scope.","parameters":[],"responses":{"200":{"description":"Assets were fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdBySub":{"type":"string","minLength":1},"scopeId":{"type":"string","minLength":1},"organisationId":{"type":"string"},"type":{"type":"string","enum":["font","logo","image","icon","iconset","avatar"]},"filename":{"type":"string","minLength":1},"key":{"type":"string","minLength":1},"filetype":{"type":"string"},"filesize":{"type":"number"},"status":{"type":"string","enum":["pending","uploaded","processing","available","rejected"]},"usedByReaderInstances":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id"]},"default":[]},"createdAtIso":{"type":"string","format":"date-time"}},"required":["id","createdBySub","scopeId","type","filename","key","filetype","filesize","status","createdAtIso"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["resources"],"operationId":"CreateAsset","summary":"Create a new asset.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["font","logo","image","icon","iconset","avatar"]},"filename":{"type":"string","minLength":1}},"required":["type","filename"]}}},"required":["assets"]}}}},"responses":{"201":{"description":"The asset was created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"uploadMode":{"type":"string","enum":["single","multipart"],"default":"single"},"type":{"type":"string","enum":["font","logo","image","icon","iconset","avatar"]},"filename":{"type":"string"},"key":{"type":"string"},"uploadUrl":{"type":"string"},"expiresIn":{"type":"number"},"requiredHeaders":{"type":"object","properties":{"Content-Type":{"type":"string"}},"required":["Content-Type"]}},"required":["id","type","filename","key","uploadUrl","expiresIn","requiredHeaders"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["result","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/resources/assets/{id}":{"patch":{"tags":["resources"],"operationId":"UpdateAsset","summary":"Update an asset by id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1}},"required":["filename"]}}}},"responses":{"200":{"description":"The asset was updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"nullable":true},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["resources"],"operationId":"DeleteAsset","summary":"Delete an asset by id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The asset was deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"nullable":true},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/resources/metadata-keys":{"get":{"tags":["resources"],"operationId":"ListMetadataKeys","summary":"List user-defined metadata keys for the active scope.","parameters":[],"responses":{"200":{"description":"Metadata keys were fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"scopeId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"origin":{"type":"string","enum":["cirrus","custom"],"default":"custom"},"mutability":{"type":"string","enum":["immutable","editable"],"default":"editable"},"status":{"type":"string","enum":["active","archived"],"default":"active"},"isInUse":{"type":"boolean","default":false},"archivedAtIso":{"type":"string"},"archivedBySub":{"type":"string"},"createdAtIso":{"type":"string"},"updatedAtIso":{"type":"string"}},"required":["id","scopeId","key"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["resources"],"operationId":"CreateMetadataKey","summary":"Create a reusable metadata key for the active scope.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","maxLength":120}},"required":["key"]}}}},"responses":{"201":{"description":"Metadata key was created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"scopeId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"origin":{"type":"string","enum":["cirrus","custom"],"default":"custom"},"mutability":{"type":"string","enum":["immutable","editable"],"default":"editable"},"status":{"type":"string","enum":["active","archived"],"default":"active"},"isInUse":{"type":"boolean","default":false},"archivedAtIso":{"type":"string"},"archivedBySub":{"type":"string"},"createdAtIso":{"type":"string"},"updatedAtIso":{"type":"string"}},"required":["id","scopeId","key"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/resources/metadata-keys/{id}":{"patch":{"tags":["resources"],"operationId":"UpdateMetadataKey","summary":"Archive or restore a reusable metadata key.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","archived"]}},"required":["status"]}}}},"responses":{"200":{"description":"Metadata key status was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"scopeId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"origin":{"type":"string","enum":["cirrus","custom"],"default":"custom"},"mutability":{"type":"string","enum":["immutable","editable"],"default":"editable"},"status":{"type":"string","enum":["active","archived"],"default":"active"},"isInUse":{"type":"boolean","default":false},"archivedAtIso":{"type":"string"},"archivedBySub":{"type":"string"},"createdAtIso":{"type":"string"},"updatedAtIso":{"type":"string"}},"required":["id","scopeId","key"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["resources"],"operationId":"DeleteMetadataKey","summary":"Permanently delete an archived, unused custom metadata key.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Metadata key was permanently deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"scopeId":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"origin":{"type":"string","enum":["cirrus","custom"],"default":"custom"},"mutability":{"type":"string","enum":["immutable","editable"],"default":"editable"},"status":{"type":"string","enum":["active","archived"],"default":"active"},"isInUse":{"type":"boolean","default":false},"archivedAtIso":{"type":"string"},"archivedBySub":{"type":"string"},"createdAtIso":{"type":"string"},"updatedAtIso":{"type":"string"}},"required":["id","scopeId","key"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/publications":{"get":{"tags":["publications"],"operationId":"ListPublications","summary":"Get all publications.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}},{"name":"nextToken","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":120}},{"name":"collectionId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"statuses","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["draft","live"]}}},{"name":"formats","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["epub-reflowable","epub-fixed","pdf","audio"]}}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string","enum":["title","author","createdAtIso"],"default":"createdAtIso"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}}],"responses":{"200":{"description":"Publications were fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"author":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"currentEditionId":{"type":"string"},"publicationId":{"type":"string"},"cover":{"type":"string"},"createdAtIso":{"type":"string","format":"date-time"},"collectionIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["title","author","currentEditionId","publicationId","createdAtIso"]}},"defaultPublicationId":{"nullable":true},"stats":{"type":"object","properties":{"publicationCount":{"type":"number","default":0},"publicationEditionCount":{"type":"number","default":0},"months":{"type":"object","additionalProperties":{"type":"object","properties":{"publicationCount":{"type":"number","default":0},"publicationEditionCount":{"type":"number","default":0}}}}},"required":["months"]},"nextToken":{},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","defaultPublicationId","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["publications"],"operationId":"CreatePublication","summary":"Create a publication and upload session.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}],"default":"English"},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"},"uploadRequestId":{"type":"string","format":"uuid"},"publicationFilename":{"type":"string","minLength":1},"coverFilename":{"type":"string"},"collectionIds":{"type":"array","items":{"type":"string"},"default":[]},"edition":{"type":"object","properties":{"isReflowable":{"type":"boolean"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true},"type":{"type":"string","enum":["EPUB","PDF","Audio"]}},"required":["title","author","metadata","navigationData","type"]}},"required":["uploadRequestId","publicationFilename","edition"]}}}},"responses":{"201":{"description":"The publication upload session was created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}],"default":"English"},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"},"editions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"editionCreated":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"},"default":[]},"version":{"type":"number","default":1},"isCurrentVersion":{"type":"boolean","default":true},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true}},"required":["title","metadata","navigationData"]}}},"required":["id","editions"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/publication-uploads":{"post":{"tags":["publications"],"operationId":"CreatePublicationUploadIntent","summary":"Create an upload intent for a publication or publication edition.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadRequestId":{"type":"string","format":"uuid"},"publicationFilename":{"type":"string","minLength":1},"coverFilename":{"type":"string"},"publicationType":{"type":"string","enum":["EPUB","PDF","Audio"]}},"required":["uploadRequestId","publicationFilename","publicationType"]}}}},"responses":{"201":{"description":"The publication upload intent was created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"uploadRequestId":{"type":"string","format":"uuid"},"uploadMode":{"type":"string","enum":["single","multipart"],"default":"single"},"cover":{"type":"object","properties":{"objectKey":{"type":"string"},"uploadUrl":{"type":"string"},"expiresIn":{"type":"number"},"requiredHeaders":{"type":"object","properties":{"Content-Type":{"type":"string"}},"required":["Content-Type"]}},"required":["objectKey","uploadUrl","expiresIn","requiredHeaders"]},"objectKey":{"type":"string"},"uploadUrl":{"type":"string"},"expiresIn":{"type":"number"},"requiredHeaders":{"type":"object","properties":{"Content-Type":{"type":"string"}},"required":["Content-Type"]}},"required":["uploadRequestId","objectKey","uploadUrl","expiresIn","requiredHeaders"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["result","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/publications/{id}":{"get":{"tags":["publications"],"operationId":"GetPublication","summary":"Get publication by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Publication fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}],"default":"English"},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"},"editions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"editionCreated":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"},"default":[]},"version":{"type":"number","default":1},"isCurrentVersion":{"type":"boolean","default":true},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true}},"required":["title","metadata","navigationData"]}}},"required":["id","editions"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["publications"],"operationId":"UpdatePublication","summary":"Update a publication.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}]},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The publication was updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}],"default":"English"},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"},"editions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"editionCreated":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"},"default":[]},"version":{"type":"number","default":1},"isCurrentVersion":{"type":"boolean","default":true},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true}},"required":["title","metadata","navigationData"]}}},"required":["id","editions"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["publications"],"operationId":"DeletePublication","summary":"Delete publication by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Publication deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}],"default":"English"},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"},"editions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"editionCreated":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"},"default":[]},"version":{"type":"number","default":1},"isCurrentVersion":{"type":"boolean","default":true},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true}},"required":["title","metadata","navigationData"]}}},"required":["id","editions"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/publications/{id}/editions":{"get":{"tags":["publications"],"operationId":"GetPublicationEditions","summary":"Get all editions for a publication.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Publication editions fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"editionCreated":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"},"default":[]},"version":{"type":"number","default":1},"isCurrentVersion":{"type":"boolean","default":true},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true}},"required":["title","metadata","navigationData"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["publications"],"operationId":"CreatePublicationEdition","summary":"Create an edition for a publication and upload session.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}],"default":"English"},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"},"uploadRequestId":{"type":"string","format":"uuid"},"publicationFilename":{"type":"string","minLength":1},"coverFilename":{"type":"string"},"collectionIds":{"type":"array","items":{"type":"string"},"default":[]},"edition":{"type":"object","properties":{"isReflowable":{"type":"boolean"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true},"type":{"type":"string","enum":["EPUB","PDF","Audio"]}},"required":["title","author","metadata","navigationData","type"]}},"required":["uploadRequestId","publicationFilename","edition"]}}}},"responses":{"201":{"description":"The publication edition upload session was created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"language":{"oneOf":[{"type":"string"},{"type":"string","enum":["English","French","German","Italian","Spanish"]}],"default":"English"},"description":{},"sampleItems":{"type":"array","items":{"nullable":true}},"isForInternalReadingInstance":{"type":"boolean"},"editions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"editionCreated":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":1},"titleSource":{"type":"string","enum":["user","filename","extracted"]},"author":{"type":"array","items":{"type":"string"},"default":[]},"version":{"type":"number","default":1},"isCurrentVersion":{"type":"boolean","default":true},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"editionNotes":{"type":"string"},"key":{"type":"string"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"navigationData":{"nullable":true}},"required":["title","metadata","navigationData"]}}},"required":["id","editions"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/publications/{id}/editions/{editionid}":{"get":{"tags":["publications"],"operationId":"GetPublicationEdition","summary":"Get edition by ID for a publication.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"editionid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Publication edition fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"nullable":true},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["publications"],"operationId":"UpdatePublicationEdition","summary":"Update an edition for a publication.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"editionid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"isReflowable":{"type":"boolean"},"title":{"type":"string","minLength":1},"author":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["draft","live"]},"isCurrentVersion":{"type":"boolean"},"editionNotes":{"type":"string"},"metadata":{"type":"object","properties":{"pageCount":{"type":"string"},"fileSize":{"type":"string"},"epubVersion":{"type":"string"},"spreadBehaviour":{"type":"string","enum":["AUTO","BOTH","LANDSCAPE","NONE"]},"layoutType":{"type":"string","enum":["REFLOWABLE","PRE_PAGINATED"]},"cover":{"type":"string","default":""},"coverImageAlt":{"type":"string"},"isbn":{"type":"string"},"publisher":{"type":"string"}},"additionalProperties":{"type":"string"}},"coverFilename":{"type":"string"}}}}}},"responses":{"200":{"description":"Publication editions fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"nullable":true},"result":{"type":"object","properties":{"cover":{"type":"object","properties":{"objectKey":{"type":"string"},"uploadUrl":{"type":"string"},"expiresIn":{"type":"number"},"requiredHeaders":{"type":"object","properties":{"Content-Type":{"type":"string"}},"required":["Content-Type"]}},"required":["objectKey","uploadUrl","expiresIn","requiredHeaders"]}}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/publications/bulk":{"post":{"tags":["publications"],"operationId":"BatchActionPublication","summary":"Perform a batch operation for Publications.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"operation":{"enum":["deletePublications"]},"params":{"type":"object","properties":{"publicationIds":{"type":"array","items":{"type":"string"}}},"required":["publicationIds"]}},"required":["operation","params"]},{"type":"object","properties":{"operation":{"enum":["createPublications"]},"params":{"type":"object","properties":{"authorization":{"type":"object","properties":{"type":{"type":"string","enum":["bearer"]},"accessToken":{"type":"string"},"expiresAt":{"type":"number"}},"required":["type","accessToken","expiresAt"]},"providerId":{"type":"string","enum":["google-drive"]},"files":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"mimeType":{"type":"string"},"providerFileId":{"type":"string"},"size":{"type":"number"}},"required":["filename","providerFileId"]}}},"required":["providerId","files"]}},"required":["operation","params"]}]}}}},"responses":{"201":{"description":"The batch operation completed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","fail"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["status","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/collections":{"get":{"tags":["publicationCollections"],"operationId":"ListPublicationCollections","summary":"List all Publication Collections.","parameters":[],"responses":{"200":{"description":"Fetch of Publication Collections successful.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{},"publicationCount":{"type":"number","default":0}},"required":["id","name"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["publicationCollections"],"operationId":"CreatePublicationCollection","summary":"Create a new Publication Collection.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{}},"required":["name"]}}}},"responses":{"201":{"description":"The Publiction Collection was created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{},"publicationCount":{"type":"number","default":0}},"required":["id","name"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/collections/{id}":{"get":{"tags":["publicationCollections"],"operationId":"GetPublicationCollection","summary":"Retrieve a single Publication Collection by ID.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The Publication Collection was returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{},"publicationCount":{"type":"number","default":0}},"required":["id","name"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["publicationCollections"],"operationId":"UpdatePublicationCollection","summary":"Update the name, or description of an Publication Collection.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{}},"required":["name"]}}}},"responses":{"200":{"description":"The Publication Collection was updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{},"publicationCount":{"type":"number","default":0}},"required":["id","name"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["publicationCollections"],"operationId":"DeletePublicationCollection","summary":"Delete a Publication Collection by ID.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ThePublication Collection was deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{},"publicationCount":{"type":"number","default":0}},"required":["id","name"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/collections/bulk":{"post":{"tags":["publicationCollections"],"operationId":"BatchActionPublicationCollection","summary":"Perform a batch operation for Publication Collections.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"operation":{"enum":["setPublicationCollections"]},"params":{"type":"object","properties":{"publicationIds":{"type":"array","items":{"type":"string"}},"collectionIds":{"type":"array","items":{"type":"string"}}},"required":["publicationIds","collectionIds"]}},"required":["operation","params"]}]}}}},"responses":{"201":{"description":"The batch operation completed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","fail"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["status","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/reader-instances":{"get":{"tags":["readerInstances"],"operationId":"ListReaderInstances","summary":"List reader instances.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10}},{"name":"nextToken","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The reader instances were returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"screenshot":{"type":"string"},"isSampleOnly":{"type":"boolean","default":false},"isDefault":{"type":"boolean","default":false},"securityLevel":{"type":"array","items":{"type":"string"},"default":["authenticatedAccess"]},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"screenshotUpdatedAtIso":{"type":"string","format":"date-time"}},"required":["id","name","createdAtIso"]}},"nextToken":{},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/reader-instances/{id}":{"get":{"tags":["readerInstances"],"operationId":"GetReaderInstanceById","summary":"Get reader instance by Id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The reader instance was returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"permittedDomains":{"type":"array","items":{"type":"string"},"default":[]},"securityLevel":{"type":"array","items":{"type":"string"},"default":["authenticatedAccess"]},"screenshot":{"type":"string"},"isSampleOnly":{"type":"boolean","default":false},"isDefault":{"type":"boolean","default":false},"createdBySub":{"type":"string","minLength":1},"scopeId":{"type":"string","minLength":1},"organisationId":{"type":"string"},"configuration":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"designerState":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"screenshotUpdatedAtIso":{"type":"string","format":"date-time"}},"required":["id","name","createdBySub","scopeId","configuration","createdAtIso"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["readerInstances"],"operationId":"DeleteReaderInstance","summary":"Delete reader instance by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Reader instance deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"permittedDomains":{"type":"array","items":{"type":"string"},"default":[]},"securityLevel":{"type":"array","items":{"type":"string"},"default":["authenticatedAccess"]},"screenshot":{"type":"string"},"isSampleOnly":{"type":"boolean","default":false},"isDefault":{"type":"boolean","default":false},"createdBySub":{"type":"string","minLength":1},"scopeId":{"type":"string","minLength":1},"organisationId":{"type":"string"},"configuration":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"designerState":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"screenshotUpdatedAtIso":{"type":"string","format":"date-time"}},"required":["id","name","createdBySub","scopeId","configuration","createdAtIso"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/reader-instances/{id}/copy":{"post":{"tags":["readerInstances"],"operationId":"DuplicateReaderInstance","summary":"Duplicate a reader instance by id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"201":{"description":"The reader instance was copied successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"permittedDomains":{"type":"array","items":{"type":"string"},"default":[]},"securityLevel":{"type":"array","items":{"type":"string"},"default":["authenticatedAccess"]},"screenshot":{"type":"string"},"isSampleOnly":{"type":"boolean","default":false},"isDefault":{"type":"boolean","default":false},"createdBySub":{"type":"string","minLength":1},"scopeId":{"type":"string","minLength":1},"organisationId":{"type":"string"},"configuration":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"designerState":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"nullable":true},{"type":"array","items":{}},{"type":"object","additionalProperties":{}}]}},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"screenshotUpdatedAtIso":{"type":"string","format":"date-time"}},"required":["id","name","createdBySub","scopeId","configuration","createdAtIso"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/reader-users":{"get":{"tags":["readerUsers"],"operationId":"ListReaderUsers","summary":"List reader users","parameters":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"deviceId":{"type":"string"},"userId":{"type":"string"},"lastOrigin":{"type":"string"},"lastSessionStartedAt":{"type":"string","format":"date-time"},"numberOfBooksRead":{"type":"number","default":0},"currentPublicationId":{"type":"string"}},"required":["id","deviceId","userId","lastSessionStartedAt"]}},"nextToken":{},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/reader-users/{id}":{"get":{"tags":["readerUsers"],"operationId":"GetReaderUser","summary":"Get reader user by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"deviceId":{"type":"string"},"userId":{"type":"string"},"lastOrigin":{"type":"string"},"lastSessionStartedAt":{"type":"string","format":"date-time"},"numberOfBooksRead":{"type":"number","default":0},"currentPublicationId":{"type":"string"},"origins":{"type":"array","items":{"type":"string"}},"currentPublication":{"type":"object","properties":{"title":{"type":"string","minLength":1},"author":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"currentEditionId":{"type":"string"},"publicationId":{"type":"string"},"cover":{"type":"string"}},"required":["title","author","currentEditionId","publicationId"]},"readingHistory":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"author":{"type":"array","items":{"type":"string"}},"type":{"type":"string","enum":["EPUB","PDF","Audio"],"default":"EPUB"},"isReflowable":{"type":"boolean"},"status":{"type":"string","enum":["draft","live"],"default":"draft"},"uploadStatus":{"type":"string","enum":["upload_pending","uploaded","upload_failed","upload_quarantine","available"],"default":"upload_pending"},"currentEditionId":{"type":"string"},"publicationId":{"type":"string"},"cover":{"type":"string"},"firstReadAtIso":{"type":"string","format":"date-time"},"lastReadAtIso":{"type":"string","format":"date-time"},"sessionCount":{"type":"integer","minimum":0},"bookmarkCount":{"type":"integer","minimum":0},"highlightCount":{"type":"integer","minimum":0},"progression":{"type":"number","minimum":0,"maximum":1},"chapterTitle":{"type":"string"},"pageLabel":{"type":"string"},"pageIndex":{"type":"integer","minimum":0},"progressUpdatedAtIso":{"type":"string","format":"date-time"}},"required":["title","author","currentEditionId","publicationId","firstReadAtIso","lastReadAtIso","sessionCount","bookmarkCount","highlightCount"]},"default":[]},"currentReadingState":{"type":"object","properties":{"sessionId":{"type":"string"},"bookmarkCount":{"type":"number","minimum":0},"highlightCount":{"type":"number","minimum":0},"progression":{"type":"number","minimum":0,"maximum":1},"chapterTitle":{"type":"string"},"pageLabel":{"type":"string"},"pageIndex":{"type":"integer","minimum":0},"updatedAtIso":{"type":"string","format":"date-time"}},"required":["sessionId","updatedAtIso"]}},"required":["id","deviceId","userId","lastSessionStartedAt","origins"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/users":{"get":{"tags":["users"],"operationId":"ListUsers","summary":"List all users","parameters":[{"name":"searchTerm","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["users"],"operationId":"DeleteCurrentUser","summary":"Delete current user","parameters":[],"responses":{"200":{"description":"Successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}},"required":["success"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["result","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/domains":{"get":{"tags":["domains"],"operationId":"ListDomains","summary":"List permitted domains for the current scope.","parameters":[],"responses":{"200":{"description":"Permitted domains were fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"description":{"type":"string"},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"isInUse":{"type":"boolean","default":false},"readerInstanceIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["id","domain","createdAtIso"]}},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["items","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["domains"],"operationId":"CreateDomain","summary":"Create a permitted domain.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(?=.{4,253}$)(?!.*\\.\\.)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,}$"},"description":{"type":"string","maxLength":500}},"required":["domain"]}}}},"responses":{"201":{"description":"The permitted domain was created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"description":{"type":"string"},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"isInUse":{"type":"boolean","default":false},"readerInstanceIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["id","domain","createdAtIso"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/domains/{id}":{"get":{"tags":["domains"],"operationId":"GetDomain","summary":"Get a permitted domain by id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"The permitted domain was fetched successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"description":{"type":"string"},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"isInUse":{"type":"boolean","default":false},"readerInstanceIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["id","domain","createdAtIso"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"patch":{"tags":["domains"],"operationId":"UpdateDomain","summary":"Update a permitted domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{}}}}}},"responses":{"200":{"description":"The permitted domain was updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"description":{"type":"string"},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"isInUse":{"type":"boolean","default":false},"readerInstanceIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["id","domain","createdAtIso"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["domains"],"operationId":"DeleteDomain","summary":"Delete an unused permitted domain.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"The permitted domain was deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"description":{"type":"string"},"createdAtIso":{"type":"string","format":"date-time"},"updatedAtIso":{"type":"string","format":"date-time"},"isInUse":{"type":"boolean","default":false},"readerInstanceIds":{"type":"array","items":{"type":"string"},"default":[]}},"required":["id","domain","createdAtIso"]},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}},"required":["item","context"]}}}},"400":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["QL_ERROR","ZOD_ERROR","DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","UNSUPPORTED_METHOD","INVALID_REQUEST","EMPTY_RESPONSE","AUTHENTICATION_ERROR","ACCOUNT_RESTRICTED","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]},"details":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"code":{"type":"string"}},"required":["message"]}}},"required":["error","message","context","details"]}}}},"401":{"description":"The request is missing valid authentication credentials.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"403":{"description":"The authenticated user is not allowed to access this resource.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","enum":["AUTHENTICATION_ERROR"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]},{"type":"object","properties":{"error":{"enum":["ACCOUNT_RESTRICTED"]},"message":{"type":"string"},"context":{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]}},"required":["error","message","context"]}]}}}},"404":{"description":"The requested API key could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["EMPTY_RESPONSE"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"405":{"description":"The request method is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["UNSUPPORTED_METHOD"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}},"500":{"description":"The request body or parameters failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["DB_ERROR","UNKNOWN_ERROR","INTERNAL_ERROR","INVALID_REQUEST","PROVIDER_ERROR"]},"message":{"type":"string"},"context":{"oneOf":[{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"}},"required":["path","method","requestId"]},{"type":"object","properties":{"path":{"type":"string"},"method":{"type":"string"},"requestId":{"type":"string"},"authentication":{"type":"object","properties":{"requestId":{"type":"string"},"authType":{"type":"string","enum":["apiKey","idToken"]},"sub":{"type":"string"},"email":{"type":"string"},"groups":{"type":"string"},"keyId":{"type":"string"},"organisationId":{"type":"string"},"errorCode":{"type":"string"},"error":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"sub":{"type":"string"},"firstName":{},"lastName":{},"email":{"type":"string"},"role":{"type":"string","enum":["Admin","Editor","Viewer"]},"status":{"type":"string","enum":["Active","Pending","Inactive"]},"onboarded":{"type":"boolean","default":false},"userImage":{},"billing":{"nullable":true}},"required":["id","sub","email","role","status","billing"]},"scopeId":{"type":"string"}},"required":["sub","scopeId"]}},"required":["path","method","requestId","authentication"]}]}},"required":["error","message","context"]}}}}},"security":[{"bearerAuth":[]}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}}},"externalDocs":{"description":"Cirrus API documentation","url":"https://docs.cirrusreader.com"}}