# Apps

Source: https://www.pontive.com/docs/api-reference/management/apps

Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so).

Authentication: send `Authorization: Bearer <token>` with a secret key (`pontive_sk_…`, which implies its instance) or an access token issued for this API. A token that can reach several instances also names one with `X-Pontive-Instance-ID: inst_…`. Secret keys are for servers only.

## List apps

```http
GET https://api.{region}.pontive.com/v1/apps
```

Get a paginated list of apps.

Operation ID: `ListApps`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string |  | Filter by app type |
| `mode` | string |  | Filter by app mode |
| `status` | string |  | Filter by app status |
| `origin` | "first_party" \| "cimd" \| "dcr" |  | Filter by who created the app: first_party, or a third-party client admitted by CIMD or DCR (pontive-spec 44 §15) |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |
| `sort` | string |  | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, status. Default: -created_at |
| `search` | string |  | Search query (name,issuer,description depending on implementation) |

### Responses

- `200` OK: ListAppsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Create app

```http
POST https://api.{region}.pontive.com/v1/apps
```

Create a new application.

Operation ID: `CreateApp`

### Request body (`application/json`, required): CreateAppRequest

Create App Request

### Responses

- `201` Created: App
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get app details

```http
GET https://api.{region}.pontive.com/v1/apps/{app_id}
```

Get application details by ID.

Operation ID: `GetApp`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Responses

- `200` OK: App
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update app

```http
PATCH https://api.{region}.pontive.com/v1/apps/{app_id}
```

Update an existing app.

Operation ID: `UpdateApp`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Request body (`application/json`): UpdateAppRequest

Update App Request

### Responses

- `200` OK: App
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` instance_unclaimed: setting a jwks_uri on an unclaimed instance; claim it first (pontive-spec 47): ErrResponse
- `404` Not Found: ErrResponse
- `409` third_party_app_read_only: a third-party (CIMD or DCR) app can only be deleted: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete app

```http
DELETE https://api.{region}.pontive.com/v1/apps/{app_id}
```

Delete an application. A third-party (CIMD or DCR) app, which is otherwise read-only, is hard-deleted with its consent grants and refresh tokens; the client is admitted again through the normal flow.

Operation ID: `DeleteApp`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Responses

- `204` No Content
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Preview an access-token claims template

```http
POST https://api.{region}.pontive.com/v1/apps/{app_id}/claims-template/preview
```

Renders an access-token claims template for a user, and optionally an organization they belong to, exactly as issuance would, without saving the template or issuing a token. Omit claims_template to preview the app's saved one. A template the save would refuse fails here with the same message.

Operation ID: `PreviewClaimsTemplate`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Request body (`application/json`, required): PreviewClaimsTemplateRequest

Template, user and optional organization

### Responses

- `200` OK: PreviewClaimsTemplateResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## List an app's client secrets

```http
GET https://api.{region}.pontive.com/v1/apps/{app_id}/client-secrets
```

A confidential app's client secrets that still authenticate (D19), newest first: preview, label, status, created and expiry, never the value, which only the create returns. Needs sys:app:secret.

Operation ID: `ListAppClientSecrets`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

- `200` OK: ListAppClientSecretsResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Create app client secret

```http
POST https://api.{region}.pontive.com/v1/apps/{app_id}/client-secrets
```

Mint a client secret for a confidential app (a web app in oauth mode; D19); needs sys:app:secret. Creating the app mints none (D45). Its value is returned only in this response: only a hash is stored, and reads show a preview. Without expire_others_in the others are kept, and the create is refused (409 client_secret_limit_reached) while two that do not expire are held; with it, every other secret stops working that many seconds from now (0–604800; 0 at once), so a rotation is one call.

Operation ID: `CreateAppClientSecret`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Request body (`application/json`): CreateAppClientSecretRequest

Label and the others' expiry

### Responses

- `201` Created: AppClientSecretWithValue
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` client_secret_limit_reached; third_party_app_read_only: a third-party (CIMD or DCR) app can only be deleted: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete app client secret

```http
DELETE https://api.{region}.pontive.com/v1/apps/{app_id}/client-secrets/{secret_id}
```

Remove one of an app's client secrets (D8, D19). It stops working at once; deleting the last one leaves the app unable to authenticate until a new one is created.

Operation ID: `DeleteAppClientSecret`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |
| `secret_id` | string | yes | Client secret ID |

### Responses

