{"openapi":"3.1.0","info":{"title":"Inth API","version":"1.0.0","description":"Machine-facing control-plane API for Inth projects and API keys. Consent is one of the products available inside an Inth project.\n\nResource IDs are prefixed strings (`prj_` projects, `org_` organizations, `ins_` consent instances, `key_` API keys). Treat them as opaque; the prefix only tells you what kind of resource an ID refers to.\n\nAuthenticated responses include `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (Unix seconds) so clients can pace themselves before hitting 429s. Every response carries an `X-Request-Id` header; include it when reporting issues.\n\nWithin v1 changes are additive: new fields, new endpoints, and new enum values may appear at any time, and clients should ignore fields they do not recognize. Breaking changes ship under a new version prefix."},"servers":[{"url":"https://api.inth.com","description":"Configured API base URL"}],"tags":[{"name":"System","description":"Health and service metadata."},{"name":"Organizations","description":"Organizations available to the authenticated principal."},{"name":"Projects","description":"Inth project provisioning and lookup. A project is the top-level container for Inth products such as Consent."},{"name":"Auth","description":"API key management."}],"paths":{"/health":{"get":{"tags":["System"],"summary":"Health check","operationId":"getHealth","responses":{"200":{"description":"API service is healthy.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Health"}}},"examples":{"default":{"value":{"success":true,"data":{"ok":true,"database":{"ok":true}}}}}}}},"503":{"description":"Dashboard database health check failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"default":{"value":{"success":false,"error":{"code":"SERVICE_UNAVAILABLE","message":"Dashboard database health check failed"}}}}}}}}}},"/v1/me":{"get":{"tags":["Auth"],"summary":"Get authenticated principal","operationId":"getMe","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Authenticated principal and accessible organizations.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Me"}}},"examples":{"default":{"value":{"success":true,"data":{"principal":{"type":"api_key","keyId":"key_123","organizationId":"org_123","createdBy":"usr_123"},"activeOrganizationId":"org_123","organizations":[{"organizationId":"org_123","organizationSlug":"acme","organizationName":"Acme","role":"owner"}]}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/organizations":{"get":{"tags":["Organizations"],"summary":"List organizations","operationId":"listOrganizations","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organizations available to the authenticated principal.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}},"examples":{"default":{"value":{"success":true,"data":[{"organizationId":"org_123","organizationSlug":"acme","organizationName":"Acme","role":"owner"}]}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/regions":{"get":{"tags":["Projects"],"summary":"List provisioning regions","operationId":"listRegions","responses":{"200":{"description":"Regions available for Inth project provisioning.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Region"}}}},"examples":{"default":{"value":{"success":true,"data":[{"id":"us-east-1","label":"US East (N. Virginia)"}]}}}}}}}}},"/v1/auth/device/code":{"post":{"tags":["Auth"],"summary":"Start CLI device authorization","description":"Creates a short-lived PKCE-bound device authorization request for the Inth CLI. This endpoint is only available when CLI device authorization is enabled.","operationId":"createDeviceAuthorizationRequest","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorizationCodeRequest"}}}},"responses":{"201":{"description":"Device authorization request created.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/DeviceAuthorizationRequest"}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/auth/device/token":{"post":{"tags":["Auth"],"summary":"Poll for a CLI device token","description":"Redeems an approved device code once. A 409 authorization_pending response is expected until a person approves the code.","operationId":"pollDeviceAuthorizationToken","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthorizationTokenRequest"}}}},"responses":{"200":{"description":"One-time CLI access token.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/DeviceAuthorizationToken"}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List projects","operationId":"listProjects","security":[{"bearerAuth":[]}],"parameters":[{"name":"organizationId","in":"query","required":false,"description":"Restrict results to one organization the authenticated principal can access.","schema":{"type":"string","minLength":1},"example":"org_123"},{"name":"limit","in":"query","required":true,"description":"Page size, between 1 and 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page’s pagination.nextCursor.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Inth projects for the authenticated principal.","content":{"application/json":{"schema":{"type":"object","required":["success","data","pagination"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"post":{"tags":["Projects"],"summary":"Create project","description":"Creates a project and provisions its initial consent instance.","operationId":"createProject","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"},"examples":{"default":{"value":{"organizationId":"org_123","name":"Website","region":"us-east-1","trustedOrigins":["example.com","*.example.com"],"consent":{"branding":"inth"}}}}}}},"responses":{"201":{"description":"Created project.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Project"}}},"examples":{"default":{"summary":"Created project","value":{"success":true,"data":{"projectId":"prj_123","projectSlug":"website","projectName":"Website","description":null,"organizationId":"org_123","organizationSlug":"acme","dashboardURL":"https://inth.com/dashboard/acme/website","products":{"consent":{"instanceId":"ins_123","instanceSlug":"website","instanceName":"Website","trustedOrigins":["example.com","*.example.com"],"branding":"inth","backendURL":"https://website-acme.inth.app/","dashboardURL":"https://inth.com/dashboard/acme/website/consent/overview","backendVersion":"v2"}}}}}}}}},"400":{"description":"Invalid payload, region, or trusted origin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalidPayload":{"summary":"Validation failed","value":{"success":false,"error":{"code":"INVALID_PAYLOAD","message":"Invalid request payload","details":[{"code":"too_small","message":"Too small: expected string to have >=1 characters","path":["name"]}]}}},"invalidRegion":{"summary":"Unsupported region","value":{"success":false,"error":{"code":"INVALID_REGION","message":"Unsupported region"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/projects/{projectId}":{"get":{"tags":["Projects"],"summary":"Get project","operationId":"getProject","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"Project identifier.","schema":{"type":"string","minLength":1},"example":"prj_123"}],"responses":{"200":{"description":"Requested project.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Project"}}},"examples":{"default":{"value":{"success":true,"data":{"projectId":"prj_123","projectSlug":"website","projectName":"Website","description":null,"organizationId":"org_123","organizationSlug":"acme","dashboardURL":"https://inth.com/dashboard/acme/website","products":{"consent":{"instanceId":"ins_123","instanceSlug":"website","instanceName":"Website","trustedOrigins":["example.com","*.example.com"],"branding":"inth","backendURL":"https://website-acme.inth.app/","dashboardURL":"https://inth.com/dashboard/acme/website/consent/overview","backendVersion":"v2"}}}}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"tags":["Projects"],"summary":"Update project","description":"Updates project metadata. Changing projectName also updates the project slug.","operationId":"updateProject","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"Project identifier.","schema":{"type":"string","minLength":1},"example":"prj_123"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"},"examples":{"default":{"value":{"projectName":"Marketing Website","description":"Primary marketing website."}}}}}},"responses":{"200":{"description":"Updated project.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/Project"}}},"examples":{"default":{"value":{"success":true,"data":{"projectId":"prj_123","projectSlug":"marketing-website","projectName":"Marketing Website","description":"Primary marketing website.","organizationId":"org_123","organizationSlug":"acme","dashboardURL":"https://inth.com/dashboard/acme/website","products":{"consent":{"instanceId":"ins_123","instanceSlug":"website","instanceName":"Website","trustedOrigins":["example.com","*.example.com"],"branding":"inth","backendURL":"https://website-acme.inth.app/","dashboardURL":"https://inth.com/dashboard/acme/website/consent/overview","backendVersion":"v2"}}}}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"delete":{"tags":["Projects"],"summary":"Delete project","description":"Archives the project and linked active consent instances for the authenticated organization.","operationId":"deleteProject","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"Project identifier.","schema":{"type":"string","minLength":1},"example":"prj_123"}],"responses":{"200":{"description":"Project was deleted.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/DeleteResult"}}},"examples":{"default":{"value":{"success":true,"data":{"deleted":true}}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/projects/{projectId}/consent":{"get":{"tags":["Projects"],"summary":"Get project consent settings","operationId":"getProjectConsent","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"Project identifier.","schema":{"type":"string","minLength":1},"example":"prj_123"}],"responses":{"200":{"description":"Linked consent instance settings for the project.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/ConsentInstance"}}},"examples":{"default":{"value":{"success":true,"data":{"instanceId":"ins_123","instanceSlug":"website","instanceName":"Website","trustedOrigins":["example.com","*.example.com"],"branding":"inth","backendURL":"https://website-acme.inth.app/","dashboardURL":"https://inth.com/dashboard/acme/website/consent/overview","backendVersion":"v2"}}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}},"patch":{"tags":["Projects"],"summary":"Update project consent settings","description":"Partially updates consent settings on the instance linked to this project.","operationId":"updateProjectConsent","security":[{"bearerAuth":[]}],"parameters":[{"name":"projectId","in":"path","required":true,"description":"Project identifier.","schema":{"type":"string","minLength":1},"example":"prj_123"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectConsentRequest"},"examples":{"default":{"value":{"trustedOrigins":["example.com","*.example.com"],"branding":"none"}}}}}},"responses":{"200":{"description":"Updated linked consent instance settings.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/ConsentInstance"}}},"examples":{"default":{"value":{"success":true,"data":{"instanceId":"ins_123","instanceSlug":"website","instanceName":"Website","trustedOrigins":["example.com","*.example.com"],"branding":"inth","backendURL":"https://website-acme.inth.app/","dashboardURL":"https://inth.com/dashboard/acme/website/consent/overview","backendVersion":"v2"}}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/auth/keys":{"get":{"tags":["Auth"],"summary":"List API keys","description":"Lists the API keys of an organization. Keys are organization credentials; without organizationId the active organization is used.","operationId":"listApiKeys","security":[{"bearerAuth":[]}],"parameters":[{"name":"organizationId","in":"query","required":false,"description":"Organization whose keys to list. Defaults to the active organization.","schema":{"type":"string","minLength":1},"example":"org_123"},{"name":"limit","in":"query","required":true,"description":"Page size, between 1 and 100.","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from the previous page’s pagination.nextCursor.","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"API keys belonging to the organization.","content":{"application/json":{"schema":{"type":"object","required":["success","data","pagination"],"properties":{"success":{"type":"boolean","const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/auth/keys/{keyId}":{"delete":{"tags":["Auth"],"summary":"Delete API key","description":"Revokes an organization API key. Requires an owner or admin session/OAuth principal; API keys cannot delete keys.","operationId":"deleteApiKey","security":[{"bearerAuth":[]}],"parameters":[{"name":"keyId","in":"path","required":true,"description":"API key identifier.","schema":{"type":"string","minLength":1},"example":"key_123"},{"name":"organizationId","in":"query","required":false,"description":"Organization the key belongs to. Defaults to the active organization.","schema":{"type":"string","minLength":1},"example":"org_123"}],"responses":{"200":{"description":"API key was revoked.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/DeleteResult"}}},"examples":{"default":{"value":{"success":true,"data":{"deleted":true}}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/v1/auth/keys/{keyId}/roll":{"post":{"tags":["Auth"],"summary":"Roll API key","description":"Replaces the key secret while keeping its name and identity in the key list. The previous secret stops working immediately. The new secret is minted with the current plan tier rate limit and is returned only once. Requires an owner or admin session/OAuth principal; API keys cannot roll themselves.","operationId":"rollApiKey","security":[{"bearerAuth":[]}],"parameters":[{"name":"keyId","in":"path","required":true,"description":"API key identifier.","schema":{"type":"string","minLength":1},"example":"key_123"},{"name":"organizationId","in":"query","required":false,"description":"Organization the key belongs to. Defaults to the active organization.","schema":{"type":"string","minLength":1},"example":"org_123"}],"responses":{"200":{"description":"The rolled key. The plaintext secret is returned only once.","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","const":true},"data":{"$ref":"#/components/schemas/CreateApiKeyResult"}}},"examples":{"default":{"value":{"success":true,"data":{"key":"inth_••••••••••••••••","keyId":"key_456"}}}}}}},"400":{"$ref":"#/components/responses/InvalidPayload"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlanRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Use an Inth API key or OAuth access token in the Authorization header."}},"schemas":{"ApiErrorCode":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","INSTANCE_LIMIT_REACHED","PLAN_LIMIT_REACHED","PLAN_REQUIRED","INVALID_ORIGIN","INVALID_REGION","INVALID_PAYLOAD","NOT_FOUND","CONFLICT","KEY_LIMIT_REACHED","PAYLOAD_TOO_LARGE","RATE_LIMITED","SERVICE_UNAVAILABLE","INTERNAL_ERROR"]},"ApiError":{"type":"object","required":["code","message"],"properties":{"code":{"$ref":"#/components/schemas/ApiErrorCode"},"message":{"type":"string"},"details":{"description":"Optional structured error details."}}},"ErrorResponse":{"type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","const":false},"error":{"$ref":"#/components/schemas/ApiError"}}},"Health":{"type":"object","required":["ok","database"],"properties":{"ok":{"type":"boolean"},"database":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}}}},"DashboardOrganizationDirectoryItem":{"type":"object","required":["id","logo","name","role","slug"],"properties":{"id":{"type":"string"},"logo":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"role":{"type":"string","enum":["admin","member","owner"]},"slug":{"type":"string"}}},"DashboardOrganizationDirectory":{"type":"object","required":["collection","items","principalId","projectionVersion"],"properties":{"collection":{"type":"string","const":"organizations"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardOrganizationDirectoryItem"}},"principalId":{"type":"string"},"projectionVersion":{"type":"integer","const":2}}},"DashboardOrganizationCreateInput":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string","minLength":3,"maxLength":255},"slug":{"type":"string","minLength":3,"maxLength":20,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}},"DashboardAuditRunProjection":{"type":"object","required":["branch","completedAt","createdAt","id","organizationId","projectLinkId","pullRequestNumber","repositoryId","repositoryName","scopeKind","startedAt","status","triggerSource"],"properties":{"branch":{"oneOf":[{"type":"string"},{"type":"null"}]},"completedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"organizationId":{"type":"string"},"projectLinkId":{"oneOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"oneOf":[{"type":"integer"},{"type":"null"}]},"repositoryId":{"type":"string"},"repositoryName":{"type":"string"},"scopeKind":{"type":"string"},"startedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string"},"triggerSource":{"type":"string"}}},"DashboardAuditRunsSnapshot":{"type":"object","required":["collection","items","organizationId","projectionVersion"],"properties":{"collection":{"type":"string","const":"audit-runs"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardAuditRunProjection"}},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardSignalsCookieProjection":{"type":"object","required":["attributes","domain","id","lastSeenAt","name","observationCount","party","path","projectId","projectName","projectSlug","vendors","website"],"properties":{"attributes":{"type":"object","required":["expiresAt","httpOnly","lifetime","sameSite","secure","session"],"properties":{"expiresAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"httpOnly":{"oneOf":[{"type":"boolean"},{"type":"string","const":"varies"},{"type":"null"}]},"lifetime":{"oneOf":[{"type":"string"},{"type":"null"}]},"sameSite":{"oneOf":[{"type":"string"},{"type":"null"}]},"secure":{"oneOf":[{"type":"boolean"},{"type":"string","const":"varies"},{"type":"null"}]},"session":{"oneOf":[{"type":"boolean"},{"type":"string","const":"varies"},{"type":"null"}]}}},"domain":{"oneOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"observationCount":{"type":"integer","minimum":0},"party":{"type":"string","enum":["first_party","third_party","unknown"]},"path":{"oneOf":[{"type":"string"},{"type":"null"}]},"projectId":{"type":"string"},"projectName":{"type":"string"},"projectSlug":{"type":"string"},"vendors":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}},"website":{"type":"string"}}},"DashboardSignalsCookiesSnapshot":{"type":"object","required":["collection","items","organizationId","projectSlug","projectionVersion"],"properties":{"collection":{"type":"string","const":"signals-cookies"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSignalsCookieProjection"}},"organizationId":{"type":"string"},"projectSlug":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardSignalsOrganizationCookiesSnapshot":{"type":"object","required":["collection","items","organizationId","projectionVersion"],"properties":{"collection":{"type":"string","const":"signals-organization-cookies"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSignalsCookieProjection"}},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardSignalsVendorProjection":{"type":"object","required":["categorySource","consentCategory","description","domains","firstSeenAt","homepageUrl","id","lastSeenAt","legalName","name","privacyPolicyUrl","projectVendorId","reviewState","slug","sources","state"],"properties":{"categorySource":{"oneOf":[{"type":"string"},{"type":"null"}]},"consentCategory":{"oneOf":[{"type":"string"},{"type":"null"}]},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"string"}},"firstSeenAt":{"type":"string","format":"date-time"},"homepageUrl":{"oneOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"},"legalName":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"privacyPolicyUrl":{"oneOf":[{"type":"string"},{"type":"null"}]},"projectVendorId":{"oneOf":[{"type":"string"},{"type":"null"}]},"reviewState":{"type":"string"},"slug":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}},"state":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"DashboardSignalsVendorsSnapshot":{"type":"object","required":["catalogAvailable","catalogError","collection","inventoryAvailable","inventoryError","items","organizationId","projectSlug","projectionVersion"],"properties":{"catalogAvailable":{"type":"boolean"},"catalogError":{"oneOf":[{"type":"string"},{"type":"null"}]},"collection":{"type":"string","const":"signals-vendors"},"inventoryAvailable":{"type":"boolean"},"inventoryError":{"oneOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSignalsVendorProjection"}},"organizationId":{"type":"string"},"projectSlug":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardSignalsOrganizationVendorProjection":{"type":"object","required":["categorySource","consentCategory","description","domains","firstSeenAt","homepageUrl","id","lastSeenAt","legalName","name","privacyPolicyUrl","projectVendorId","projects","reviewState","slug","sources","state"],"properties":{"categorySource":{"oneOf":[{"type":"string"},{"type":"null"}]},"consentCategory":{"oneOf":[{"type":"string"},{"type":"null"}]},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"domains":{"type":"array","items":{"type":"string"}},"firstSeenAt":{"type":"string","format":"date-time"},"homepageUrl":{"oneOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"},"legalName":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"privacyPolicyUrl":{"oneOf":[{"type":"string"},{"type":"null"}]},"projectVendorId":{"oneOf":[{"type":"string"},{"type":"null"}]},"projects":{"type":"array","items":{"type":"object","required":["id","name","projectVendorId","reviewState","slug","state"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"projectVendorId":{"oneOf":[{"type":"string"},{"type":"null"}]},"reviewState":{"type":"string"},"slug":{"type":"string"},"state":{"oneOf":[{"type":"string"},{"type":"null"}]}}}},"reviewState":{"type":"string"},"slug":{"type":"string"},"sources":{"type":"array","items":{"type":"string"}},"state":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"DashboardSignalsOrganizationVendorsSnapshot":{"type":"object","required":["catalogAvailable","catalogError","collection","inventoryAvailable","inventoryError","items","organizationId","projectionVersion"],"properties":{"catalogAvailable":{"type":"boolean"},"catalogError":{"oneOf":[{"type":"string"},{"type":"null"}]},"collection":{"type":"string","const":"signals-organization-vendors"},"inventoryAvailable":{"type":"boolean"},"inventoryError":{"oneOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSignalsOrganizationVendorProjection"}},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardWebsiteScanDetail":{"type":"object","required":["completedAt","consentScenario","coverage","createdAt","error","id","origin","preview","projectSlug","regionProfile","startedAt","status","summary","trigger"],"properties":{"completedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"consentScenario":{"type":"string"},"coverage":{"type":"object","required":["absenceClaimEligible","attemptedPageCount","completedConditionCount","completedPageCount","failedPageCount","totalConditionCount"],"properties":{"absenceClaimEligible":{"type":"boolean"},"attemptedPageCount":{"type":"integer","minimum":0},"completedConditionCount":{"type":"integer","minimum":0},"completedPageCount":{"type":"integer","minimum":0},"failedPageCount":{"type":"integer","minimum":0},"totalConditionCount":{"type":"integer","minimum":0}}},"createdAt":{"type":"string","format":"date-time"},"error":{"oneOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"origin":{"oneOf":[{"type":"string"},{"type":"null"}]},"preview":{"type":"boolean"},"projectSlug":{"type":"string"},"regionProfile":{"type":"string"},"startedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"status":{"type":"string"},"summary":{"type":"object","required":["evidenceCount","pagesVisited","unknownEvidenceCount","vendorCount","vendorMatchCount"],"properties":{"evidenceCount":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}]},"pagesVisited":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}]},"unknownEvidenceCount":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}]},"vendorCount":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}]},"vendorMatchCount":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}]}}},"trigger":{"type":"string"}}},"DashboardWebsiteScanDetailSnapshot":{"type":"object","required":["collection","item","organizationId","projectionVersion"],"properties":{"collection":{"type":"string","const":"website-scan-detail"},"item":{"$ref":"#/components/schemas/DashboardWebsiteScanDetail"},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardWebsiteScanResultCondition":{"type":"object","required":["consentScenario","key","regionProfile","runId"],"properties":{"consentScenario":{"type":"string","enum":["pre_consent","accept_all"]},"key":{"type":"string"},"regionProfile":{"type":"string","enum":["us_tx_baseline","custom"]},"runId":{"type":"string"}}},"DashboardWebsiteScanResultEvidence":{"type":"object","required":["evidenceId","key","kind","observationId","observedAt","pagePath","runId","url","value"],"properties":{"evidenceId":{"oneOf":[{"type":"string"},{"type":"null"}]},"key":{"type":"string"},"kind":{"type":"string","enum":["script","cookie","storage","network","global_object","package","iframe","header"]},"observationId":{"type":"string"},"observedAt":{"type":"string","format":"date-time"},"pagePath":{"oneOf":[{"type":"string"},{"type":"null"}]},"runId":{"type":"string"},"url":{"oneOf":[{"type":"string"},{"type":"null"}]},"value":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"DashboardWebsiteScanResultChangeVendor":{"type":"object","required":["consentCategory","name","vendorId"],"properties":{"consentCategory":{"oneOf":[{"type":"string","enum":["necessary","measurement","marketing","functionality","experience"]},{"type":"null"}]},"name":{"type":"string"},"vendorId":{"type":"string"}}},"DashboardWebsiteScanResults":{"type":"object","required":["changes","conditions","cookies","coverage","dataQuality","summary","unidentified","vendors"],"properties":{"changes":{"type":"object","required":["availability","newVendors","noLongerDetectedVendors"],"properties":{"availability":{"type":"string","enum":["available","no_comparable_scan"]},"newVendors":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultChangeVendor"}},"noLongerDetectedVendors":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultChangeVendor"}}}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultCondition"}},"cookies":{"type":"array","items":{"type":"object","required":["attributes","conditions","domain","evidence","evidenceIds","id","lastSeenAt","name","observationCount","pagePaths","party","path","vendors"],"properties":{"attributes":{"type":"object","required":["expiresAt","httpOnly","lifetime","sameSite","secure","session"],"properties":{"expiresAt":{"oneOf":[{"type":"string"},{"type":"null"}]},"httpOnly":{"oneOf":[{"oneOf":[{"type":"boolean"},{"type":"string","const":"varies"}]},{"type":"null"}]},"lifetime":{"oneOf":[{"type":"string"},{"type":"null"}]},"sameSite":{"oneOf":[{"type":"string"},{"type":"null"}]},"secure":{"oneOf":[{"oneOf":[{"type":"boolean"},{"type":"string","const":"varies"}]},{"type":"null"}]},"session":{"oneOf":[{"oneOf":[{"type":"boolean"},{"type":"string","const":"varies"}]},{"type":"null"}]}}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultCondition"}},"domain":{"oneOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultEvidence"}},"evidenceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"observationCount":{"type":"integer","minimum":0},"pagePaths":{"type":"array","items":{"type":"string"}},"party":{"type":"string","enum":["first_party","third_party","unknown"]},"path":{"oneOf":[{"type":"string"},{"type":"null"}]},"vendors":{"type":"array","items":{"type":"object","required":["name","projectVendorId","reviewState","vendorId"],"properties":{"name":{"type":"string"},"projectVendorId":{"oneOf":[{"type":"string"},{"type":"null"}]},"reviewState":{"type":"string"},"vendorId":{"type":"string"}}}}}}},"coverage":{"type":"object","required":["absenceClaimEligible","attemptedPageCount","completedConditionCount","completedPageCount","conditions","failedPageCount","totalConditionCount"],"properties":{"absenceClaimEligible":{"type":"boolean"},"attemptedPageCount":{"type":"integer","minimum":0},"completedConditionCount":{"type":"integer","minimum":0},"completedPageCount":{"type":"integer","minimum":0},"conditions":{"type":"array","items":{"type":"object","required":["attemptedPageCount","completedPageCount","failedPageCount","key","status"],"properties":{"attemptedPageCount":{"type":"integer","minimum":0},"completedPageCount":{"type":"integer","minimum":0},"failedPageCount":{"type":"integer","minimum":0},"key":{"type":"string"},"status":{"type":"string","enum":["pending","completed","failed"]}}}},"failedPageCount":{"type":"integer","minimum":0},"totalConditionCount":{"type":"integer","minimum":0}}},"dataQuality":{"type":"object","required":["changes","cookieAttributes"],"properties":{"changes":{"type":"string","enum":["frozen_at_completion","no_comparable_scan"]},"cookieAttributes":{"type":"string","enum":["point_in_time_snapshot","legacy_unavailable"]}}},"summary":{"type":"object","required":["cookieCount","firstPartyCookieCount","observationCount","pageCount","thirdPartyCookieCount","unidentifiedCount","vendorCount"],"properties":{"cookieCount":{"type":"integer","minimum":0},"firstPartyCookieCount":{"type":"integer","minimum":0},"observationCount":{"type":"integer","minimum":0},"pageCount":{"type":"integer","minimum":0},"thirdPartyCookieCount":{"type":"integer","minimum":0},"unidentifiedCount":{"type":"integer","minimum":0},"vendorCount":{"type":"integer","minimum":0}}},"unidentified":{"type":"array","items":{"type":"object","required":["conditions","domain","evidence","evidenceIds","evidenceKinds","id","label","lastSeenAt","observationCount","pagePaths","party"],"properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultCondition"}},"domain":{"oneOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultEvidence"}},"evidenceIds":{"type":"array","items":{"type":"string"}},"evidenceKinds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"label":{"type":"string"},"lastSeenAt":{"type":"string","format":"date-time"},"observationCount":{"type":"integer","minimum":0},"pagePaths":{"type":"array","items":{"type":"string"}},"party":{"type":"string","enum":["first_party","third_party","unknown"]}}}},"vendors":{"type":"array","items":{"type":"object","required":["categorySource","change","conditions","confidence","consentCategory","evidence","evidenceIds","evidenceKinds","homepageUrl","lastSeenAt","matchIds","name","observationCount","pagePaths","privacyPolicyUrl","projectVendorId","reviewState","slug","state","vendorId"],"properties":{"categorySource":{"oneOf":[{"type":"string"},{"type":"null"}]},"change":{"oneOf":[{"type":"string","enum":["new","previously_detected"]},{"type":"null"}]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultCondition"}},"confidence":{"type":"string","enum":["high","medium","low"]},"consentCategory":{"oneOf":[{"type":"string"},{"type":"null"}]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanResultEvidence"}},"evidenceIds":{"type":"array","items":{"type":"string"}},"evidenceKinds":{"type":"array","items":{"type":"string"}},"homepageUrl":{"oneOf":[{"type":"string"},{"type":"null"}]},"lastSeenAt":{"type":"string","format":"date-time"},"matchIds":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"observationCount":{"type":"integer","minimum":0},"pagePaths":{"type":"array","items":{"type":"string"}},"privacyPolicyUrl":{"oneOf":[{"type":"string"},{"type":"null"}]},"projectVendorId":{"oneOf":[{"type":"string"},{"type":"null"}]},"reviewState":{"type":"string"},"slug":{"type":"string"},"state":{"oneOf":[{"type":"string"},{"type":"null"}]},"vendorId":{"type":"string"}}}}}},"DashboardWebsiteScanResultsSnapshot":{"type":"object","required":["collection","organizationId","projectionVersion","results","scanId"],"properties":{"collection":{"type":"string","const":"website-scan-results"},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1},"results":{"oneOf":[{"$ref":"#/components/schemas/DashboardWebsiteScanResults"},{"type":"null"}]},"scanId":{"type":"string"}}},"DashboardWebsiteScansSnapshot":{"type":"object","required":["collection","items","organizationId","projectionVersion"],"properties":{"collection":{"type":"string","const":"website-scans"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardWebsiteScanDetail"}},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardBillingSnapshot":{"type":"object","required":["canManageBilling","collection","item","organizationId","projectionVersion"],"properties":{"canManageBilling":{"type":"boolean"},"collection":{"type":"string","const":"billing"},"item":{"type":"object","required":["canManageBilling","catalogPlans","creditAutoTopUp","creditUsage","creditTopUp","features","hasBillingAccount","id","invoiceHistory","plan","projectCount","tier","usage","usageLimits"],"properties":{"canManageBilling":{"type":"boolean"},"catalogPlans":{"type":"array","items":{"type":"object"}},"creditAutoTopUp":{"oneOf":[{"oneOf":[{"type":"object","required":["billingUnits","enabled","monthlyPurchaseLimit","planVersion","priceCents","quantityCredits","status","thresholdCredits"],"properties":{"billingUnits":{"type":"integer","minimum":1},"enabled":{"type":"boolean"},"monthlyPurchaseLimit":{"type":"integer","minimum":1},"planVersion":{"type":"integer","minimum":1},"priceCents":{"type":"integer","minimum":1},"quantityCredits":{"type":"integer","minimum":1},"status":{"type":"string","const":"configured"},"thresholdCredits":{"type":"integer","minimum":1}}},{"type":"object","required":["enabled","status"],"properties":{"enabled":{"type":"boolean"},"status":{"type":"string","const":"unsupported"}}},{"type":"object","required":["enabled","status"],"properties":{"enabled":{"type":"boolean"},"status":{"type":"string","const":"unreadable"}}}]},{"type":"null"}]},"creditUsage":{"type":"object"},"creditTopUp":{"oneOf":[{"type":"object","required":["billingUnits","currency","minimumCredits","planVersion","priceCents"],"properties":{"billingUnits":{"type":"integer","minimum":1},"currency":{"type":"string","const":"USD"},"minimumCredits":{"type":"integer","minimum":1},"planVersion":{"type":"integer","minimum":1},"priceCents":{"type":"integer","minimum":1}}},{"type":"null"}]},"features":{"type":"array","items":{"type":"string"}},"hasBillingAccount":{"type":"boolean"},"id":{"type":"string"},"invoiceHistory":{"type":"object"},"plan":{"oneOf":[{"type":"object"},{"type":"null"}]},"projectCount":{"type":"integer","minimum":0},"tier":{"type":"string","enum":["trial","hobby","starter","pro","enterprise"]},"usage":{"type":"object","required":["consents","consentSessions","periodEnd","periodStart","projects"],"properties":{"consents":{"type":"object"},"consentSessions":{"type":"object"},"periodEnd":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"periodStart":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"projects":{"type":"object"}}},"usageLimits":{"type":"object","required":["consents","geoLocation"],"properties":{"consents":{"type":"integer","minimum":0},"geoLocation":{"type":"integer","minimum":0}}}}},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":4}}},"DashboardAgentProjection":{"type":"object","required":["id","lastMessageAt","title","updatedAt"],"properties":{"id":{"type":"string"},"lastMessageAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"DashboardAgentsSnapshot":{"type":"object","required":["collection","items","organizationId","projectionVersion"],"properties":{"collection":{"type":"string","const":"agents"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardAgentProjection"}},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardAgentTranscriptMessage":{"type":"object","required":["id","role","text"],"properties":{"activities":{"type":"array","items":{"type":"object","required":["id","kind","status","title"],"properties":{"detail":{"type":"string"},"href":{"type":"string","format":"uri"},"id":{"type":"string"},"kind":{"type":"string","enum":["research","search","source","other"]},"status":{"type":"string","enum":["running","completed","failed"]},"title":{"type":"string"}}}},"id":{"type":"string"},"role":{"type":"string","enum":["assistant","user"]},"text":{"type":"string"}}},"DashboardAgentThread":{"type":"object","required":["id","messages","organizationId","title","updatedAt"],"properties":{"id":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/DashboardAgentTranscriptMessage"}},"organizationId":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"}}},"DashboardAccountProjection":{"type":"object","required":["email","hidePII","id","image","name"],"properties":{"email":{"type":"string","format":"email"},"hidePII":{"type":"boolean"},"id":{"type":"string"},"image":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}}},"DashboardAccountSnapshot":{"type":"object","required":["collection","item","projectionVersion"],"properties":{"collection":{"type":"string","const":"account"},"item":{"$ref":"#/components/schemas/DashboardAccountProjection"},"projectionVersion":{"type":"integer","const":1}}},"DashboardLegalAcceptanceInput":{"type":"object","required":["acceptedVia"],"properties":{"acceptedDocuments":{"type":"array","items":{"type":"object","required":["documentType","documentVersion"],"properties":{"accepted":{"type":"boolean"},"consentGiven":{"type":"boolean"},"documentType":{"type":"string","enum":["terms_and_conditions","privacy_policy"]},"documentVersion":{"type":"string","minLength":1}}}},"acceptedVia":{"type":"string","enum":["email-otp","oauth","manual"]}}},"DashboardLegalAcceptanceResult":{"type":"object","required":["accepted"],"properties":{"accepted":{"type":"boolean","const":true}}},"DashboardLegalAcceptanceStatus":{"type":"object","required":["accepted","enforced","missingDocumentTypes"],"properties":{"accepted":{"type":"boolean"},"enforced":{"type":"boolean"},"missingDocumentTypes":{"type":"array","items":{"type":"string","enum":["terms_and_conditions","privacy_policy"]}}}},"DashboardPublicInvitation":{"type":"object","required":["id","invitedBy","organization"],"properties":{"id":{"type":"string"},"invitedBy":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"organization":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}},"DashboardPendingInvitation":{"type":"object","required":["email","id","invitedBy","organization"],"properties":{"email":{"type":"string","format":"email"},"id":{"type":"string"},"invitedBy":{"type":"object","required":["email","name"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}}},"organization":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string"},"slug":{"type":"string"}}}}},"DashboardAccountSession":{"type":"object","required":["activeOrganizationId","createdAt","expiresAt","id","ipAddress","isCurrent","updatedAt","userAgent"],"properties":{"activeOrganizationId":{"oneOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"ipAddress":{"oneOf":[{"type":"string"},{"type":"null"}]},"isCurrent":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"},"userAgent":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"DashboardAccountSessionsSnapshot":{"type":"object","required":["collection","projectionVersion","sessions"],"properties":{"collection":{"type":"string","const":"account-sessions"},"projectionVersion":{"type":"integer","const":1},"sessions":{"type":"array","items":{"$ref":"#/components/schemas/DashboardAccountSession"}}}},"DashboardDsarInterestResult":{"type":"object","required":["email"],"properties":{"alreadyRegistered":{"type":"boolean"},"email":{"type":"string","format":"email"}}},"DashboardApiKeyProjection":{"type":"object","required":["createdAt","keyId","name"],"properties":{"createdAt":{"type":"string","format":"date-time"},"keyId":{"type":"string"},"name":{"type":"string"},"start":{"type":"string"}}},"DashboardApiKeySecret":{"type":"object","required":["key","keyId"],"properties":{"key":{"type":"string","writeOnly":true},"keyId":{"type":"string"}}},"DashboardApiKeysSnapshot":{"type":"object","required":["apiAccessAllowed","canManageApiKeys","collection","items","organizationId","projectionVersion"],"properties":{"apiAccessAllowed":{"type":"boolean"},"canManageApiKeys":{"type":"boolean"},"collection":{"type":"string","const":"api-keys"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardApiKeyProjection"}},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardGithubAccountProjection":{"type":"object","required":["accountLogin","accountType","id"],"properties":{"accountLogin":{"type":"string"},"accountType":{"type":"string"},"id":{"type":"string"}}},"DashboardGithubRepositoryProjection":{"type":"object","required":["branchFilters","connectedAt","defaultBranch","htmlUrl","id","ignoredPaths","isScanning","name","owner","projectLinks","pullRequestAutomationManagedHere","visibility"],"properties":{"branchFilters":{"type":"array","items":{"type":"string"}},"connectedAt":{"oneOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"defaultBranch":{"oneOf":[{"type":"string"},{"type":"null"}]},"htmlUrl":{"type":"string","format":"uri"},"id":{"type":"string"},"ignoredPaths":{"type":"array","items":{"type":"string"}},"isScanning":{"type":"boolean"},"name":{"type":"string"},"owner":{"type":"string"},"projectLinks":{"type":"array","items":{"type":"object"}},"pullRequestAutomationManagedHere":{"type":"boolean"},"visibility":{"type":"string"}}},"DashboardIntegrationsSnapshot":{"type":"object","required":["accounts","canManageRepositories","collection","organizationId","projectionVersion","projects","repositories"],"properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/DashboardGithubAccountProjection"}},"canManageRepositories":{"type":"boolean"},"collection":{"type":"string","const":"integrations"},"organizationId":{"type":"string"},"projectionVersion":{"type":"integer","const":2},"projects":{"type":"array","items":{"type":"object"}},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/DashboardGithubRepositoryProjection"}}}},"DashboardMemberProjection":{"type":"object","required":["id","joinedAt","role","user"],"properties":{"id":{"type":"string"},"joinedAt":{"type":"string","format":"date-time"},"role":{"type":"string","enum":["admin","member","owner"]},"user":{"type":"object","required":["email","id","image","name"],"properties":{"email":{"type":"string","format":"email"},"id":{"type":"string"},"image":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"}}}}},"DashboardInvitationProjection":{"type":"object","required":["email","expiresAt","id","invitedBy","role"],"properties":{"email":{"type":"string","format":"email"},"expiresAt":{"type":"string","format":"date-time"},"id":{"type":"string"},"invitedBy":{"type":"object","required":["email","name"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}}},"role":{"type":"string","enum":["admin","member","owner"]}}},"DashboardMembersSnapshot":{"type":"object","required":["canManageMembers","canReadInvitations","collection","items","organizationId","pendingInvitations","projectionVersion"],"properties":{"canManageMembers":{"type":"boolean"},"canReadInvitations":{"type":"boolean"},"collection":{"type":"string","const":"members"},"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardMemberProjection"}},"organizationId":{"type":"string"},"pendingInvitations":{"type":"array","items":{"$ref":"#/components/schemas/DashboardInvitationProjection"}},"projectionVersion":{"type":"integer","const":1}}},"DashboardConsentLifecycleProjection":{"type":"object","required":["backendVersion","canDelete","canUpdate","canUpgrade","id","instanceName","instanceSlug","isV2","latestVersion","needsUpdate","organizationId","organizationSlug","projectId","projectSlug","updateBlocked"],"properties":{"backendVersion":{"type":"string"},"canDelete":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canUpgrade":{"type":"boolean"},"id":{"type":"string"},"instanceName":{"type":"string"},"instanceSlug":{"type":"string"},"isV2":{"type":"boolean"},"latestVersion":{"type":"string"},"needsUpdate":{"type":"boolean"},"organizationId":{"type":"string"},"organizationSlug":{"type":"string"},"projectId":{"type":"string"},"projectSlug":{"type":"string"},"updateBlocked":{"oneOf":[{"type":"string","enum":["enable-billing"]},{"type":"null"}]}}},"DashboardConsentLifecycleSnapshot":{"type":"object","required":["collection","item","organizationId","projectSlug","projectionVersion"],"properties":{"collection":{"type":"string","const":"consent-lifecycle"},"item":{"oneOf":[{"$ref":"#/components/schemas/DashboardConsentLifecycleProjection"},{"type":"null"}]},"organizationId":{"type":"string"},"projectSlug":{"type":"string"},"projectionVersion":{"type":"integer","const":1}}},"DashboardConsentLifecycleCommandResult":{"type":"object","required":["action","completed","organizationId","projectSlug"],"properties":{"action":{"type":"string","enum":["update","upgrade","delete"]},"completed":{"type":"boolean","const":true},"organizationId":{"type":"string"},"projectSlug":{"type":"string"}}},"Organization":{"type":"object","required":["organizationId","organizationSlug","organizationName","role"],"properties":{"organizationId":{"type":"string"},"organizationSlug":{"type":"string"},"organizationName":{"type":"string"},"role":{"type":"string"}}},"Me":{"type":"object","required":["principal","activeOrganizationId","organizations"],"properties":{"principal":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["session","api_key","oauth"]},"userId":{"type":"string","description":"Present for session and oauth principals. API keys are organization credentials and carry no acting user."},"keyId":{"type":"string"},"organizationId":{"type":"string","description":"The organization the API key belongs to (api_key principals only)."},"createdBy":{"type":"string","description":"User who minted the API key. Attribution only, never authorization."},"activeOrganizationId":{"oneOf":[{"type":"string"},{"type":"null"}]}}},"activeOrganizationId":{"oneOf":[{"type":"string"},{"type":"null"}]},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}},"Pagination":{"type":"object","required":["nextCursor","hasMore"],"properties":{"nextCursor":{"oneOf":[{"type":"string","description":"Cursor for the next page; null on the last page."},{"type":"null"}]},"hasMore":{"type":"boolean"}}},"Region":{"type":"object","required":["id","label"],"properties":{"id":{"type":"string"},"label":{"type":"string"}}},"ConsentInstance":{"type":"object","required":["instanceId","instanceSlug","instanceName","trustedOrigins","branding","backendURL","dashboardURL","backendVersion"],"properties":{"instanceId":{"type":"string"},"instanceSlug":{"type":"string"},"instanceName":{"type":"string"},"trustedOrigins":{"type":"array","items":{"type":"string"}},"branding":{"type":"string","enum":["inth","c15t","none"],"description":"Branding shown in the consent banner. Removing branding with 'none' requires an eligible paid plan."},"backendURL":{"oneOf":[{"type":"string","format":"uri"},{"type":"null"}]},"dashboardURL":{"type":"string","format":"uri"},"backendVersion":{"type":"string"}}},"Project":{"type":"object","required":["projectId","projectSlug","projectName","description","organizationId","organizationSlug","dashboardURL","products"],"properties":{"projectId":{"type":"string"},"projectSlug":{"type":"string"},"projectName":{"type":"string"},"description":{"oneOf":[{"type":"string"},{"type":"null"}]},"organizationId":{"type":"string"},"organizationSlug":{"type":"string"},"dashboardURL":{"type":"string","format":"uri"},"products":{"type":"object","required":["consent"],"properties":{"consent":{"oneOf":[{"$ref":"#/components/schemas/ConsentInstance"},{"type":"null"}]}}}}},"CreateProjectRequest":{"type":"object","required":["organizationId","name","region"],"properties":{"organizationId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"description":"Project display name. The initial consent instance inherits it."},"region":{"type":"string","minLength":1},"trustedOrigins":{"type":"array","items":{"type":"string"},"default":[]},"consent":{"type":"object","description":"Optional consent instance configuration applied at creation, so no follow-up request is needed.","properties":{"branding":{"type":"string","enum":["inth","c15t","none"],"description":"Consent banner branding. `none` requires a plan that includes remove-branding and otherwise fails with 402 before the project is created."}}}}},"UpdateProjectRequest":{"type":"object","minProperties":1,"properties":{"projectName":{"type":"string","minLength":1,"description":"Project display name. Updating it also regenerates the project slug."},"description":{"oneOf":[{"type":"string","maxLength":512},{"type":"null"}]}}},"UpdateProjectConsentRequest":{"type":"object","minProperties":1,"properties":{"trustedOrigins":{"type":"array","items":{"type":"string"},"description":"Origins allowed to call the linked consent instance. Supports * and wildcard subdomains like *.example.com."},"branding":{"type":"string","enum":["inth","c15t","none"],"description":"Branding shown in the consent banner. Removing branding with 'none' requires an eligible paid plan."}}},"ApiKey":{"type":"object","required":["keyId","name","createdAt"],"properties":{"keyId":{"type":"string"},"name":{"type":"string"},"start":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"meta":{"type":"object","properties":{"createdBy":{"type":"string","description":"User who minted the key (attribution only)."},"createdFrom":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"additionalProperties":true}}},"CreateApiKeyResult":{"type":"object","required":["key","keyId"],"properties":{"key":{"type":"string"},"keyId":{"type":"string"}}},"DeviceAuthorizationCodeRequest":{"type":"object","required":["clientId","codeChallenge","codeChallengeMethod"],"properties":{"clientId":{"type":"string","minLength":1},"codeChallenge":{"type":"string","minLength":1},"codeChallengeMethod":{"type":"string","const":"S256"}}},"DeviceAuthorizationTokenRequest":{"type":"object","required":["deviceCode","clientId","codeVerifier"],"properties":{"deviceCode":{"type":"string","minLength":1},"clientId":{"type":"string","minLength":1},"codeVerifier":{"type":"string","minLength":1}}},"DeviceAuthorizationApproveRequest":{"type":"object","required":["userCode"],"properties":{"userCode":{"type":"string","minLength":1},"organizationSlug":{"type":"string","minLength":1},"keyName":{"type":"string","minLength":1}}},"DeviceAuthorizationClient":{"type":"object","required":["id","name","publisher"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"publisher":{"type":"string"}}},"DeviceAuthorizationRequest":{"type":"object","required":["deviceCode","userCode","client","expiresIn","interval","verificationUri","verificationUriComplete"],"properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string"},"client":{"$ref":"#/components/schemas/DeviceAuthorizationClient"},"expiresIn":{"type":"integer"},"interval":{"type":"integer"},"verificationUri":{"type":"string","format":"uri"},"verificationUriComplete":{"type":"string","format":"uri"}}},"DeviceAuthorizationToken":{"type":"object","required":["accessToken","tokenType"],"properties":{"accessToken":{"type":"string"},"tokenType":{"type":"string","const":"Bearer"}}},"DeviceAuthorizationLookup":{"type":"object","required":["userCode","status","expiresAt","createdAt","client"],"properties":{"userCode":{"type":"string"},"status":{"type":"string","enum":["pending","approved","used"]},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"client":{"$ref":"#/components/schemas/DeviceAuthorizationClient"}}},"DeviceAuthorizationApproval":{"type":"object","required":["approved","organizationId","organizationSlug","client"],"properties":{"approved":{"type":"boolean","const":true},"organizationId":{"type":"string"},"organizationSlug":{"type":"string"},"client":{"$ref":"#/components/schemas/DeviceAuthorizationClient"}}},"DeleteResult":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}},"UpdateResult":{"type":"object","required":["updated"],"properties":{"updated":{"type":"boolean"}}}},"responses":{"InvalidPayload":{"description":"The request payload or parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"default":{"value":{"success":false,"error":{"code":"INVALID_PAYLOAD","message":"Invalid request payload","details":[{"code":"too_small","message":"Too small: expected string to have >=1 characters","path":["name"]}]}}}}}}},"Unauthorized":{"description":"Authentication is missing, invalid, or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"default":{"value":{"success":false,"error":{"code":"UNAUTHORIZED","message":"Authentication required"}}}}}}},"Forbidden":{"description":"The authenticated principal cannot access the resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PlanRequired":{"description":"The requested operation requires a paid plan. API access (organization API keys) requires the Starter plan or higher; a downgraded organization receives this error until its plan is restored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"default":{"value":{"success":false,"error":{"code":"PLAN_REQUIRED","message":"API access requires the Starter plan or higher"}}}}}}},"Conflict":{"description":"The request conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PayloadTooLarge":{"description":"The request body exceeds the 1 MB limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"RateLimited":{"description":"The rate limit was exceeded. API key limits are set by plan tier (Starter 600/min, Pro 1500/min, Enterprise 3000/min). Check the Retry-After header before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"default":{"value":{"success":false,"error":{"code":"RATE_LIMITED","message":"API key rate limit exceeded"}}}}}}},"InternalError":{"description":"An unexpected internal error occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"default":{"value":{"success":false,"error":{"code":"INTERNAL_ERROR","message":"Internal server error"}}}}}}}}}}