# Registered APIs

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

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 APIs

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

List the instance's registered APIs, the system API (the management API, read-only) included unless exclude_system.

Operation ID: `ListRegisteredAPIs`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | "active" \| "disabled" |  | Only APIs in this status |
| `exclude_system` | boolean |  | Leave the system API out |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page |

### Responses

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

## Create API

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

Register a resource server: its identifier, the resource clients send (RFC 8707) and the aud of every token issued for it, and the scopes clients may request for it. The identifier is any absolute URI or opaque string, an https URL being the form MCP clients can discover; it cannot be changed later.

Operation ID: `CreateRegisteredAPI`

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

Create API payload

### Responses

- `201` Created: RegisteredAPI
- `400` Invalid request, api_identifier_invalid, api_identifier_reserved or api_scope_invalid: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `409` api_identifier_taken: ErrResponse
- `422` api_limit_reached: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get API

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

Get a registered API by id.

Operation ID: `GetRegisteredAPI`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

### Responses

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

## Update API

```http
PATCH https://api.{region}.pontive.com/v1/apis/{api_id}
```

Change an API's name, description, scopes, token lifetime, client access, third-party switch or resource metadata; an absent field is left as it is. Scopes and resource metadata, when present, are replaced wholesale, and null clears them, as it does the description. The identifier cannot be changed. A system API refuses it; only its client grants can be changed.

Operation ID: `UpdateRegisteredAPI`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

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

Update payload

### Responses

- `200` OK: RegisteredAPI
- `400` Invalid request, or api_scope_invalid: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` api_system_immutable: ErrResponse
- `422` api_limit_reached: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete API

```http
DELETE https://api.{region}.pontive.com/v1/apis/{api_id}
```

Delete an API with its client grants and consent grants. Refresh tokens issued for it fail at their next use with invalid_target. A system API refuses it.

Operation ID: `DeleteRegisteredAPI`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

### Responses

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

## List API client grants

```http
GET https://api.{region}.pontive.com/v1/apis/{api_id}/clients
```

The API's client grants: every service account and agent of the instance that may request it, and the apps that may when client_access is selected. Each holds every scope of the API (all_scopes) or the ones named.

Operation ID: `ListRegisteredAPIClients`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

### Query parameters

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

### Responses

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

## Replace API client grants

```http
PUT https://api.{region}.pontive.com/v1/apis/{api_id}/clients
```

Replace every client grant of the API with items; [] removes them all. Each names an app, service account or agent of the instance (never a third-party app) and every scope of the API (all_scopes) or a subset of its keys. The system API (the management API) takes client grants too, the only way a service account or agent reaches the management API: each names a service account or agent (an app is api_client_invalid) with scopes exactly ["pontive:management"] (all_scopes, no scopes or any other scope is api_scope_invalid).

Operation ID: `ReplaceAPIClients`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

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

The API's client grants

### Responses

- `200` OK: ListClientGrantsResponse
- `400` Invalid request, api_client_invalid or api_scope_invalid: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `422` api_limit_reached: ErrResponse
- `500` Internal Server Error: ErrResponse

## Disable API

```http
POST https://api.{region}.pontive.com/v1/apis/{api_id}/disable
```

Refuse new token requests for the API (invalid_target). Tokens already issued for it live out their lifetime. A system API refuses it.

Operation ID: `DisableRegisteredAPI`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

### Responses

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

## Enable API

```http
POST https://api.{region}.pontive.com/v1/apis/{api_id}/enable
```

Let clients request tokens for a disabled API again.

Operation ID: `EnableRegisteredAPI`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

### Responses

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

## Get API resource metadata

```http
GET https://api.{region}.pontive.com/v1/apis/{api_id}/resource-metadata
```

The RFC 9728 protected resource metadata document for the API, which its resource server serves at /.well-known/oauth-protected-resource (with the identifier's path appended). Only an API whose identifier is an https URL has one.

Operation ID: `GetRegisteredAPIResourceMetadata`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

### Responses

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

## Import API scopes from MCP tools

```http
POST https://api.{region}.pontive.com/v1/apis/{api_id}/scopes/import
```

Propose the API's tool scopes from an MCP server's tools/list result, sent as the server returns it ({tools, nextCursor?}) with the import's options beside it; Pontive never fetches from the server. One scope per group, then one tool:<name> scope per tool in no group, with the tool's description, its title as display_name and its read-only and destructive hints. The response is the diff against the API's scopes: added, changed (with the fields that differ), removed (tool_import scopes no longer proposed, with what still names each) and unchanged. dry_run absent or true writes nothing; dry_run false writes the diff in one transaction. A removed scope is kept unless remove_missing; with it, one a client grant, consent grant or third-party profile still names refuses the import (api_scope_in_use) unless force. Manual scopes are never removed. At most 500 tools and 100 groups; the result is held to 100 scopes per API. A system API refuses it.

Operation ID: `ImportRegisteredAPIScopes`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `api_id` | string | yes | API id (api_…) |

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

The tools/list result and the import's options

### Responses

- `200` OK: ImportScopesResponse
- `400` Invalid request, api_tool_invalid or api_scope_invalid: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` Not Found: ErrResponse
- `409` api_scope_in_use or api_system_immutable: ErrResponse
- `422` api_limit_reached: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListRegisteredAPIsResponse

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