- `204` No Content
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` third_party_app_read_only: a third-party (CIMD or DCR) app can only be deleted: ErrResponse
- `500` Internal Server Error: ErrResponse

## Deactivate app

```http
POST https://api.{region}.pontive.com/v1/apps/{app_id}/deactivate
```

Deactivate an application.

Operation ID: `DeactivateApp`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Responses

- `200` OK: App
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` third_party_app_read_only: a third-party (CIMD or DCR) app can only be deleted: ErrResponse
- `500` Internal Server Error: ErrResponse

## List app organizations

```http
GET https://api.{region}.pontive.com/v1/apps/{app_id}/organizations
```

List the organizations an app admits. They take effect while the app's org_access mode is selected: users then sign in only through one of them, and sign up only by accepting an invitation into one.

Operation ID: `ListAppOrganizations`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

- `200` OK: ListAppOrganizationsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Add app organizations

```http
POST https://api.{region}.pontive.com/v1/apps/{app_id}/organizations
```

Admit organizations to an app (at most 100 per call). Adding one already admitted is not an error; an unknown organization fails the whole call and nothing is added. The list is kept whatever the app's org_access mode.

Operation ID: `CreateAppOrganizations`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Request body (`application/json`, required): AddAppOrganizationsRequest

Organizations to admit

### Responses

- `200` OK: AppOrganizationsResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` third_party_app_read_only: a third-party (CIMD or DCR) app can only be deleted: ErrResponse
- `500` Internal Server Error: ErrResponse

## Remove an app organization

```http
DELETE https://api.{region}.pontive.com/v1/apps/{app_id}/organizations/{organization_id}
```

Stop admitting an organization. Sessions already in it end at their next refresh while the app's org_access mode is selected. Removing one that is not admitted is not an error.

Operation ID: `DeleteAppOrganization`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |
| `organization_id` | string | yes | Organization ID |

### Responses

- `204` No Content
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` third_party_app_read_only: a third-party (CIMD or DCR) app can only be deleted: ErrResponse
- `500` Internal Server Error: ErrResponse

## Add an app public key

```http
POST https://api.{region}.pontive.com/v1/apps/{app_id}/public-keys
```

Add a public JWK to a confidential app's inline keys, for private_key_jwt client authentication (RFC 7523). The body is the JWK itself, with its public members only: RSA 2048 bits or more, or EC P-256, with a kid. At most three; refused while the app has a jwks_uri (409 key_source_conflict), and for a public app (400 public_keys_require_confidential_app).

Operation ID: `CreateAppPublicKey`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Request body (`application/json`, required): JWK

The public JWK

### Responses

- `201` Created: App
- `400` public_key_invalid, public_key_limit_reached, public_keys_require_confidential_app: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` public_key_conflict: the kid is taken; key_source_conflict: the app has a jwks_uri: ErrResponse
- `500` Internal Server Error: ErrResponse

## Remove an app public key

```http
DELETE https://api.{region}.pontive.com/v1/apps/{app_id}/public-keys/{key_id}
```

Remove one of a confidential app's inline keys by kid. Assertions signed with it are refused from now on.

Operation ID: `DeleteAppPublicKey`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |
| `key_id` | string | yes | Key ID |

### Responses

- `200` OK: App
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` public_key_not_found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Reactivate app

```http
POST https://api.{region}.pontive.com/v1/apps/{app_id}/reactivate
```

Reactivate a previously deactivated application.

Operation ID: `ReactivateApp`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Responses

