# Service accounts

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

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 service accounts

```http
GET https://api.{region}.pontive.com/v1/service-accounts
```

List the instance's service accounts, filtered by owner (D6, D15, D44): owner_type root, org or a resource type key lists one kind of owner's accounts, owner_id one owner's.

Operation ID: `ListServiceAccounts`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `owner_type` | string |  | root, org, or the owning resource's type key |
| `owner_id` | string |  | One owner's prefixed id: inst_, org_ or res_ |
| `status` | string |  | Filter by status |
| `name` | string |  | Search by name |
| `search` | string |  | Search by query |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

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

## Create service account

```http
POST https://api.{region}.pontive.com/v1/service-accounts
```

Create a service account, owned by the instance root, an organization or a resource (D5, D6, D44): owner_type root (the default), org or the owning resource's type key, owner_id its prefixed id. The account is created with no client secret (D45): mint one with POST /service-accounts/{service_account_id}/client-secrets, which needs sys:sa:secret. A pontive: scope in allowed_scopes is refused (400); to let the account reach the management API, grant it on the management (system) API with PUT /apis/{api_id}/clients.

Operation ID: `CreateServiceAccount`

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

Create service account payload

### Responses

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

## Get service account

```http
GET https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}
```

Get a service account by ID

Operation ID: `GetServiceAccount`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Responses

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

## Update service account

```http
PATCH https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}
```

Update a service account

Operation ID: `UpdateServiceAccount`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

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

Update service account payload

### Responses

- `200` OK: ServiceAccount
- `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
- `500` Internal Server Error: ErrResponse

## Delete service account

```http
DELETE https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}
```

Delete a service account

Operation ID: `DeleteServiceAccount`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Responses

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

## List app scopes

```http
GET https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/client-scopes
```

List OAuth-style app scope configuration for a service account

Operation ID: `ListClientScopes`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Query parameters

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

### Responses

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

## Update app scopes

```http
PUT https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/client-scopes
```

Replace app scope configuration for a service account

Operation ID: `ReplaceClientScopes`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

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

App scopes payload

### Responses

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

## List service account client secrets

```http
GET https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/client-secrets
```

The account's client secrets that still authenticate (D19), newest first: preview, label, status, created and expiry, never the value. Needs sys:sa:secret on the account's owner.

Operation ID: `ListServiceAccountClientSecrets`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Query parameters

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

### Responses

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

## Create service account client secret

```http
POST https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/client-secrets
```

Mint a client secret (D19); needs sys:sa:secret. Creating the account mints none (D45). Its value is returned here only. 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: `CreateServiceAccountClientSecret`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

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

Label and the others' expiry

### Responses

- `201` Created: ClientSecretWithValue
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` client_secret_limit_reached: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete service account client secret

```http
DELETE https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/client-secrets/{secret_id}
```

Remove one of the account's client secrets (D8, D19); it stops working at once.

Operation ID: `DeleteServiceAccountClientSecret`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |
| `secret_id` | string | yes | Client secret ID |

### Responses

- `204` No Content
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` client_secret_not_found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Deactivate service account

```http
POST https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/deactivate
```

Deactivate a service account

Operation ID: `DeactivateServiceAccount`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Responses

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

## List service account federated credentials

```http
GET https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/federated-credentials
```

Every federated credential of the service account (at most 20). Needs sys:sa:read on its owner (the instance root, its organization, or its resource's organization).

Operation ID: `ListServiceAccountFederatedCredentials`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service account ID (svc_) |

### Query parameters

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

### Responses

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

## Create service account federated credential

```http
POST https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/federated-credentials
```

Let the service account authenticate at the token endpoint with a token a trusted issuer signed, with no secret or key of its own (workload identity federation, pontive-spec 20 B7). The workload sends its token as client_assertion, with client_assertion_type urn:ietf:params:oauth:client-assertion-type:jwt-bearer and client_id the service account's id; it is accepted when its iss is the credential's trusted issuer (enabled), its aud one the issuer accepts, exp at most the issuer's max_token_lifetime_seconds (default 3600) ahead and at most that long after iat, its signature the issuer's, its jti unused (unless the issuer has allow_reuse, which accepts the same token until it expires), its sub matches subject and every required claim is present with exactly its value. subject is exact by default; a '*' matches one or more characters within one ':' or '/' segment, and '**' or a '*' in the first segment is refused, so repo:acme/api:environment:* matches every environment of acme/api and nothing else. At most 20 per service account, the name once. Needs sys:sa:secret on its owner (the instance root, its organization, or its resource's organization).

Operation ID: `CreateServiceAccountFederatedCredential`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service account ID (svc_) |

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

Credential

### Responses

- `201` Created: FederatedCredential
- `400` federated_credential_invalid, federated_credential_limit_reached: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` federated_credential_not_found (no such service account), trusted_issuer_not_found: ErrResponse
- `409` federated_credential_conflict: the name is taken: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get service account federated credential

