Skip to content

Product documentation

API reference

Generated reference for the Thoryn Customer-plane Management API (v1).

Thoryn Customer-plane Management API

Version v1. This reference is generated from the committed OpenAPI specification (docs/api/product-api.openapi.yaml) and covers 80 resources across 352 operations. It is the customer-plane surface that tenant developers and the thoryn CLI integrate against, served by product-api behind the public api-gateway ingress.

Base URL: https://api.stg.thoryn.org

Conventions

  • Versioning — every path is under /api/v1; the API evolves additively within a major version.
  • JSON shape — request and response bodies use camelCase field names and RFC 3339 UTC timestamps.
  • Collections & pagination — list endpoints return a { data, pagination: { cursor, hasMore } } envelope; page forward by passing the returned cursor back as the cursor query parameter.
  • Errors — failures use RFC 9457 problem-details (application/problem+json) with a stable errorCode extension member. Branch on errorCode, not on the type URI or the HTTP status alone.
  • Idempotent retries — mutating operations that accept an Idempotency-Key request header deduplicate retried requests.
  • Authentication — OAuth 2.0 bearer tokens minted at the authorization hub (client_credentials for machine-to-machine), gated by the per-operation tenant:* scopes below. Per-request tenant isolation is enforced from the tnt claim in the token, never from a path or query parameter.
  • Observability — authenticated responses carry X-RateLimit-* headers and a correlation request id for support.

Authentication