- `200` OK: App
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` third_party_app_read_only: a third-party (CIMD or DCR) app can only be deleted: ErrResponse
- `500` Internal Server Error: ErrResponse

## List refused proxy bases

```http
GET https://api.{region}.pontive.com/v1/apps/{app_id}/refused-proxy-bases
```

The link bases the app's pages named that the app does not accept, most recently seen first — only those registering a proxy path would fix: on one of the app's allowed origins, with a valid path not accepted yet. A flow's emailed links land on the page's bare origin instead, which a proxy mounted under a path does not answer. Kept 30 days after last seen, at most 10.

Operation ID: `ListRefusedProxyBases`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page, 1 to 100 |

### Responses

- `200` OK: ListRefusedProxyBasesResponse
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get app security level

```http
GET https://api.{region}.pontive.com/v1/apps/{app_id}/security-level
```

Get computed security level for an app.

Operation ID: `GetAppSecurityLevel`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | App ID |

### Responses

- `200` OK: AppSecurityLevel
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListAppsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | App[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ErrResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | ErrBody |  |  |

### CreateAppRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_origins` | string[] |  | AllowedOrigins seeds the app's web origins. Required for a regular app, which embeds the widget on its own page and is refused every origin it has not registered; left empty by an oauth app, which redirects to the hosted page and is admitted via its issuer. identity-svc enforces that rule — it is not repeated here, so there is one place to keep it correct. |
| `builder_previews` | "lovable" \| "v0" \| "vercel" \| "replit" \| "bolt" \| "codesandbox"[] |  | BuilderPreviews opts the app in to app builders' previews: preset names among lovable, v0, vercel, replit, bolt and codesandbox. A development instance only: any on a production instance is 422 builder_previews_not_allowed, and an unknown or repeated name 422 field_invalid_format (pontive-spec 06, Builder previews). |
| `client_type` | "public" \| "confidential" |  | ClientType defaults to public. Confidential is for a web app in oauth mode whose token calls run on its own server; it starts with no secret, which POST /apps/{app_id}/client-secrets generates. |
| `description` | string |  |  |
| `initiate_login_uri` | string |  | InitiateLoginURI is where a sign-in to the app begins. Optional, but a regular app cannot send invitations until it has one. |
| `mode` | "regular" \| "oauth" |  |  |
| `name` | string | yes |  |
| `post_logout_redirect_uris` | string[] |  | PostLogoutRedirectUris is optional at creation for every app type. Left empty, logout falls back to redirect_uris and then to allowed_origins. |
| `redirect_uris` | string[] |  | RedirectUris are the OAuth2 callbacks an authorization code may be sent to, matched exactly; required for an oauth app. A development instance's app may register a wildcard for an app builder's changing preview hosts: https only, the * the whole leftmost host label and matching exactly one label (a.b.example.com does not match https://*.example.com/cb), the rest of the host, the port, path and query exact, and never directly under a public suffix (https://*.vercel.app/cb is refused, https://*.myproject.vercel.app/cb accepted). A malformed wildcard is 422 field_invalid_format; any wildcard on a production instance is 422 redirect_uri_wildcard_not_allowed (pontive-spec 06, Redirect URI wildcards). |
| `signin_config` | CreateAppSigninConfig |  |  |
| `type` | "web" \| "native" \| "spa" | yes |  |

### App

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_scopes` | string[] |  |  |
| `authflow_bindings` | AuthflowBindings |  | AuthflowBindings, when non-nil, fully replaces the app's flow bindings (nil = leave untouched, per the app's partial-update convention). Only published flows are bindable; identity-svc validates each non-empty side. |
| `builder_previews` | "lovable" \| "v0" \| "vercel" \| "replit" \| "bolt" \| "codesandbox"[] |  | BuilderPreviews are the app builders whose previews the app signs in from, on a development instance only: preset names among lovable, v0, vercel, replit, bolt and codesandbox, sorted; empty when off. For an enabled builder, a preview origin (https://<id>.lovableproject.com) may start the app's embedded sign-in and call the auth domain's browser endpoints, and an OAuth flow may use the hosted preview callback https://{auth domain}/oauth2/preview-callback?origin={the preview's origin} as its redirect_uri without registering it (pontive-spec 06, Builder previews). Always empty for a third-party client. |
| `client_id_url` | string |  | ClientIDURL is a CIMD app's client ID metadata document URL, its client_id on the wire. Empty for every other app. |
| `client_secrets` | AppClientSecret[] |  | ClientSecrets are a confidential app's secrets, as previews: the current one and, during a rotation, the previous one. Empty for a public app. The secret itself is shown once, when it is generated. |
| `client_type` | "public" \| "confidential" |  | ClientType is whether the app authenticates at the token endpoint with a client secret. Only a web app in oauth mode may be confidential. |
| `consented_at` | string |  | ConsentedAt is when a third-party app first reached consent; null for one never consented to (removed after 24 hours) and for every first-party app. Only a consented client counts toward its origin's cap (44 §8). |
| `created_at` | string |  |  |
| `deactivated_at` | string |  |  |
| `description` | string |  |  |
| `domain_id` | string |  |  |
| `email_domain_access` | EmailDomainAccess |  | EmailDomainAccess, when present, replaces which email domains may use the app. |
| `id` | string |  |  |
| `initiate_login_uri` | string |  | InitiateLoginURI is where anyone but the app sends a person to begin signing in to it (OpenID Connect initiate_login_uri): the route that starts an authorization request for an oauth app, the page hosting the sign-in widget for a regular one. An invitee lands there once they have accepted, with organization_id and login_hint added. Empty when unset. |
| `instance_id` | string |  |  |
| `issuer` | string |  |  |
| `jwks_uri` | string |  |  |
| `last_used_at` | string |  |  |
| `metadata` | Record<string, string> |  |  |
| `mfa_config` | MFAConfig |  |  |
| `mode` | "regular" \| "oauth" |  |  |
| `name` | string |  |  |
| `oauth_consent` | OAuthConsent |  | OAuthConsent, when present, replaces the app's consent configuration (nil = unchanged). Only an oauth-mode app can require consent; identity-svc validates it. |
| `object` | string |  |  |
| `org_access` | OrgAccess |  | OrgAccess, when present, replaces the app's organization access policy. The organizations themselves are managed under /apps/{app_id}/organizations. |
| `origin` | "first_party" \| "cimd" \| "dcr" |  | Origin is who created the app (pontive-spec 06, 44 §8): first_party for every app created through the API; cimd or dcr for a third-party client the auth domain admitted under the instance's third_party_clients setting. A third-party app is read-only except for deletion (third_party_app_read_only, 409). |
| `platform_config` | PlatformConfig |  |  |
| `post_logout_redirect_uris` | string[] |  | PostLogoutRedirectUris is where a browser may be sent after RP-initiated logout. Empty is the ordinary case and does not mean logout has nowhere to land: the authorization server falls back to the app's redirect_uris, and then to its registered origins, so an app that registers neither still returns to itself. |
| `public_keys` | PublicKey[] |  | PublicKeys are the inline keys a confidential app signs private_key_jwt assertions with; JWKSURI is where they are fetched from instead. At most one is set; a public app has neither. |
| `redirect_uris` | string[] |  | RedirectUris are the OAuth2 callbacks an authorization code may be sent to, matched exactly. On a development instance an entry may be a wildcard whose * is the whole leftmost host label, as in https://*.preview.example.com/callback, matching exactly one label (pontive-spec 06, Redirect URI wildcards). |
| `security_posture` | AppSecurityPosture |  |  |
| `session_config` | SessionConfig |  |  |
| `signin_config` | SigninConfig |  | Optional per-app configs. A non-nil config fully replaces that config on the app; nested platforms/sections left out are cleared. |
| `signup_config` | SignupConfig |  |  |
| `software_id` | string |  | SoftwareID and SoftwareVersion are what a DCR client said it is (RFC 7591 §2), for display only. Empty otherwise. |
| `software_version` | string |  |  |
| `status` | "active" \| "deactivated" |  |  |
| `token_config` | TokenConfig |  |  |
| `type` | "web" \| "native" \| "spa" |  |  |
| `updated_at` | string |  |  |

### UpdateAppRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_scopes` | string[] |  |  |
| `authflow_bindings` | AuthflowBindings |  | AuthflowBindings, when non-nil, fully replaces the app's flow bindings (nil = leave untouched, per the app's partial-update convention). Only published flows are bindable; identity-svc validates each non-empty side. |
| `builder_previews` | "lovable" \| "v0" \| "vercel" \| "replit" \| "bolt" \| "codesandbox"[] |  | BuilderPreviews, when present, replaces the app's builder preview presets; an empty array turns them off, which any instance accepts. Any other value on a production instance is 422 builder_previews_not_allowed; an unknown or repeated name 422 field_invalid_format (pontive-spec 06, Builder previews). |
| `client_type` | "public" \| "confidential" |  | ClientType changes whether the app is a confidential client. Switching to public deletes its client secrets. Only a web app in oauth mode may be confidential. |
| `description` | string |  |  |
| `domain_id` | string |  |  |
| `email_domain_access` | EmailDomainAccess |  | EmailDomainAccess, when present, replaces which email domains may use the app. |
| `initiate_login_uri` | string |  | InitiateLoginURI, when present, replaces the app's; the empty string clears it. |
| `metadata` | Record<string, string> |  |  |
| `mfa_config` | MFAConfig |  |  |
| `name` | string |  |  |
| `oauth_consent` | OAuthConsent |  | OAuthConsent, when present, replaces the app's consent configuration (nil = unchanged). Only an oauth-mode app can require consent; identity-svc validates it. |
| `org_access` | OrgAccess |  | OrgAccess, when present, replaces the app's organization access policy. The organizations themselves are managed under /apps/{app_id}/organizations. |
| `platform_config` | PlatformConfig |  |  |
| `post_logout_redirect_uris` | string[] |  | PostLogoutRedirectUris, when non-nil, fully replaces the app's post-logout list; nil leaves it untouched, per this endpoint's partial-update convention. An empty array is therefore how an app clears the list and goes back to the fallbacks. |
| `redirect_uris` | string[] |  | RedirectUris are the OAuth2 callbacks an authorization code may be sent to, matched exactly; when present the list replaces the app's. A development instance's app may register a wildcard for an app builder's changing preview hosts: https only, the * the whole leftmost host label and matching exactly one label (a.b.example.com does not match https://*.example.com/cb), the rest of the host, the port, path and query exact, and never directly under a public suffix (https://*.vercel.app/cb is refused, https://*.myproject.vercel.app/cb accepted). A malformed wildcard is 422 field_invalid_format; any wildcard on a production instance is 422 redirect_uri_wildcard_not_allowed (pontive-spec 06, Redirect URI wildcards). |
| `session_config` | SessionConfig |  |  |
| `signin_config` | SigninConfig |  | Optional per-app configs. A non-nil config fully replaces that config on the app; nested platforms/sections left out are cleared. |
| `signup_config` | SignupConfig |  |  |
| `token_config` | TokenConfig |  |  |

### PreviewClaimsTemplateRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `claims_template` | Record<string, any> |  | ClaimsTemplate is the template to render, as it would be saved on token_config.access_token.claims_template. Omit it to preview the app's saved template. |
| `organization_id` | string |  | OrganizationID is an organization the user belongs to, to render the organization.* and membership.* fields; omit it for a token that acts in no organization. |
| `user_id` | string | yes | UserID is the user to render for. |

### PreviewClaimsTemplateResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `claims` | Record<string, any> |  |  |

### ListAppClientSecretsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | AppClientSecret[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### CreateAppClientSecretRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expire_others_in` | integer |  |  |
| `label` | string |  | Label is an optional label for the new secret. |

### AppClientSecretWithValue

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `expires_at` | string |  | ExpiresAt is set on the previous secret during a rotation: when it stops working. |
| `id` | string |  |  |
| `label` | string |  |  |
| `last_used_at` | string |  |  |
| `object` | string |  |  |
| `preview` | string |  |  |
| `secret` | string |  |  |
| `status` | "active" \| "rotating" |  |  |

### ListAppOrganizationsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | AppOrganization[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### AddAppOrganizationsRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `organization_ids` | string[] | yes | OrganizationIDs are the organizations to admit, at most 100. Adding one already admitted is not an error; an unknown one fails the whole call. |

### AppOrganizationsResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | AppOrganization[] |  |  |
| `object` | string |  |  |

### JWK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `alg` | "RS256" \| "PS256" \| "ES256" |  |  |
| `crv` | "P-256" |  |  |
| `e` | string |  |  |
| `kid` | string | yes |  |
| `kty` | "RSA" \| "EC" | yes |  |
| `n` | string |  |  |
| `use` | string |  |  |
| `x` | string |  |  |
| `y` | string |  |  |

### ListRefusedProxyBasesResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | RefusedProxyBase[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### AppSecurityLevel

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string |  |  |
| `app_mode` | "regular" \| "oauth" |  |  |
| `blocking_issues` | string[] |  |  |
| `evaluated_at` | string |  |  |
| `object` | string |  |  |
| `overall_level` | "secure" \| "unsecure" \| "enhanced" |  |  |
| `platforms` | PlatformLevels |  |  |
| `production_ready` | boolean |  |  |

### Pagination

Pagination is the page answered (api-route-review D9).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer |  | Limit is the maximum number of items per page. |
| `page` | integer |  | Page is the 1-based index of the returned page. |
| `total` | integer |  | Total is the total number of items across all pages. |
| `total_pages` | integer |  | TotalPages is the total number of pages available. |

### ErrBody

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string |  | Code is the spec's machine-readable code for this error, in snake case: a domain code such as seat_limit_reached where the refusal has one, otherwise a generic one such as permission_denied, not_found, conflict, invalid_request or service_unavailable. |
| `details` | ErrDetail[] |  | Details are per-field findings, present only on a refusal that has them, e.g. a 422 invalid_theme names each invalid value by its path, a 422 package_invalid each problem, and a 409 capability_in_use each count by its name. |
| `doc_url` | string |  | DocURL links to documentation about this error, when available. |
| `message` | string |  | Message is a human-readable description of what went wrong. |
| `object` | string |  | Object is the discriminator; always "error". |
| `param` | string |  | Param names the request parameter this error refers to, when applicable. |
| `type` | "validation_error" \| "authentication_error" \| "authorization_error" \| "not_found" \| "conflict_error" \| "rate_limit_error" \| "internal_error" |  | Type is the error's category, set by its HTTP status: one of validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error, internal_error. |

### CreateAppSigninConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `consents` | Consent[] |  |  |
| `passkey` | PasskeyConfig |  |  |
| `password` | PasswordConfig |  |  |
| `passwordless` | PasswordlessConfig |  |  |

### AuthflowBindings

AuthflowBindings, when non-nil, fully replaces the app's flow bindings
(nil = leave untouched, per the app's partial-update convention). Only
published flows are bindable; identity-svc validates each non-empty side.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `signin` | string |  |  |
| `signup` | string |  |  |

### AppClientSecret

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `expires_at` | string |  | ExpiresAt is set on the previous secret during a rotation: when it stops working. |
| `id` | string |  |  |
| `label` | string |  |  |
| `last_used_at` | string |  |  |
| `object` | string |  |  |
| `preview` | string |  |  |
| `status` | "active" \| "rotating" |  |  |

### EmailDomainAccess

EmailDomainAccess, when present, replaces which email domains may use
the app.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domains` | string[] |  |  |
| `mode` | "none" \| "allow" \| "block" |  |  |

### MFAConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
| `enforcement` | string |  |  |
| `grace_period_days` | integer |  |  |
| `methods` | MFAMethods |  |  |
| `remember_device_days` | integer |  |  |

### OAuthConsent

OAuthConsent, when present, replaces the app's consent configuration
(nil = unchanged). Only an oauth-mode app can require consent;
identity-svc validates it.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `homepage_url` | string |  |  |
| `logo_url` | string |  | LogoURL, HomepageURL, PrivacyPolicyURL and TermsOfServiceURL are shown on the consent screen. Each is https or empty. |
| `privacy_policy_url` | string |  |  |
| `required` | boolean |  |  |
| `scope_descriptions` | Record<string, string> |  | ScopeDescriptions overrides the platform's text for a scope on the consent screen, and is the only text a custom scope has (without one it is shown as the scope string). At most 300 characters each. |
| `terms_of_service_url` | string |  |  |

### OrgAccess

OrgAccess, when present, replaces the app's organization access policy.
The organizations themselves are managed under /apps/{app_id}/organizations.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | "all" \| "selected" |  |  |

### PlatformConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `android` | AndroidConfig |  |  |
| `ios` | IOSConfig |  |  |
| `web` | WebConfig |  |  |

### PublicKey

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `alg` | "RS256" \| "PS256" \| "ES256" |  | Alg, when the key names one, is the only algorithm it verifies. |
| `created_at` | string |  | CreatedAt is when the key was added. |
| `crv` | "P-256" |  | Crv, X and Y are an EC key's curve and point, base64url. |
| `e` | string |  |  |
| `kid` | string |  |  |
| `kty` | "RSA" \| "EC" |  |  |
| `n` | string |  | N and E are an RSA key's modulus and exponent, base64url. |
| `object` | string |  |  |
| `use` | string |  |  |
| `x` | string |  |  |
| `y` | string |  |  |

### AppSecurityPosture

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `details` | SecurityPostureDetail[] |  |  |
| `security_level` | "secure" \| "unsecure" \| "enhanced" |  |  |

### SessionConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `absolute_lifetime_seconds` | integer |  | AbsoluteLifetimeSeconds is the hard cap, fixed when the session is created and never extended by use. NIST SP 800-63B puts this at 12h for AAL2, which is the default a new app is given. |
| `idle_timeout_seconds` | integer |  | IdleTimeoutSeconds is how long the session may sit unused before it dies, sliding forward as it is used. Zero disables the inactivity cap, leaving only the absolute one — a deliberate choice, not a default to fall into. |

### SigninConfig

Optional per-app configs. A non-nil config fully replaces that config on
the app; nested platforms/sections left out are cleared.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `consents` | Consent[] |  |  |
| `passkey` | PasskeyConfig |  |  |
| `password` | PasswordConfig |  |  |
| `passwordless` | PasswordlessConfig |  |  |

### SignupConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `consents` | SignupConsent[] |  |  |
| `fields` | SignupFields |  |  |
| `verification` | SignupVerification |  |  |

### TokenConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `access_token` | AccessTokenConfig |  |  |
| `id_token` | IDTokenConfig |  |  |
| `refresh_token` | RefreshTokenConfig |  |  |

### AppOrganization

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string |  |  |
| `created_at` | string |  |  |
| `object` | string |  |  |
| `organization_id` | string |  |  |
| `organization_name` | string |  |  |

### RefusedProxyBase

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `base` | string |  |  |
| `count` | integer |  |  |
| `first_seen_at` | string |  |  |
| `last_seen_at` | string |  |  |

### PlatformLevels

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `android` | PlatformSecurity |  |  |
| `ios` | PlatformSecurity |  |  |
| `web` | PlatformSecurity |  |  |

### ErrDetail

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `field` | string |  | Field is where the finding is: for a theme, its dotted path. |
| `message` | string |  | Message is what is wrong there. |

### Consent

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `consent_id` | string |  |  |
| `label` | string |  |  |
| `required` | boolean |  |  |
| `url` | string |  |  |
| `version` | string |  |  |

### PasskeyConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authenticator_attachment` | string |  |  |
| `auto_fill` | boolean |  |  |
| `conditional_create` | boolean |  |  |
| `enabled` | boolean |  |  |
| `local_enrollment` | boolean |  |  |
| `passkey_button` | boolean |  |  |
| `progressive_enrollment` | boolean |  |  |
| `user_verification` | string |  |  |

### PasswordConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | SigninMethod |  |  |
| `phone` | SigninMethod |  |  |
| `username` | SigninMethod |  |  |

### PasswordlessConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email_otp` | OTPConfig |  |  |
| `magic_link` | MagicLinkConfig |  |  |
| `phone_otp` | OTPConfig |  |  |

### MFAMethods

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | EmailConfig |  |  |
| `recovery_codes` | RecoveryCodesConfig |  |  |
| `sms` | SMSConfig |  |  |
| `totp` | TOTPConfig |  |  |

### AndroidConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attestation` | AndroidAttestation |  |  |
| `package_names` | string[] |  |  |
| `security_level` | string |  |  |
| `sha256_fingerprints` | string[] |  |  |

### IOSConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `attestation` | IOSAttestation |  |  |
| `bundle_ids` | string[] |  |  |
| `security_level` | string |  |  |
| `team_id` | string |  |  |

### WebConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_origins` | string[] |  |  |
| `proxy_paths` | string[] |  | ProxyPaths are paths on the allowed origins where the app's proxy for Pontive is mounted, beyond the root and /__pontive, which are always accepted. A flow's emailed links land under the base its page names only when the app accepts it. |
| `security_level` | string |  |  |

### SecurityPostureDetail

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  |  |
| `platform` | "web" \| "ios" \| "android" |  | The platform the check was evaluated for, so a client can route the finding to the configuration that resolves it. |
| `status` | "info" \| "warning" \| "critical" |  |  |
| `title` | string |  |  |

### SignupConsent

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `consent_id` | string |  |  |
| `label` | string |  |  |
| `required` | boolean |  |  |
| `url` | string |  |  |
| `version` | string |  |  |

### SignupFields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `identifiers` | IdentifierFields |  |  |
| `profile` | ProfileFields |  |  |

### SignupVerification

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | EmailVerification |  |  |
| `phone` | PhoneVerification |  |  |

### AccessTokenConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `claims_template` | Record<string, any> |  | ClaimsTemplate adds the app's own claims to its access tokens. A JSON object whose string values may contain {{ expressions }} reading user.* (id, email, email_verified, phone_number, phone_number_verified, username, name, given_name, family_name, middle_name, nickname, picture, locale, zoneinfo, external_id, metadata.<key>), organization.* (id, name, slug, external_id, metadata.<key>) and membership.* (roles, permissions), with `\|\|` fallbacks and 'quoted' literals, e.g. 	{"tenant": "{{ organization.external_id \|\| organization.id }}", "plan": "{{ user.metadata.plan \|\| 'free' }}"} A value that is exactly one expression keeps its type; a null value drops its key. Claims the token already sets (sub, sid, org_id, roles, permissions...) cannot be named, and a render over 3072 bytes fails the issuance. Null or omitted: no template. Rendered afresh on every refresh. |
| `lifetime_seconds` | integer |  |  |
| `permissions_claim` | ClaimFilter |  | PermissionsClaim and RolesClaim narrow what the permissions and roles claims carry, e.g. {"exclude": ["sys:*"]} for the app's own permissions only. Null or omitted carries everything the user holds where the token acts. They never change what the user holds or what Pontive enforces. The two claims together are bounded at 4096 bytes. A token that would exceed it still issues: the claim that does not fit is left out whole — permissions first, then roles — and named in the claims_overflow claim. An app that finds it reads roles from GET /me/memberships and checks a permission with POST /authz/check. |
| `roles_claim` | ClaimFilter |  | PermissionsClaim and RolesClaim narrow what the permissions and roles claims carry, e.g. {"exclude": ["sys:*"]} for the app's own permissions only. Null or omitted carries everything the user holds where the token acts. They never change what the user holds or what Pontive enforces. The two claims together are bounded at 4096 bytes. A token that would exceed it still issues: the claim that does not fit is left out whole — permissions first, then roles — and named in the claims_overflow claim. An app that finds it reads roles from GET /me/memberships and checks a permission with POST /authz/check. |

### IDTokenConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
| `lifetime_seconds` | integer |  |  |

### RefreshTokenConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allow_offline` | boolean |  | AllowOffline lets this app hold refresh tokens that survive the end of the browser session they were issued through — OIDC offline access. Without it the session bounds the refresh, so LifetimeSeconds can only ever be spent within one session's absolute lifetime. It is the app's authorization, not its request: an OIDC client must also ask, via the offline_access scope. A client on the direct SDK path has no scope channel to ask through, so for those this flag alone decides. Off by default, and it should stay off for anything browser-based: a token that outlives logout is exactly what a signed-out user believes they no longer have. |
| `delivery` | RefreshTokenDelivery |  |  |
| `enabled` | boolean |  |  |
| `lifetime_seconds` | integer |  |  |
| `reuse_detection` | boolean |  |  |
| `rotation` | boolean |  |  |

### PlatformSecurity

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `configured` | boolean |  |  |
| `issues` | string[] |  |  |
| `level` | "secure" \| "unsecure" \| "enhanced" |  |  |
| `recommendations` | string[] |  |  |

### SigninMethod

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |

### OTPConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
| `expiration` | integer |  |  |

### MagicLinkConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
| `expiration` | integer |  |  |

### EmailConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |

### RecoveryCodesConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `count` | integer |  |  |
| `enabled` | boolean |  |  |

### SMSConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |

### TOTPConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
| `issuer` | string |  |  |

### AndroidAttestation

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allow_emulators` | boolean |  |  |
| `cloud_project_number` | string |  |  |
| `enabled` | boolean |  |  |

### IOSAttestation

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `bypass_for_development` | boolean |  |  |
| `enabled` | boolean |  |  |
| `environment` | string |  |  |

### IdentifierFields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | SignupField |  | Email is always collected and required: every Pontive user has an email. Whatever is sent here is stored as {enabled: true, required: true}. |
| `phone` | SignupField |  | Email is always collected and required: every Pontive user has an email. Whatever is sent here is stored as {enabled: true, required: true}. |
| `username` | SignupField |  | Email is always collected and required: every Pontive user has an email. Whatever is sent here is stored as {enabled: true, required: true}. |

### ProfileFields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `date_of_birth` | SignupField |  | Email is always collected and required: every Pontive user has an email. Whatever is sent here is stored as {enabled: true, required: true}. |
| `family_name` | SignupField |  | Email is always collected and required: every Pontive user has an email. Whatever is sent here is stored as {enabled: true, required: true}. |
| `gender` | SignupField |  | Email is always collected and required: every Pontive user has an email. Whatever is sent here is stored as {enabled: true, required: true}. |
| `given_name` | SignupField |  | Email is always collected and required: every Pontive user has an email. Whatever is sent here is stored as {enabled: true, required: true}. |

### EmailVerification

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  | Enabled is whether sign-up asks for the address before it completes. Omitted means on. Off, the new user is signed in at once with an unverified email, and every later sign-in asks them to verify it. |
| `expiration` | integer |  |  |
| `method` | string |  |  |

### PhoneVerification

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
| `expiration` | integer |  |  |

### ClaimFilter

PermissionsClaim and RolesClaim narrow what the permissions and roles
claims carry, e.g. {"exclude": ["sys:*"]} for the app's own permissions
only. Null or omitted carries everything the user holds where the token
acts. They never change what the user holds or what Pontive enforces.

The two claims together are bounded at 4096 bytes. A token that would
exceed it still issues: the claim that does not fit is left out whole —
permissions first, then roles — and named in the claims_overflow claim.
An app that finds it reads roles from GET /me/memberships and checks a
permission with POST /authz/check.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `exclude` | string[] |  |  |
| `include` | string[] |  | Include defaults to ["*"]; [] drops the claim. |

### RefreshTokenDelivery

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `http_only_cookie` | RefreshTokenCookie |  |  |
| `response_body` | boolean |  |  |

### SignupField

Email is always collected and required: every Pontive user has an
email. Whatever is sent here is stored as {enabled: true, required: true}.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
| `required` | boolean |  |  |

### RefreshTokenCookie

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean |  |  |
