# Widgets

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

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.

## Get the pontkit release

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

The exact @pontive/pontkit-core release this instance loads: the deployment's, or the instance's operator-set override. This is the ONLY source clients use to decide which CDN bundle to load — resolving a version client-side would let a preview show a build production does not serve. Short-lived cache: a promotion takes effect without a deploy.

Operation ID: `GetPontkit`

### Responses

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

## Schemas

### PontkitReleaseResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `catalog_revision` | integer |  | CatalogRevision is the platform element-catalog revision in effect. |
| `deployment` | PontkitRelease |  | Override is this project's canary, absent when it follows the deployment. |
| `object` | string |  |  |
| `override` | PontkitRelease |  | Override is this project's canary, absent when it follows the deployment. |
| `version` | string |  | Version is the effective release for this project. |

### ErrResponse

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

### PontkitRelease

Override is this project's canary, absent when it follows the deployment.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `changed_at` | string |  |  |
| `changed_by` | string |  |  |
| `integrity` | Integrity |  | Integrity is optional but strongly recommended: without it browsers load the release from the platform origin without SRI. |
| `version` | string |  | Version is the exact release to load from the CDN, never a range. |

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

### Integrity

Integrity is optional but strongly recommended: without it browsers load
the release from the platform origin without SRI.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `css` | string | yes |  |
| `js` | string | yes |  |

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