Every operation requires an OAuth 2.0 bearer token obtained from the authorization hub via the client_credentials grant (token endpoint https://hub.stg.thoryn.org/oauth2/token). The token carries the caller's granted tenant:* scopes and a tnt tenant claim; product-api rejects any scope the token does not hold with 403 Forbidden and scopes the request to the token's tenant.

Scopes

ScopeDescription
tenant:applications.readRead access to applications.
tenant:applications.writeManage applications.
tenant:attribute-schema.readRead access to attribute-schema.
tenant:attribute-schema.writeManage attribute-schema.
tenant:audit.readRead access to audit.
tenant:auth-policy.readRead access to auth-policy.
tenant:auth-policy.writeManage auth-policy.
tenant:bot.readRead access to bot.
tenant:bot.writeManage bot.
tenant:ca_policies.writeManage ca_policies.
tenant:clients.readRead access to clients.
tenant:clients.writeManage clients.
tenant:compliance.export'export' operations on compliance.
tenant:compliance.readRead access to compliance.
tenant:compliance.writeManage compliance.
tenant:dsar.execute'execute' operations on dsar.
tenant:dsar.readRead access to dsar.
tenant:entitlement.admin'admin' operations on entitlement.
tenant:entitlement.approve'approve' operations on entitlement.
tenant:entitlement.readRead access to entitlement.
tenant:environments.readRead access to environments.
tenant:environments.writeManage environments.
tenant:events.readRead access to events.
tenant:federation.readRead access to federation.
tenant:federation.writeManage federation.
tenant:fga.check'check' operations on fga.
tenant:fga.readRead access to fga.
tenant:fga.writeManage fga.
tenant:geo.readRead access to geo.
tenant:geo.writeManage geo.
tenant:guests.invite'invite' operations on guests.
tenant:guests.manage'manage' operations on guests.
tenant:hooks.readRead access to hooks.
tenant:hooks.writeManage hooks.
tenant:idp.readRead access to idp.
tenant:idp.writeManage idp.
tenant:members.readRead access to members.
tenant:members.writeManage members.
tenant:migration.entra'entra' operations on migration.
tenant:migration.readRead access to migration.
tenant:migration.writeManage migration.
tenant:orgs.readRead access to orgs.
tenant:orgs.writeManage orgs.
tenant:pim.admin'admin' operations on pim.
tenant:pim.approve'approve' operations on pim.
tenant:pim.elevate'elevate' operations on pim.
tenant:policy.readRead access to policy.
tenant:policy.writeManage policy.
tenant:roles.readRead access to roles.
tenant:roles.writeManage roles.
tenant:security.readRead access to security.
tenant:security.writeManage security.
tenant:settings.readRead access to settings.
tenant:settings.writeManage settings.
tenant:siem.readRead access to siem.
tenant:siem.writeManage siem.
tenant:users.impersonate'impersonate' operations on users.
tenant:users.import'import' operations on users.
tenant:users.readRead access to users.
tenant:users.writeManage users.
tenant:webhook-schemas.readRead access to webhook-schemas.
tenant:webhook-schemas.writeManage webhook-schemas.
tenant:webhooks.readRead access to webhooks.
tenant:webhooks.writeManage webhooks.

Resources

ResourceDescriptionOperations
AppGalleryCurated application-template gallery for pre-filled OAuth client registration.2
ApplicationsOAuth client registration and lifecycle — the convergence-target surface (create, patch, secret rotation with 24h overlap, token-usage observability).8
AttributeSchemaTenant-defined, typed attribute definitions that type/validate/render the user and organization metadata bags as opinionated forms, plus curated templates an admin applies to bootstrap a schema (SSO-2543).7
AuditTenant-scoped audit-event query API.2
AuditEventExportAudit-event CSV export for offline compliance processing.2
BotPolicyBot & abuse detection configuration (SSO-2614) — enable/disable Cloudflare Turnstile per environment; the site key is public, the secret is write-only (stored in Vault, never returned).2
CoAdmin8
ComplianceReportNIS2 / DORA compliance-evidence report generation and download.3
ConditionalAccessPolicy5
Consent7
ConsentPurpose7
Directories4
DirectoryAttributeMapping3
DirectoryConnector7
DirectoryGroupRoleMapping3
DirectoryMembers2
DsarGDPR Article 15 data-subject access requests (execute + fetch results).3
DsarReturnEndpoint5
EntitlementAccess packages — catalog, assignment requests, and approvals.8
EntraAppMigrationMicrosoft Entra app-registration bulk import to Thoryn OAuth clients — read-only dry-run reconciliation report (SSO-1326).1
EntraCaMigrationMicrosoft Entra Conditional-Access policy migration to tenant auth policies.1
EnvironmentWorkspace environments (SSO-2410) — several long-lived sandboxes plus the one platform-managed production plane per workspace: list, create sandbox, rename, suspend/reactivate.6
ErasureRequest4
EventsTenant-facing Events API — poll lifecycle events (user., client., federation.*) forward from a cursor; the signature-free twin of tenant webhooks.2
FederationConnectionTestsConnection tests for federation members (Microsoft Entra ID, Google Workspace, Okta) run during the attach wizard.3
FederationMembers5
FgaCheck3
FgaImport1
FgaListObjectsExport3
FgaModels3
FgaTuples2
GeoPolicy3
GuestGuest invitations: invite, redeem, revoke, list.4
HooksActions/Hooks — tenant-configured webhooks into the auth pipeline (register, list, update, delete; secret shown once on create).10
Impersonation2
ImpersonationPolicy2
InvitationPolicy3
Invitations4
LegalDocuments5
LoginExperience16
LoginFlow13
LoginMethodPolicy3
MeConsent4
MeLinkedIdentities1
MeOrganizations1
MigrationSource6
NamedLocation5
OrgMembershipProjection2
OrganizationAttributeSchema5
OrganizationConnections3
OrganizationDomains4
OrganizationMemberRoles1
OrganizationsB2B Organizations — the tenant's own customer companies (SSO-1897): org CRUD, membership, and email invitations (token shown once on invite).13
PermissionsRBAC permission catalog (SSO-1891).4
PimPrivileged Identity Management — just-in-time role elevation with approval.6
PimEligibilityAdminPIM eligibility administration (SSO-1321) — define who may request elevation (create/list/read/revoke eligible assignments); gated on tenant:pim.admin.4
Policy4
RecordsOfProcessing1
RiskEventsAnomalous-login / risk-detection signals (impossible travel, new device, credential stuffing) — one severity-filterable, cursor-paginated stream for the admin risk dashboard (SSO-2143).1
RolesRBAC roles and role-permission bindings (SSO-1891).8
ScimDeprovisionEndpoint5
SecurityPolicy3
SiemSIEM audit-event streaming configuration.4
SsfPoll1
SsfReceiver5
TenantAuditRetentionPer-tenant audit retention window configuration.2
TenantAuthenticationPolicyPer-tenant authentication policy (MFA requirements, session rules).3
TenantCapabilitiesTenant capability families — self-service entitlement toggles.2
TenantIpRuleTenant IP allow/deny rules enforced at the gateway.3
TenantProvisioning2
TestDataWipe1
TokenClaimsPer-application token-claim enrichment configuration.3
TrustCenter6
UserDirectory8
UserImportBulk user import — synchronous batches and asynchronous jobs, with pre-hashed passwords carried over so migrated users sign in without a reset (SSO-1992).9
UserPermissionsEffective permission resolution per user (RBAC read model).1
UserRolesUser-to-role assignments (RBAC).3
UsersTenant user management — CRUD plus lifecycle (suspend/reactivate/soft-delete), metadata, sessions/force-logout, unlock, password-reset-on-behalf, and risk-state (SSO-1884).21
WebhookClaimSchemaWebhook claim-schema registration for token enrichment.4
WebhookEndpointPreview. The WebhookEndpoint push-subscription API is live in preview: register an endpoint, subscribe it to catalog event types, receive signed (X-Thoryn-Signature) deliveries, and read each endpoint's recent delivery attempts. Delivery is currently wired for the user.created event on a best-effort (at-most-once) basis; full event-catalog coverage and at-least-once delivery hardening (retries, dead-letter) are still in progress. Tracked under SSO-1885.6