```http
GET https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}
```

Needs sys:sa:read on its owner (the instance root, its organization, or its resource's organization).

Operation ID: `GetServiceAccountFederatedCredential`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service account ID (svc_) |
| `credential_id` | string | yes | Federated credential ID (fic_) |

### Responses

- `200` OK: FederatedCredential
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` federated_credential_not_found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update service account federated credential

```http
PATCH https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}
```

Change the name, description, subject or required claims; an absent field is left as it is, and required_claims, when present, replaces the map. The trusted issuer never changes. Needs sys:sa:secret on its owner (the instance root, its organization, or its resource's organization).

Operation ID: `UpdateServiceAccountFederatedCredential`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service account ID (svc_) |
| `credential_id` | string | yes | Federated credential ID (fic_) |

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

Changes

### Responses

- `200` OK: FederatedCredential
- `400` federated_credential_invalid: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` federated_credential_not_found: ErrResponse
- `409` federated_credential_conflict: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete service account federated credential

```http
DELETE https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/federated-credentials/{credential_id}
```

The credential stops authenticating at once; tokens already issued live out their lifetime. Needs sys:sa:secret on its owner (the instance root, its organization, or its resource's organization).

Operation ID: `DeleteServiceAccountFederatedCredential`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service account ID (svc_) |
| `credential_id` | string | yes | Federated credential ID (fic_) |

### Responses

- `204` No Content
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` federated_credential_not_found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Add a service account public key

```http
POST https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/public-keys
```

Add a public JWK to the account'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 account has a jwks_uri (409 key_source_conflict). Rotate by overlap: add the new key, move over to it, then remove the old one.

Operation ID: `CreateServiceAccountPublicKey`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

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

The public JWK

### Responses

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

## Remove a service account public key

```http
DELETE https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/public-keys/{key_id}
```

Remove one of the account's inline keys by kid. Assertions signed with it are refused from now on.

Operation ID: `DeleteServiceAccountPublicKey`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |
| `key_id` | string | yes | Key ID |

### Responses

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

## Reactivate service account

```http
POST https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/reactivate
```

Reactivate a service account

Operation ID: `ReactivateServiceAccount`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Responses

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

## Set a service account's roles

```http
PUT https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/roles
```

Replace the roles a service account holds on its owner — the instance root, its organization, or its resource — with roles of the owner's type; no roles removes them all. What lies below the owner is reached by inheritance. A service account never holds owner on an organization (owner_not_grantable).

Operation ID: `ReplaceServiceAccountRoles`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

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

Roles

### Responses

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

## Get token configuration

```http
GET https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/token-config
```

Get token configuration for a service account

Operation ID: `GetTokenConfig`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Responses

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

## Update token configuration

```http
PATCH https://api.{region}.pontive.com/v1/service-accounts/{service_account_id}/token-config
```

Update token configuration for a service account

Operation ID: `UpdateTokenConfig`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `service_account_id` | string | yes | Service Account ID |

### Header parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `If-Match` | string |  | The ETag the document was read with: a stale one is refused 412 precondition_failed (D42) |

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

Update token configuration payload

### Responses

- `200` OK: TokenConfiguration
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `412` precondition_failed: the document changed since it was read: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListServiceAccountsResponse

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

### ErrResponse

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

### CreateServiceAccountRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_scopes` | string[] |  | AllowedScopes are the scopes the account may request for itself; a pontive: scope is refused (400). To reach the management API, grant the account on the management (system) API instead: PUT /apis/{api_id}/clients (pontive-spec 44 §7, §10). |
| `description` | string |  |  |
| `domain_id` | string |  |  |
| `metadata` | Metadata |  |  |
| `name` | string | yes |  |
| `owner_id` | string |  | OwnerID is the owner's prefixed id: org_ or res_; for root the inst_ id or omitted. Immutable. |
| `owner_type` | string |  | OwnerType is root (the default), org, or the owning resource's type key (D6, D44), which must be that resource's type. |

### ServiceAccount

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_scopes` | string[] |  | AllowedScopes are the scopes the account may request for itself; a pontive: scope is refused (400). To reach the management API, grant the account on the management (system) API instead: PUT /apis/{api_id}/clients (pontive-spec 44 §7, §10). |
| `created_at` | string |  |  |
| `description` | string |  |  |
| `domain_id` | string |  |  |
| `id` | string |  |  |
| `instance_id` | string |  |  |
| `issuer` | string |  |  |
| `jwks_uri` | string |  |  |
| `last_used_at` | string |  |  |
| `metadata` | Metadata |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `owner_id` | string |  | OwnerID is the owner's prefixed id: inst_, org_ or res_. |
| `owner_type` | string |  | OwnerType is the owner's resource-type key (D6, D44): root, org, or the owning resource's type key. |
| `public_keys` | PublicKey[] |  | PublicKeys are the inline keys the account signs private_key_jwt assertions with; JWKSURI is where they are fetched from instead. At most one is set. |
| `roles` | string[] |  | Roles are the roles the account holds on its owner; what lies below the owner is reached by inheritance. |
| `status` | "active" \| "deactivated" |  |  |
| `updated_at` | string |  |  |

### UpdateServiceAccountRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  |  |
| `metadata` | Metadata |  |  |
| `name` | string |  |  |

### ListAppScopesResponse

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

### UpdateAppScopesRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `scopes` | AppScopePayload[] |  |  |

### ListClientSecretsResponse

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

### CreateClientSecretRequest

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

### ClientSecretWithValue

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `expires_at` | string |  |  |
| `id` | string |  |  |
| `label` | string |  |  |
| `last_used_at` | string |  |  |
| `object` | string |  |  |
| `secret` | string |  |  |
| `secret_preview` | string |  |  |
| `status` | "active" \| "rotating" |  |  |

### ListFederatedCredentialsResponse

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

### CreateFederatedCredentialRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  |  |
| `name` | string | yes | Name is unique among the client's credentials. |
| `required_claims` | Record<string, string> |  | RequiredClaims, at most 10, such as repository, ref or environment for GitHub Actions; iss, sub, aud, exp, nbf, iat and jti cannot be required. |
| `subject` | string | yes | Subject is exact by default. A '*' matches one or more characters within one ':' or '/' segment; '**' and a '*' in the first segment are refused. |
| `trusted_issuer_id` | string | yes |  |

### FederatedCredential

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  | ClientID is the service account (svc_) or agent (agt_). |
| `created_at` | string |  |  |
| `description` | string |  |  |
| `id` | string |  |  |
| `instance_id` | string |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `required_claims` | Record<string, string> |  | RequiredClaims must be in the assertion with exactly these values. |
| `subject` | string |  | Subject is the assertion's sub: exact, or a pattern where '*' matches one or more characters within one ':' or '/' segment. |
| `trusted_issuer_id` | string |  |  |
| `updated_at` | string |  |  |

### UpdateFederatedCredentialRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  |  |
| `name` | string |  |  |
| `required_claims` | Record<string, string> |  | RequiredClaims, when present, replaces the map; {} requires none. |
| `subject` | 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 |  |  |

### SetServiceAccountRolesRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `roles` | string[] |  |  |

### TokenConfiguration

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `access_token_ttl` | integer |  |  |
| `updated_at` | string |  |  |

### UpdateServiceAccountTokenConfigRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `access_token_ttl` | integer |  |  |

### 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. |

### Metadata

Type: Record<string, string>

### 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 |  |  |

### AppScope

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_scopes` | string[] |  |  |
| `object` | string |  |  |

### AppScopePayload

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowed_scopes` | string[] |  |  |

### ClientSecret

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `created_at` | string |  |  |
| `expires_at` | string |  |  |
| `id` | string |  |  |
| `label` | string |  |  |
| `last_used_at` | string |  |  |
| `object` | string |  |  |
| `secret_preview` | string |  |  |
| `status` | "active" \| "rotating" |  |  |

### 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. |
