# Shared credentials

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

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 shared credentials

```http
GET https://api.{region}.pontive.com/v1/authn/connection-credentials
```

List the instance's shared OAuth provider credentials. Secrets are never returned; responses expose only *_set booleans. The list is unpaginated.

Operation ID: `ListSharedCredentials`

### Query parameters

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

### Responses

- `200` OK: ListSharedCredentialsResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Create shared credential

```http
POST https://api.{region}.pontive.com/v1/authn/connection-credentials
```

Create a project-level shared OAuth provider credential. The config is flat (the adapter's own fields directly under "config"), discriminated by provider_type. Secrets are accepted here but never returned.

Operation ID: `CreateSharedCredential`

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

Create shared credential payload

### Responses

- `201` Created: SharedCredential
- `400` Bad Request: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Includes instance_unclaimed: a generic OIDC credential (provider_type oidc) on an unclaimed instance; claim it first (pontive-spec 47): ErrResponse
- `500` Internal Server Error: ErrResponse

## Get shared credential

```http
GET https://api.{region}.pontive.com/v1/authn/connection-credentials/{credential_id}
```

Get a shared credential by id. Secrets are redacted; their presence is reported via *_set booleans.

Operation ID: `GetSharedCredential`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `credential_id` | string | yes | Shared credential ID |

### Responses

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

## Update shared credential

```http
PATCH https://api.{region}.pontive.com/v1/authn/connection-credentials/{credential_id}
```

Patch a shared credential by id. Omitted fields are unchanged; an omitted secret leaves the stored secret intact.

Operation ID: `UpdateSharedCredential`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `credential_id` | string | yes | Shared credential ID |

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

Update payload

### Responses

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

## Delete shared credential

```http
DELETE https://api.{region}.pontive.com/v1/authn/connection-credentials/{credential_id}
```

Delete a shared credential by id.

Operation ID: `DeleteSharedCredential`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `credential_id` | string | yes | Shared credential ID |

### Responses

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

## Schemas

### ListSharedCredentialsResponse

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

### ErrResponse

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

### CreateSharedCredentialRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | GoogleConfig \| LinkedInConfig \| MicrosoftConfig \| EntraConfig \| OIDCConfig \| GitHubConfig \| AppleConfig |  |  |
| `name` | string |  |  |
| `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" | yes |  |

### SharedCredential

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | GoogleConfigView \| LinkedInConfigView \| MicrosoftConfigView \| EntraConfigView \| OIDCConfigView \| GitHubConfigView \| AppleConfigView |  |  |
| `created_at` | string |  |  |
| `id` | string |  |  |
| `instance_id` | string |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" |  |  |
| `updated_at` | string |  |  |

### UpdateSharedCredentialRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `config` | GoogleConfigUpdate \| LinkedInConfigUpdate \| MicrosoftConfigUpdate \| EntraConfigUpdate \| OIDCConfigUpdate \| GitHubConfigUpdate \| AppleConfigUpdate |  |  |
| `name` | string |  |  |

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

### GoogleConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### LinkedInConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### MicrosoftConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### EntraConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `tenant_id` | string |  | TenantID is the Entra tenant substituted into the {tenant} segment of the provider's authority endpoints. Unlike Microsoft's fixed "common" authority, an Entra connection is pinned to this single tenant. |

### OIDCConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additional_authorization_params` | Record<string, string> |  |  |
| `attributes_mapping` | AttributesMapping |  |  |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `display` | "page" \| "popup" \| "touch" \| "wap" |  |  |
| `endpoints` | Endpoints |  |  |
| `prompt` | "none" \| "login" \| "consent" \| "select_account"[] |  |  |
| `use_pkce` | boolean |  | UsePKCE omitted leaves PKCE off: the generic "oidc" type is user-configured end to end and has no catalog default to inherit. An explicit value is never overridden — a false survives even where a provider default is true. |

### GitHubConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `prompt` | "none" \| "login" \| "consent" \| "select_account"[] |  |  |

### AppleConfig

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_secret` | string |  | ClientSecret is a pre-generated Apple client-secret JWT. Supplying it short-circuits derivation, making private_key/team_id/key_id unnecessary. |
| `key_id` | string |  |  |
| `private_key` | string |  | PrivateKey is the .p8 key material Apple's client secret is derived from. Required unless client_secret is supplied. |
| `service_id` | string |  |  |
| `team_id` | string |  |  |

### GoogleConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |

### LinkedInConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |

### MicrosoftConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |

### EntraConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |
| `tenant_id` | string |  |  |

### OIDCConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additional_authorization_params` | Record<string, string> |  |  |
| `attributes_mapping` | AttributesMapping |  |  |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |
| `display` | string |  |  |
| `endpoints` | Endpoints |  |  |
| `prompt` | string[] |  |  |
| `use_pkce` | boolean |  | UsePKCE is absent when the instance never set it explicitly, which leaves PKCE off for the generic "oidc" type. |

### GitHubConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret_set` | boolean |  |  |
| `prompt` | string[] |  |  |

### AppleConfigView

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_secret_set` | boolean |  |  |
| `key_id` | string |  |  |
| `private_key_set` | boolean |  |  |
| `service_id` | string |  |  |
| `team_id` | string |  |  |

### GoogleConfigUpdate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### LinkedInConfigUpdate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### MicrosoftConfigUpdate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |

### EntraConfigUpdate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `tenant_id` | string |  |  |

### OIDCConfigUpdate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `additional_authorization_params` | Record<string, string> |  |  |
| `attributes_mapping` | AttributesMapping |  |  |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `display` | string |  |  |
| `endpoints` | Endpoints |  |  |
| `prompt` | string[] |  |  |
| `use_pkce` | boolean |  |  |

### GitHubConfigUpdate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | string |  |  |
| `client_secret` | string |  |  |
| `prompt` | string[] |  |  |

### AppleConfigUpdate

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_secret` | string |  |  |
| `key_id` | string |  |  |
| `private_key` | string |  |  |
| `service_id` | string |  |  |
| `team_id` | string |  |  |

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

### AttributesMapping

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | string |  |  |
| `birthdate` | string |  |  |
| `email` | string |  |  |
| `email_verified` | string |  |  |
| `family_name` | string |  |  |
| `gender` | string |  |  |
| `given_name` | string |  |  |
| `locale` | string |  |  |
| `middle_name` | string |  |  |
| `name` | string |  |  |
| `nickname` | string |  |  |
| `phone_number` | string |  |  |
| `phone_number_verified` | string |  |  |
| `picture` | string |  |  |
| `profile` | string |  |  |
| `sub` | string |  |  |
| `updated_at` | string |  |  |
| `website` | string |  |  |
| `zoneinfo` | string |  |  |

### Endpoints

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authorization_url` | string |  |  |
| `discovery_url` | string |  |  |
| `token_url` | string |  |  |
| `user_info_url` | string |  |  |