### ErrResponse

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

### CreateRegisteredAPIRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `access_token_ttl` | integer |  | AccessTokenTTL absent or 0 is the default, 900. |
| `client_access` | "all" \| "selected" |  | ClientAccess absent is the default, all. |
| `description` | string |  |  |
| `identifier` | string |  |  |
| `name` | string |  |  |
| `resource_metadata` | ResourceMetadata |  | ResourceMetadata, when present, replaces the metadata wholesale; null clears it. |
| `scopes` | Scope[] |  |  |
| `third_party` | boolean |  |  |

### RegisteredAPI

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `access_token_ttl` | integer |  | AccessTokenTTL is the lifetime of tokens issued for the API, in seconds: 60 to 86400. |
| `client_access` | "all" \| "selected" |  | ClientAccess governs apps only: all lets every app of the instance request the API, selected only those with a client grant. Service accounts and agents always need a grant (44 §7). |
| `created_at` | string |  |  |
| `description` | string |  |  |
| `id` | string |  |  |
| `identifier` | string |  | Identifier is immutable: any absolute URI or opaque string, https URLs normalised (44 §4). |
| `instance_id` | string |  |  |
| `name` | string |  |  |
| `object` | string |  |  |
| `resource_metadata` | ResourceMetadata |  | ResourceMetadata, when present, replaces the metadata wholesale; null clears it. |
| `scopes` | Scope[] |  |  |
| `status` | "active" \| "disabled" |  |  |
| `system` | boolean |  | System is true only for the management API, which nobody can change but for its client grants (PUT /apis/{api_id}/clients). |
| `third_party` | boolean |  | ThirdParty is whether third-party (CIMD, DCR) clients may request it. |
| `updated_at` | string |  |  |

### UpdateRegisteredAPIRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `access_token_ttl` | integer |  |  |
| `client_access` | "all" \| "selected" |  |  |
| `description` | string |  | Description: absent leaves it, null or "" clears it. |
| `name` | string |  |  |
| `resource_metadata` | ResourceMetadata |  | ResourceMetadata, when present, replaces the metadata wholesale; null clears it. |
| `scopes` | Scope[] |  | Scopes, when present, replace the API's scopes wholesale; null or [] clears them. |
| `third_party` | boolean |  |  |

### ListClientGrantsResponse

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

### SetClientGrantsRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | ClientGrant[] |  |  |

### ResourceMetadataDocument

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authorization_servers` | string[] |  |  |
| `bearer_methods_supported` | string[] |  |  |
| `logo_uri` | string |  |  |
| `resource` | string |  |  |
| `resource_documentation` | string |  |  |
| `resource_name` | string |  |  |
| `scopes_supported` | string[] |  |  |

### ImportScopesRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dry_run` | boolean |  | DryRun absent or true: return the diff and write nothing. |
| `force` | boolean |  | Force, with remove_missing, removes them even while a client grant, consent grant or third-party profile names them. |
| `groups` | ToolGroup[] |  | Groups are at most 100. |
| `nextCursor` | string |  | NextCursor set means the result is one page of several, which is refused (api_tool_invalid): send every page's tools at once. |
| `remove_missing` | boolean |  | RemoveMissing removes the tool_import scopes the result no longer proposes; without it they are kept and listed with action keep. |
| `tools` | MCPTool[] |  | Tools are the tools/list result's: 1 to 500, each name once. |

### ImportScopesResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `added` | Scope[] |  | Added are new keys, in proposal order. |
| `api` | RegisteredAPI |  |  |
| `changed` | ScopeChange[] |  | Changed, removed and unchanged are in the API's scope order. |
| `dry_run` | boolean |  | DryRun is whether nothing was written. |
| `object` | string |  |  |
| `removed` | RemovedScope[] |  |  |
| `unchanged` | Scope[] |  |  |

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

### ResourceMetadata

ResourceMetadata, when present, replaces the metadata wholesale; null
clears it.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `logo_uri` | string |  |  |
| `resource_documentation` | string |  |  |
| `resource_name` | string |  |  |

### Scope

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Description is the scope's label on the consent screen, 1 to 200 characters. |
| `display_name` | string |  | DisplayName is a short name shown above the description, at most 80 characters: an imported tool's title, or a group's name. |
| `key` | string |  | Key is [a-z0-9][a-z0-9:._-]{0,63}, unique within the API. The OIDC scopes and anything starting with pontive: or sys: are refused. |
| `origin` | "manual" \| "tool_import" |  | Origin is manual or tool_import; absent on a write is manual. Tool import removes only tool_import scopes. |
| `tools` | ScopeTool[] |  | Tools are the MCP tools a tool_import scope covers, sorted by name; [] on a manual scope. A write that changes a tool_import scope sends its tools back, or the scope is refused. |

### ClientGrant

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `all_scopes` | boolean |  | AllScopes is every scope of the API, now and later; scopes is then empty. |
| `client_id` | string |  | ClientID is an app_, svc_ or agt_ id of the instance; never a third-party app. On the system API only a svc_ or agt_ id, with scopes exactly ["pontive:management"]. |
| `scopes` | string[] |  |  |

### ToolGroup

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string |  | Description is 1 to 200 characters. |
| `display_name` | string |  | DisplayName is optional, at most 80 characters. |
| `scope` | string |  | Scope is the key, under the scope key rules. |
| `tools` | string[] |  | Tools are names from the tools/list result. |

### MCPTool

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `annotations` | MCPToolAnnotations |  |  |
| `description` | string |  |  |
| `inputSchema` | object |  |  |
| `name` | string |  | Name is 1 to 128 of A-Z, a-z, 0-9, _, - and . (the MCP charset). |
| `title` | string |  |  |

### ScopeChange

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `after` | Scope |  |  |
| `before` | Scope |  |  |
| `fields` | "description" \| "display_name" \| "origin" \| "tools"[] |  | Fields are the fields that differ. |

### RemovedScope

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | "keep" \| "remove" \| "blocked" |  | Action is keep (remove_missing off), remove (removed; on a dry run, would be) or blocked (named, force off: applying is refused). |
| `references` | ScopeReferences |  |  |
| `scope` | Scope |  |  |

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

### ScopeTool

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destructive` | boolean |  | Destructive is the tool's effective destructiveHint: MCP defaults it to true for a tool that is not read-only. |
| `name` | string |  | Name is the tool's MCP name, case-sensitive. |
| `read_only` | boolean |  | ReadOnly is the tool's readOnlyHint. |
| `title` | string |  | Title is the tool's title, when the server gave one. |

### MCPToolAnnotations

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `destructiveHint` | boolean |  |  |
| `idempotentHint` | boolean |  |  |
| `openWorldHint` | boolean |  |  |
| `readOnlyHint` | boolean |  |  |
| `title` | string |  |  |

### ScopeReferences

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client_grants` | integer |  | ClientGrants list the scope (an all-scopes grant names none). |
| `consent_grants` | integer |  | ConsentGrants are users' grants for the API holding it. |
| `profile_entries` | integer |  | ProfileEntries are third-party client profile entries listing it. |
