# Pontive documentation (all pages) > Every page of https://www.pontive.com/docs as Markdown, in sidebar order. The index with instructions for coding agents is https://www.pontive.com/llms.txt. # Overview > What Pontive is, how workspaces, projects and instances fit together, development and production instances, and the hosts and credentials an app uses. Source: https://www.pontive.com/docs Pontive is one platform for a product's identity and access: sign-in and sessions, organizations, roles and fine-grained permissions, the apps, APIs and AI agents that act for your users, and subscriptions and billing. Your app signs people in through Pontive and reads who they are and what they may do from Pontive's tokens; your servers verify those tokens; Pontive's APIs configure the rest. Sign-in, sessions on the server and the account menu in a Next.js app. Sign-in in a React single-page app built with Vite. Verify Pontive access tokens in your API, in TypeScript or any language. Configure Pontive from Claude, ChatGPT, Codex, Claude Code or Cursor. ## Workspaces, projects and instances [#workspaces-projects-and-instances] | Level | Id | What it holds | | --- | --- | --- | | **Workspace** | `ws_…` | Your Pontive account: the plan and billing, and the people who use the dashboard. | | **Project** | `proj_…` | One product: its name, region, tenancy mode and its instances. | | **Instance** | `inst_…` | The isolation boundary: users, organizations, sessions, keys, the auth domain and issuer, roles, resource types, apps, APIs, webhook subscriptions and branding. | Everything your app touches lives in one instance. A token issued by one instance is never valid at another, even a sibling instance of the same project. A project's **tenancy mode** is chosen when it is created and never changes: `b2b` (your customers are organizations, and users act inside them) or `b2c` (individual users, no organizations). ## Development and production instances [#development-and-production-instances] Every instance has an environment, fixed when it is created: - **Non-production** (development, staging, QA…). A project starts with one, and you can add more, each with a name and slug you choose. Build and test against these. They are not billed. - **Production**. At most one per project, created when you are ready to ship. The environment decides which domain serves the instance, so a production cookie can never reach a non-production instance: ```txt {project-slug}.auth.{region}.pontive.app production {project-slug}-{instance-slug}.auth.{region}.pontive.dev non-production ``` Configuration (apps, roles, branding, webhooks) belongs to each instance, so a change in a development instance never reaches production. ## Hosts [#hosts] | Host | What it serves | | --- | --- | | Your **auth domain**, e.g. `acme-dev.auth.us.pontive.dev`, or a custom domain | The instance's issuer: OpenID Connect and OAuth 2 (`/.well-known/openid-configuration`, `/oauth2/*`), the endpoints pontkit's components call (`/v1/frontend`), and the signed-in user's own account (`/v1/me`). | | `https://api.{region}.pontive.com/v1` | The [management API](/docs/api-reference/management/users): users, organizations, roles, apps, APIs, agents, webhooks, billing. | | `https://authz.{region}.pontive.com` | The [authorization API](/docs/api-reference/authz/authzen): AuthZEN permission checks on your request path. | | `https://ingest.{region}.pontive.com` | The [usage ingest API](/docs/api-reference/ingest/billing-usage): metered usage for billing. | | `https://api.pontive.com/v1` | The [platform API](/docs/api-reference/platform/workspaces): workspaces, projects and instances. | | `https://mcp.pontive.com/mcp` | The [Pontive MCP server](/docs/guides/pontive-mcp-server), for AI clients, for instances in every region. | | `https://www.pontive.com/docs/mcp` | The [docs MCP server](/docs/guides/docs-mcp-server): searches and reads these docs, no sign-in. | `{region}` is the project's region, such as `us`, `eu` or `au`. ## Credentials [#credentials] | Credential | Looks like | Where it may live | | --- | --- | --- | | App id | `app_…` | Anywhere, including browser code. It is public. | | Auth domain | a hostname | Anywhere. It is public. | | Secret key | `pontive_sk_live_us_…`, `pontive_sk_test_us_…` | Server-side environment variables only. It acts as a service account on one instance, for the management API and the MCP server. Pontive refuses it from a browser. | | Client secret | created in the dashboard | Server-side only: a confidential app's or a service account's secret. | | Access token | a JWT (`typ: at+jwt`) | Sent as `Authorization: Bearer …` to your API or Pontive's. Short-lived. | Pontive has no publishable key: browser code needs only the app id and the auth domain. Keep secret keys, client secrets and session secrets in server-side environment variables. Never put one in a `NEXT_PUBLIC_` or `VITE_` variable, in browser code, or in a committed file. Examples in these docs use placeholders such as `pontive_sk_test_...`. ## For AI coding agents [#for-ai-coding-agents] These docs are written to be read by coding agents as well as people: - [`/llms.txt`](/llms.txt) opens with instructions for agents and lists every page. - [`/llms-full.txt`](/llms-full.txt) is every page in one file. - Every page is Markdown at its URL plus `.md` (this one is [`/docs.md`](/docs.md)), and at its own URL when requested with `Accept: text/markdown`. - The [docs MCP server](/docs/guides/docs-mcp-server), `https://www.pontive.com/docs/mcp`, lets an agent search and read them, and get the documented setup for its framework, with no sign-in. - [Agent Skills and plugins](/docs/agent-skills): `npx skills add pontivehq/skills`, or the `pontive` plugin for Claude Code, Codex, Cursor and Copilot, teach an agent to add sign-in, protect APIs and MCP servers, model organizations and migrate users. --- # Quickstart: Next.js > Add Pontive sign-in to a Next.js App Router app, with the auth endpoints on your own origin, the session readable on the server and the account menu in the header. Source: https://www.pontive.com/docs/quickstart/nextjs By the end of this page your Next.js app has sign-in and sign-up pages, a header that knows who is signed in, and server components that read the session. It follows the working [Pontive Next.js demo](https://github.com/revotech-group/pontive-next-demo): `@pontive/pontkit-nextjs` for the components and the server, and a rewrite that serves Pontive's auth endpoints from your app's own origin so every auth cookie is first-party. The code is for the App Router. ## 1. Set up the app in Pontive [#1-set-up-the-app-in-pontive] In the Pontive dashboard, on a **non-production instance** of your project (see [development and production](/docs#development-and-production-instances)): 1. Create an app for this site and copy its **app id** (`app_…`). 2. Copy the instance's **auth domain**, e.g. `acme-x7k2p9qa-dev.auth.us.pontive.dev`. 3. Add your origins to the app's **allowed origins**: `https://localhost:3000` for local development (the dev server below serves HTTPS, and `http://` would be a different origin) and each deployed URL. An origin that is not registered is refused with `403 permission_denied`. 4. If you use the account menu (step 5), add `offline_access`, `pontive:me:read` and `pontive:me:manage` to the app's **allowed scopes** and turn **refresh tokens** on. A sign-in that asks for a scope the app does not allow is refused. The dashboard labels in this step are written from the API's field names (allowed origins, allowed scopes, refresh tokens) and have not been checked against the current dashboard. ## 2. Install the SDK [#2-install-the-sdk] ```sh npm install @pontive/pontkit-nextjs ``` `@pontive/pontkit-nextjs` brings `@pontive/pontkit-react` (the components) and `@pontive/pontkit-server` (sessions). The components themselves are web components that the SDK loads from Pontive's CDN at the release the platform names; there is nothing else to install. ## 3. Environment variables [#3-environment-variables] ```sh title=".env.local" # The instance's auth domain. Read by next.config.mjs and the server; never sent to the browser. PONTIVE_AUTH_HOST=acme-x7k2p9qa-dev.auth.us.pontive.dev # What the browser SDK calls: a path on this app's own origin, rewritten onto PONTIVE_AUTH_HOST. NEXT_PUBLIC_PONTIVE_AUTH_DOMAIN=/__pontive NEXT_PUBLIC_PONTIVE_APP_ID=app_... # The management API host the account widgets call with the user's token. NEXT_PUBLIC_PONTIVE_API_BASE_URL=https://api.us.pontive.com ``` None of these is a secret: the app id and the auth domain are public. Keep `PONTIVE_AUTH_HOST` without the `NEXT_PUBLIC_` prefix so the browser only ever knows the `/__pontive` path. ## 4. Serve the auth endpoints from your origin [#4-serve-the-auth-endpoints-from-your-origin] ```js title="next.config.mjs" import { authProxyRewrites } from "@pontive/pontkit-nextjs/server"; const nextConfig = { async rewrites() { return authProxyRewrites({ authHost: process.env.PONTIVE_AUTH_HOST }); }, }; export default nextConfig; ``` This forwards `/__pontive/v1/frontend/*`, `/__pontive/v1/me/*` and `/__pontive/oauth2/*` to the auth domain. A rewrite to an external destination sends the destination's `Host`, which is what the auth server needs to know which instance it is answering for. If `next.config` already has `rewrites`, spread `authProxyRewrites(...)` into the array it returns. Why this matters, and recipes for other hosts: [the auth proxy](/docs/sdk/auth-proxy). ## 5. The provider, sign-in and sign-up [#5-the-provider-sign-in-and-sign-up] The components use hooks, so they are mounted from a client component. ```tsx title="components/providers.tsx" "use client"; import { Provider } from "@pontive/pontkit-nextjs"; /** * `scope` replaces the default `openid email profile`, so those stay listed. * `offline_access pontive:me:read pontive:me:manage` let the account menu read * and change the signed-in user; the app must allow all three (step 1). */ const SCOPE = "openid email profile offline_access pontive:me:read pontive:me:manage"; export function Providers({ children }: { children: React.ReactNode }) { return ( {children} ); } ``` ```tsx title="components/site-header.tsx" "use client"; import Link from "next/link"; import { AccountMenu, SignedIn, SignedOut } from "@pontive/pontkit-nextjs"; export function SiteHeader() { return (
Home Sign in Sign up
); } ``` ```tsx title="app/layout.tsx" import { Providers } from "@/components/providers"; import { SiteHeader } from "@/components/site-header"; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( {children} ); } ``` ```tsx title="app/signin/page.tsx" "use client"; import { Signin } from "@pontive/pontkit-nextjs"; export default function SignInPage() { return ; } ``` ```tsx title="app/signup/page.tsx" "use client"; import { Signup } from "@pontive/pontkit-nextjs"; export default function SignUpPage() { return ; } ``` `` and `` render the sign-in and sign-up flows configured on the instance, with its branding. After sign-in the user is sent to `signinRedirectUrl`. `SignedIn` and `SignedOut` render nothing until the session has been restored, so there is no flash of the wrong state. ## 6. Read the session on the server [#6-read-the-session-on-the-server] ```ts title="lib/pontive.ts" import { pontiveAuth, type PontiveAuth } from "@pontive/pontkit-nextjs/server"; // Built on first use, so PONTIVE_AUTH_HOST is read at request time rather than at build. let instance: PontiveAuth | null = null; export function pontive(): PontiveAuth { instance ??= pontiveAuth({ issuer: `https://${process.env.PONTIVE_AUTH_HOST}`, // the instance's issuer is its auth domain clientId: process.env.NEXT_PUBLIC_PONTIVE_APP_ID!, authPath: process.env.NEXT_PUBLIC_PONTIVE_AUTH_DOMAIN || "/__pontive", }); return instance; } ``` ```ts title="proxy.ts" import type { NextRequest } from "next/server"; import { pontive } from "@/lib/pontive"; // Next 16 calls this file proxy.ts; on Next 15 it is middleware.ts, exporting `middleware`. export function proxy(req: NextRequest) { return pontive().middleware(req); } export const config = { // Not the auth endpoints themselves, Next's internals or static files. matcher: ["/((?!__pontive|_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|ico|css|js|map|txt)$).*)"], }; ``` ```ts title="app/api/auth/[...pontive]/route.ts" import { pontive } from "@/lib/pontive"; // The SDK's server routes, such as /api/auth/switch-organization. export function GET(request: Request) { return pontive().handlers.GET(request); } export function POST(request: Request) { return pontive().handlers.POST(request); } ``` ```tsx title="app/account/page.tsx" import { pontive } from "@/lib/pontive"; export const dynamic = "force-dynamic"; export default async function AccountPage() { const session = await pontive().auth(); if (!session) return

Not signed in.

; return (

Signed in as {session.user.email ?? session.user.id}

{session.organization ? (

Organization {session.organization.id}, roles {session.organization.roles.join(", ") || "none"}

) : null}
); } ``` There is no client secret here, so the SDK runs in **browser mode**: the components sign the user in and are the only thing that refreshes tokens. Through the `/__pontive` rewrite the auth server keeps an HttpOnly access-token cookie on your origin; `auth()` verifies it against the instance's keys, and the proxy sends a signed-in page load whose token has lapsed through the auth server's session handshake and straight back. For a confidential app whose server signs in and refreshes itself, see [server sessions](/docs/sdk/server-sessions). ## 7. Run it [#7-run-it] ```sh npx next dev --experimental-https ``` Open `https://localhost:3000/signup`, create an account, and you land back on `/` signed in, with the account menu in the header. To check the rewrite and the `Host` it sends, against your running app: ```sh curl -ik -X POST https://localhost:3000/__pontive/oauth2/token # 400 with "grant_type is required" means the request reached your instance's auth server ``` HTML back instead means the rewrite did not match and Next served the app itself. ## Deploying [#deploying] Set the same four variables in your host's environment, and register the deployed URL as an allowed origin on the app. That one registration covers both the auth server and the management API's origin check on the account widgets' calls. Use a production instance's app and auth domain only for the production deployment. ## Next steps [#next-steps] - [Organizations and roles](/docs/guides/organizations-and-roles): `session.organization`, the organization switcher and member management. - [Protect an API](/docs/guides/protect-an-api): verify the user's token in your own API. - [The framework bindings](/docs/sdk/bindings): every component, prop and event. --- # Quickstart: React SPA > Add Pontive sign-in to a React single-page app built with Vite and React Router, with protected routes and the account menu. Source: https://www.pontive.com/docs/quickstart/react By the end of this page your React app has sign-in and sign-up pages, routes only signed-in users reach, and an account menu. It follows Pontive's React demo: `@pontive/pontkit-react` in a Vite app with React Router. ## 1. Set up the app in Pontive [#1-set-up-the-app-in-pontive] In the Pontive dashboard, on a **non-production instance** of your project: 1. Create an app for this SPA and copy its **app id** (`app_…`) and the instance's **auth domain**, e.g. `acme-x7k2p9qa-dev.auth.us.pontive.dev`. 2. Add your origins to the app's **allowed origins**: `http://localhost:5173` for the Vite dev server, and each deployed URL. 3. If you use the account menu, add `offline_access`, `pontive:me:read` and `pontive:me:manage` to the app's **allowed scopes** and turn **refresh tokens** on. The dashboard labels in this step are written from the API's field names and have not been checked against the current dashboard. ## 2. Install the SDK [#2-install-the-sdk] ```sh npm install @pontive/pontkit-react npm install --save-dev @pontive/pontkit-loader ``` `@pontive/pontkit-react` has the provider, the hooks and the components, and brings the browser OIDC client (`@pontive/oidc-client`) with it. `@pontive/pontkit-loader` is only needed for the Vite dev-server proxy below. ## 3. Serve the auth endpoints from your origin [#3-serve-the-auth-endpoints-from-your-origin] A browser treats a cookie as first-party only when it comes from the origin the page is on, and Safari blocks third-party cookies outright. So the SPA calls the auth endpoints on its own origin, under `/__pontive`, and something forwards them to the auth domain. In development that is Vite's proxy: ```ts title="vite.config.ts" import { defineConfig, loadEnv } from "vite"; import react from "@vitejs/plugin-react"; import { viteAuthProxy } from "@pontive/pontkit-loader/proxy"; export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), ""); return { plugins: [react()], server: { proxy: viteAuthProxy({ authHost: env.PONTIVE_AUTH_HOST }) }, }; }); ``` ```sh title=".env.local" # Read by vite.config.ts only. Not VITE_-prefixed, so it is never bundled. PONTIVE_AUTH_HOST=acme-x7k2p9qa-dev.auth.us.pontive.dev VITE_PONTIVE_AUTH_DOMAIN=/__pontive VITE_PONTIVE_APP_ID=app_... VITE_PONTIVE_API_BASE_URL=https://api.us.pontive.com ``` In production, add the same forwarding where the built app is hosted: Vercel, Netlify, Cloudflare, CloudFront, nginx and Caddy recipes are in [the auth proxy](/docs/sdk/auth-proxy). A host that only serves files (GitHub Pages, a bare S3 website) cannot forward; use a custom auth domain on your own site instead and set `VITE_PONTIVE_AUTH_DOMAIN` to it. ## 4. The provider and the routes [#4-the-provider-and-the-routes] ```tsx title="src/App.tsx" import { BrowserRouter, Route, Routes, useNavigate } from "react-router-dom"; import { AccountMenu, Authenticated, Provider, SignedIn, SignedOut, Signin, Signup } from "@pontive/pontkit-react"; /** * `scope` replaces the default `openid email profile`, so those stay listed. * The other three let the account menu read and change the signed-in user; * the app must allow them and have refresh tokens on. */ const SCOPE = "openid email profile offline_access pontive:me:read pontive:me:manage"; /** A route only a signed-in user may see; others go to the sign-in page through the router. */ function Guarded({ children }: { children: React.ReactNode }) { const navigate = useNavigate(); return navigate(url)}>{children}; } function Header() { return (
Sign in
); } export default function App() { return (
Home

} /> } /> } />

Only signed-in users see this.

} />
); } ``` - `` and `` render the flows configured on the instance, with its branding. Their routes end in `/*` because a flow can move through sub-paths. - `` waits for the session to be restored, then renders its children for a signed-in user and sends anyone else to `signinUrl`. By default that is a full page load; `onRedirect` hands it to React Router instead. If the app runs under a base path, strip it from `url` before calling `navigate`, which adds it back. - `` and `` render nothing until the session is known, so there is no flash of the wrong state. ## 5. Run it [#5-run-it] ```sh npm run dev ``` Open `http://localhost:5173/signup`, create an account, and you land on `/` signed in. ## Using the session in code [#using-the-session-in-code] ```tsx import { useAuthState, useSession } from "@pontive/pontkit-react"; function Status() { const { isAuthenticated, resolved } = useAuthState(); // nothing is known until resolved const change = useSession(); // the last change: { reason, isAuthenticated, organizationId } or null if (!resolved) return null; return

{isAuthenticated ? `Signed in${change?.organizationId ? ` to ${change.organizationId}` : ""}` : "Signed out"}

; } ``` The account menu signs the user out. For calls the components do not make (`signOut()`, `getOrganization()`, `switchOrganization()`), import `Auth` from `@pontive/oidc-client`: it is the singleton the provider configured, as long as your app resolves the same copy `@pontive/pontkit-react` depends on. Never call `Auth.configure()` yourself; pass your own callbacks to the provider's `config` prop. The client's methods are in its README on npm. Calling your own API from the SPA with a token issued for it (`resource`) is not shown here yet: the browser SDK's documented token methods are for Pontive's own APIs. See [Protect an API](/docs/guides/protect-an-api) for the API side. ## Next steps [#next-steps] - [The framework bindings](/docs/sdk/bindings): every component, prop and event. - [Organizations and roles](/docs/guides/organizations-and-roles). --- # Unclaimed instances > Start building with no Pontive account. An unclaimed development instance works at once, is deleted after 7 days, and moves intact into your workspace when you claim it. Source: https://www.pontive.com/docs/unclaimed-instances An **unclaimed instance** is a development instance that nobody owns yet. A coding agent, the `pontive` CLI or pontkit's dev server creates one with no Pontive account, writes its credentials into your project, and your app signs people in on your machine straight away. When you want to keep it, you sign in to Pontive (or sign up) and **claim** it into a workspace. Nothing in your app changes when you do: the same issuer, app, keys and users keep working. An instance nobody claims is deleted, with its users, **7 days** after it was created. ## Create one [#create-one] **With the CLI** (Node 20 or later), in your app's directory: ```sh npx pontive@latest init ``` When you are not signed in to Pontive, `init` creates an unclaimed instance and writes its credentials to `.env.local` and `.pontive/keyless.json`, both added to `.gitignore`. In a coding agent's session it runs without prompts and prints JSON. `--region us|eu|au` chooses the region; otherwise it is the region nearest you. **With pontkit's dev server:** a Next.js app on `@pontive/pontkit-nextjs` (or a server on `@pontive/pontkit-server`) running `npm run dev` with no `PONTIVE_ISSUER` creates one on first start and writes the same files. This happens only when `NODE_ENV` is `development`; `PONTIVE_KEYLESS=0` turns it off, and a production build never does it. **With the API**, for an agent without a shell CLI: `POST https://api.pontive.com/v1/unclaimed-instances`, with no credential. [`/auth.md`](https://pontive.com/auth.md) shows the whole call, including how to receive the secrets encrypted to a key the agent generates. The instance gets a `b2c` project (or `b2b` if asked) with one development instance, one app with loopback redirect URIs, and a `developer` secret key named `keyless`. ## How you are told it is unclaimed [#how-you-are-told-it-is-unclaimed] | Where | What | | --- | --- | | Your app, in the browser | pontkit shows a banner: "Unclaimed development instance. Pontive deletes it on *date*, with its users. Claim it to keep it." From 24 hours before deletion it cannot be dismissed. | | Pontive's hosted sign-in pages | A ribbon: "Development instance · unclaimed · deleted on *date*". | | API responses | Every response to the instance's credentials carries `Sunset: ` (RFC 8594) and `Link: ; rel="sunset"`. | | The CLI | `npx pontive status` shows the deletion date, or that it is claimed. | | The frontend runtime config | `unclaimed: { "expires_at": "…" }`, or `null` once claimed. | There is no email: nobody's address is known until the claim. ## Limits [#limits] An unclaimed instance has the **Free plan's** features and caps (for example 10,000 monthly active users, 2 apps, 5 organizations), applied to the instance on its own, and these limits on top: | Limit | Value | | --- | --- | | Lifetime | 7 days from creation, then deleted with everything in it. Never extended: claiming is the only way to keep it | | Creations per caller | 3 per IP address per rolling 24 hours (an IPv6 /64 counts as one address), and a daily ceiling per network. Beyond it: `429 unclaimed_instance_limit` with `Retry-After` | | Instances | Its one development instance. No production instance and no second instance until it is claimed | | Redirect URIs, allowed origins | Loopback only: `localhost`, `127.0.0.1`, `[::1]`, over `http` or `https`; anything else is `422 redirect_uri_not_loopback`. Registered without a port, they match any port, as on every development instance | | Email | Sign-in email only (verification codes and links, sign-in links, password resets), in fixed wording with no app name, from `no-reply@pontive.com`: 100 a day per instance, 5 an hour to one address. Invitations are created but not emailed. Beyond a limit: `429 email_limit_reached` | | Branding, email templates, localization | Pontive's defaults, read-only | | Not available | Custom domains, webhook subscriptions, generic OIDC and SAML connections, trusted issuers, third-party clients, other secret keys | What the instance may not do answers `403 instance_unclaimed`. Every limit lifts at the claim, when the instance becomes an ordinary development instance of your workspace. ## Claim [#claim] You need a Pontive account, or create one on the way. In the app's directory: ```sh npx pontive claim ``` It opens a **claim link** (in an agent's session it prints it for you to open), waits while you sign in or sign up, choose the workspace and confirm, and then forgets the claim token. You can also follow the banner's *Claim it* link, or ask your coding agent, which mints the link with the same API call ([`/auth.md`](https://pontive.com/auth.md), section 6). - A claim link lasts **one hour** and works **once**; mint another whenever you need one. It never contains the claim token, which stays in `.pontive/keyless.json` on your machine. - **Which workspace:** one where you are an owner or admin, or a new one. A Free workspace takes it only if it holds no project yet (Free has one); a paid workspace takes it as an additional project, and the claim page shows what that adds to your bill before you confirm. - **Region and tenancy mode** do not change: they are fixed when the instance is created. Whoever holds the claim token can claim the instance, so keep `.pontive/` out of git and never paste the token anywhere. A leaked claim token reported by GitHub secret scanning is disabled; the instance then can only expire. ## What survives a claim [#what-survives-a-claim] | Thing | After the claim | | --- | --- | | Instance id, project id, issuer, auth domain, signing keys | Unchanged | | Users, sessions, organizations, roles, resource types, apps, client secrets, settings, auth flows | Unchanged: nothing inside the instance is rewritten | | The `keyless` secret key | Keeps working. It is listed under the instance's API keys, created by "Pontive (keyless)"; rotate or revoke it like any other | | The claim token and claim links | Stop working | | The limits above | Lifted; the branding is yours to edit | | `expires_at`, `Sunset`, the banner and the ribbon | Gone | | Plan, features and caps | Your workspace's, from the moment of the claim | | Usage and billing | Counted toward your workspace from the claim; nothing before it is ever billed. On a paid plan the project is charged as any added project, prorated from the claim | ## Errors [#errors] | Code | Status | Meaning | | --- | --- | --- | | `unclaimed_instance_limit` | 429 | This IP address or network has created its share today; wait `Retry-After` seconds | | `unclaimed_instances_unavailable` | 503 | Creation is paused or at capacity; retry after `Retry-After` with the same `X-Idempotency-Key` | | `caller_blocked` | 403 | This address or network may not create unclaimed instances | | `redirect_uri_not_loopback` | 422 | A redirect URI or origin is not loopback | | `invalid_region` | 422 | Not `us`, `eu` or `au` | | `invalid_encryption_key` | 422 | Not a public P-256 or X25519 JWK, or it carries a private part | | `instance_unclaimed` | 403 | The action needs a claimed instance | | `email_limit_reached` | 429 | The instance's development email limits | | `unclaimed_instance_not_found` | 404 | Unknown or expired instance, or a wrong claim token | | `claim_link_invalid` | 404 | The claim link is unknown, expired or already used | | `instance_claimed` | 409 | Already claimed | A secret key that worked and now answers `401` means the instance expired or its new owner revoked the key. The CLI and pontkit stop and say so; they never create a replacement silently, since a new instance would have none of the users you created. `npx pontive init --reset` starts over with a new one. --- # Agent Skills and plugins > Teach Claude Code, Cursor, Codex, GitHub Copilot and other coding agents to build on Pontive with Pontive's Agent Skills, and install them as a plugin with the Pontive MCP servers. Source: https://www.pontive.com/docs/agent-skills Pontive publishes **Agent Skills**: short, task-shaped instructions a coding agent loads when the task calls for them, such as adding sign-in to a Next.js app or migrating users from Auth0. Each one says when it applies, gives the code the agent needs, and points to these docs for the rest. They live in one public repository, [`pontivehq/skills`](https://github.com/pontivehq/skills), MIT licensed, in the [Agent Skills](https://agentskills.io/specification) format. The **`pontive` plugin** packages every skill with Pontive's two MCP servers, so one install gives an agent the skills, the docs tools and the tools that configure your instance. ## Install the skills in any agent [#install-the-skills-in-any-agent] ```sh npx skills add pontivehq/skills ``` [`skills`](https://github.com/vercel-labs/skills) installs into Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI and many other agents, and asks which. `--skill pontive-nextjs` installs one skill; `--list` shows them all. It installs the skills only, not the MCP servers. ## Install the plugin [#install-the-plugin] **Claude Code**: ```sh /plugin marketplace add pontivehq/skills /plugin install pontive@pontive ``` Then run `/mcp` and authenticate the `pontive` server to sign in to Pontive. **Codex**: ```sh codex plugin marketplace add pontivehq/skills codex plugin add pontive@pontive ``` **GitHub Copilot CLI**: ```sh copilot plugin marketplace add pontivehq/skills copilot plugin install pontive@pontive ``` **Cursor**: the repository carries a Cursor plugin (`.cursor-plugin/plugin.json`), which is not in the Cursor Marketplace yet. Add the repository as a marketplace from the Cursor CLI, then install `pontive` from `/plugin`: ```sh cursor-agent plugin marketplace add https://github.com/pontivehq/skills ``` Or connect only the [docs MCP server](/docs/guides/docs-mcp-server), which has a one-click Cursor link. ## What the plugin adds [#what-the-plugin-adds] | | | | --- | --- | | Every skill below | Loaded by the agent when a task matches its description | | The [Pontive MCP server](/docs/guides/pontive-mcp-server), `https://mcp.pontive.com/mcp` | Configures your instances as you, after you sign in: apps, APIs, roles, organizations, users, agents. It never reveals a secret | | The [docs MCP server](/docs/guides/docs-mcp-server), `https://www.pontive.com/docs/mcp` | `search_docs`, `get_doc`, `list_docs` and `get_integration_guide`, no sign-in | ## The skills [#the-skills] | Skill | Use it to | | --- | --- | | `pontive-start` | Start with no Pontive account: an unclaimed development instance and a claim link ([`/auth.md`](/auth.md) is the same text) | | `pontive-nextjs` | Add sign-in, sessions and the account menu to a Next.js App Router app | | `pontive-react` | Add sign-in and protected routes to a React single-page app | | `pontive-vue` | Mount Pontive's components in a Vue 3 app | | `pontive-express` | Server-side sign-in and sessions in Express, Node, Hono, Workers, Bun or Deno | | `pontive-protect-api` | Accept only Pontive access tokens issued for your API | | `pontive-protect-mcp-server` | Make Pontive the authorization server of your MCP server | | `pontive-organizations-and-roles` | Organizations, roles, permissions, `org_id` and the access-token claims template | | `pontive-agents-and-delegation` | Agents with their own identity, acting for users through delegation | | `pontive-supabase` | Supabase trusts Pontive's tokens; row-level security on `org_id` | | `pontive-builder-previews` | Sign-in in Lovable, v0, Vercel, Replit, Bolt and CodeSandbox previews | | `pontive-migrate` | Move users and organizations from Auth0, Clerk, Supabase, Firebase, Cognito or NextAuth | ## Discovery over HTTP [#discovery-over-http] Agents that look for skills on a site read [`/.well-known/agent-skills/index.json`](/.well-known/agent-skills/index.json): every skill above, its description, its `SKILL.md` URL and the SHA-256 of the file served. The files are copied from the repository when this site is built, so the index and the repository always list the same skills. ## Tell every agent in your project [#tell-every-agent-in-your-project] Add a short "Using Pontive" block to your app's `AGENTS.md`, which Codex, Cursor, Lovable, Claude Code and others read: where these docs and the MCP servers are, the package names and the rules that matter most. Copy it from [`snippets/AGENTS.md`](https://github.com/pontivehq/skills/blob/main/snippets/AGENTS.md). --- # Protect an API > Register your API with Pontive and accept only access tokens issued for it, with pontkit's resource server in TypeScript or with any JWT library and the instance's JWKS, or by token introspection. Source: https://www.pontive.com/docs/guides/protect-an-api Your API accepts a request when it carries a Pontive access token that was issued **for that API**. The token says who is calling (`sub`), for which client, with which scopes, and, when the caller acts in an organization, which one and with which roles and permissions there. ## 1. Register the API [#1-register-the-api] In the dashboard (**APIs**) or the [management API](/docs/api-reference/management/registered-apis), register the API on the instance with: - an **identifier**, usually its URL, e.g. `https://api.acme.com`. Tokens for the API carry it in `aud`, and clients name it as the `resource` parameter (RFC 8707) when they ask for a token; - its **scopes**, e.g. `files:read` and `files:write`. Apps of the instance may request the API's scopes by default. Service accounts and agents need an explicit **client grant** naming the API and the scopes. ## 2. Get a token for the API [#2-get-a-token-for-the-api] A token is issued for an API only when the request names it with `resource`. Without `resource`, the token's `aud` is the client itself, and your API must refuse it. A service account calling your API (machine to machine), with the client credentials grant: ```sh curl -s -u "svc_...:$PONTIVE_CLIENT_SECRET" \ -d grant_type=client_credentials \ -d resource=https://api.acme.com \ -d scope="files:read" \ "https:///oauth2/token" ``` A user-facing app passes `resource` on `/oauth2/authorize` (and may repeat it on the code exchange), or on a `refresh_token` grant to get a token for another API the user's grant covers. A requested `resource` that matches no API, or one the client may not request, is `invalid_target`; an API scope asked for without `resource` is `invalid_request`. ## 3. Verify the token [#3-verify-the-token] Every check below is required. Skipping `aud` lets a token issued for another API, or an app's own token, through; skipping `typ` lets an ID token through. | Check | Value | | --- | --- | | Signature | RS256, by a key in the instance's JWKS (`jwks_uri` in `https:///.well-known/openid-configuration`) | | `typ` header | `at+jwt` (an access token, RFC 9068) | | `iss` | your auth domain, `https://`; list each one if the instance also has a custom domain | | `aud` | contains your API's identifier | | `exp` | in the future (allow a minute of clock skew) | | `scope` | contains the scope the route needs | ### TypeScript: `@pontive/pontkit-server` [#typescript-pontivepontkit-server] ```sh npm install @pontive/pontkit-server ``` ```ts title="pontive.ts" import { createResourceServer } from "@pontive/pontkit-server/resource-server"; export const rs = createResourceServer({ issuer: process.env.PONTIVE_ISSUER!, // https://, or a list of them resource: "https://api.acme.com", // the API's identifier, exactly as registered scopes: ["files:read", "files:write"], }); ``` Any Web-standard handler (Next.js route handlers, Hono, Cloudflare Workers, Bun, Deno): ```ts title="app/api/files/route.ts" import { rs } from "@/pontive"; const guard = rs.requireBearer({ scopes: ["files:read"] }); export async function GET(request: Request) { const caller = await guard(request); if (caller instanceof Response) return caller; // 401 or 403, with WWW-Authenticate return Response.json({ user: caller.sub, org: caller.orgId ?? null, roles: caller.roles }); } ``` Express: ```ts import express from "express"; import { requireBearer } from "@pontive/pontkit-server/resource-server/express"; import { rs } from "./pontive"; const app = express(); app.get("/files", requireBearer(rs, { scopes: ["files:read"] }), (req, res) => { res.json({ user: req.principal.sub }); }); ``` Keys are fetched once and cached, so verifying costs no network call per request. The handler gets a `Principal`: | Field | | | --- | --- | | `sub`, `kind` | `usr_…` (`"user"`), `svc_…` (`"service_account"`) or `agt_…` (`"agent"`) | | `clientId` | the client the token was issued to | | `orgId` | the organization the token acts in, when it does | | `roles`, `permissions` | the caller's effective roles and permissions in that organization, or on the instance when there is none | | `scopes` | the granted scopes | | `isDelegated`, `actor` | `true` when an agent acts for the user: `sub` is the user, `actor.sub` the agent. Check what it may do by token (below), never by `sub` alone | The same resource server also serves the API's protected resource metadata (RFC 9728) that MCP clients read: see [Protect an MCP server](/docs/sdk/mcp-server). ### Any other language: the JWKS [#any-other-language-the-jwks] Fetch the instance's discovery document once, read `jwks_uri`, and verify with a JWT library that caches the keys. Python, with PyJWT: ```python import jwt # pip install "pyjwt[crypto]" ISSUER = "https://acme-x7k2p9qa-dev.auth.us.pontive.dev" RESOURCE = "https://api.acme.com" jwks = jwt.PyJWKClient(f"{ISSUER}/oauth2/jwks.json") # cached after the first fetch def verify(token: str, required_scope: str) -> dict: if jwt.get_unverified_header(token).get("typ") != "at+jwt": raise PermissionError("not an access token") key = jwks.get_signing_key_from_jwt(token).key claims = jwt.decode( token, key, algorithms=["RS256"], audience=RESOURCE, issuer=ISSUER, leeway=60, options={"require": ["exp", "sub", "iss", "aud"]}, ) if required_scope not in claims.get("scope", "").split(): raise PermissionError("insufficient_scope") return claims ``` Go, with `golang-jwt` and `keyfunc`: ```go import ( "context" "errors" "slices" "strings" "time" "github.com/MicahParks/keyfunc/v3" "github.com/golang-jwt/jwt/v5" ) const ( issuer = "https://acme-x7k2p9qa-dev.auth.us.pontive.dev" resource = "https://api.acme.com" ) func newVerifier(ctx context.Context) (func(raw, scope string) (jwt.MapClaims, error), error) { keys, err := keyfunc.NewDefaultCtx(ctx, []string{issuer + "/oauth2/jwks.json"}) if err != nil { return nil, err } return func(raw, scope string) (jwt.MapClaims, error) { claims := jwt.MapClaims{} token, err := jwt.ParseWithClaims(raw, claims, keys.Keyfunc, jwt.WithValidMethods([]string{"RS256"}), jwt.WithIssuer(issuer), jwt.WithAudience(resource), jwt.WithExpirationRequired(), jwt.WithLeeway(time.Minute), ) if err != nil { return nil, err } if token.Header["typ"] != "at+jwt" { return nil, errors.New("not an access token") } granted, _ := claims["scope"].(string) if !slices.Contains(strings.Fields(granted), scope) { return nil, errors.New("insufficient_scope") } return claims, nil }, nil } ``` Answer a missing or invalid token with `401` and `WWW-Authenticate: Bearer error="invalid_token"`, and a token without the needed scope with `403` and `error="insufficient_scope"`. The JWKS path above is the one Pontive's discovery documents name today (`/oauth2/jwks.json`); read `jwks_uri` from discovery rather than hard-coding it if you can. ### Token introspection [#token-introspection] When you cannot verify JWTs locally, ask the auth server (RFC 7662). `introspection_endpoint` in the discovery document is `https:///oauth2/introspect`, and the caller must authenticate: ```sh curl -s -u "svc_...:$PONTIVE_CLIENT_SECRET" \ -d token="$ACCESS_TOKEN" \ "https:///oauth2/introspect" ``` - A **service account** of the instance may introspect any token the instance issued. - A **confidential app** sees only tokens issued to it or naming it in `aud`; any other token answers `{ "active": false }`. An inactive, expired or unknown token is `{ "active": false }`. Introspection costs a network call per request, and it also reflects a session revoked since the token was issued. ## Claims in a Pontive access token [#claims-in-a-pontive-access-token] | Claim | | | --- | --- | | `iss`, `sub`, `aud`, `exp`, `iat`, `nbf`, `jti` | standard. `sub` is `usr_…`, `svc_…` or `agt_…` | | `client_id` | the app, service account or agent the token was issued to | | `scope` | space-separated granted scopes | | `instance` | the instance id, `inst_…` | | `sid` | the session, for user sign-ins | | `org_id` | the organization the token acts in; absent when none | | `roles` | the effective role keys in that organization, or on the instance root when there is no `org_id` | | `permissions` | the permission keys those roles grant there | | `act` | only on delegated tokens: `{ "sub": "agt_…" }`, the agent acting for the user | The roles and permissions are a coarse snapshot of the caller's organization, re-read on every refresh. Decisions about a specific object (this document, this project) belong to the [authorization API](/docs/guides/organizations-and-roles#fine-grained-checks). ## Delegated calls from agents [#delegated-calls-from-agents] When an agent acts for a user, `sub` is the user and `act.sub` the agent, and the token's authority is the intersection of both. Do not read or write the user's data by `sub` alone: check the permission by token with `createAuthorizationClient` from `@pontive/pontkit-server/authorization`, which evaluates the pair. See [Permission-aware RAG](/docs/sdk/permission-aware-rag) for a worked example. --- # Organizations and roles > How Pontive models your customers' organizations, members, roles and permissions, which organization a session acts in, and how your app and API read roles and permissions from the token or ask the authorization API. Source: https://www.pontive.com/docs/guides/organizations-and-roles ## The model [#the-model] **Tenancy mode.** A project is `b2b` or `b2c`, chosen when it is created and fixed. In a `b2b` project your customers are **organizations** (`org_…`) and users act inside them; a `b2c` project has no organizations and its users act on their own. **Organizations** are flat: each sits directly under the instance, and an organization is the tenant boundary. A user can belong to several, with different roles in each. **Roles and permissions.** A permission is an action key, such as `invoice:approve`. A role is a named set of permissions (or a wildcard role with every permission) defined on a resource type, and assigned to a member. Two types are built in: | Type key | What it is | Seeded roles | | --- | --- | --- | | `root` | The instance itself. Roles here apply instance-wide: your own staff, or end-user tiers in a `b2c` app. | `owner`, `admin` | | `org` | Organizations (`b2b` only). Roles here apply inside one organization. | `owner`, `admin` | Every organization always has at least one `owner`. The instance's `owner` and `admin` reach every organization through inheritance. You add your own roles and permissions on either type, and with the Fine-Grained Authorization capability you declare your own resource types (documents, projects…) with roles on individual objects. **Membership** binds a user to the instance root or to an organization with a set of role keys. ## Which organization a session acts in [#which-organization-a-session-acts-in] A session acts in **at most one** organization at a time. Users are never asked to pick at sign-in: 1. the organization the app names (`organizationId` on the provider, `organization_id` on `/oauth2/authorize`, or `?organization_id=` on the server SDK's login route); 2. otherwise the user's only organization; 3. otherwise none. A user moves the session to another of their organizations with the `` component, the server SDK's switch route, or `Auth.switchOrganization(id)` in the browser. A switch to an organization the user is not a member of is refused and leaves the session as it was. ## Roles and permissions in the token [#roles-and-permissions-in-the-token] The access token carries the session's organization and what the user holds there: ```json { "sub": "usr_...", "org_id": "org_...", "roles": ["admin"], "permissions": ["invoice:approve", "invoice:read"] } ``` - `roles` are the user's **effective** role keys there: held directly plus those conferred by inheritance. There is no single `role` claim: a member can hold several roles, and none ranks above another, so check for the one you need. - With no `org_id`, `roles` and `permissions` are those the user holds on the instance root. A `b2c` token never has an `org_id`. - They are re-read on every refresh, so a role granted or revoked reaches the next access token. A suspended organization grants nothing, and its claims are not issued. ### In a Next.js server component [#in-a-nextjs-server-component] ```tsx import { pontive } from "@/lib/pontive"; // see the Next.js quickstart export default async function Invoices() { const session = await pontive().auth(); const org = session?.organization; // { id, roles, permissions } or null if (!org?.permissions.includes("invoice:read")) return

Not allowed.

; return

Invoices of {org.id}

; } ``` To move the session, link to the switch route ([server sessions](/docs/sdk/server-sessions#organizations-b2b)): ```tsx import { switchOrganizationPath } from "@pontive/pontkit-nextjs/server"; {org.name}; ``` ### In the browser [#in-the-browser] ```ts import { Auth } from "@pontive/oidc-client"; Auth.getOrganization(); // { id, roles, permissions } | null await Auth.switchOrganization("org_..."); ``` In React, `useSession()` from `@pontive/pontkit-react` reports `organization-changed` with the new `organizationId`, so you can reload what depends on it. ### In your API [#in-your-api] `@pontive/pontkit-server`'s resource server gives each verified caller `orgId`, `roles` and `permissions` ([Protect an API](/docs/guides/protect-an-api)); any JWT library reads the same claims. ## Fine-grained checks [#fine-grained-checks] The token is a snapshot of one organization. Ask the authorization API, on your request path, when the question is about a specific object, another organization, or must reflect a change made seconds ago. It speaks [OpenID AuthZEN 1.0](/docs/api-reference/authz/authzen): ```http POST https://authz.{region}.pontive.com/access/v1/evaluation Authorization: Bearer { "subject": { "type": "user", "id": "usr_..." }, "action": { "name": "invoice:approve" }, "resource": { "type": "org", "id": "org_..." } } ``` ```json { "decision": true, "context": { "roles": ["admin"] } } ``` `POST /access/v1/evaluations` checks up to 100 questions at once. With `@pontive/pontkit-server`: ```ts import { createAuthorizationClient } from "@pontive/pontkit-server/authorization"; const authz = createAuthorizationClient({ managementUrl: "https://api.us.pontive.com", // the authz host, https://authz.us.pontive.com, is derived from it issuer: process.env.PONTIVE_ISSUER!, credential: { clientId: "svc_...", clientSecret: process.env.PONTIVE_CLIENT_SECRET! }, // holds sys:authz:check }); const allowed = await authz.check(principal, "invoice:approve", { type: "org", id: "org_..." }); ``` `principal` is the caller your resource server verified. For an agent acting for a user, the client checks by token, so Pontive answers for what both the user and the agent may do. ## Managing organizations, members and roles [#managing-organizations-members-and-roles] - **From your backend or an AI client:** the [management API](/docs/api-reference/management/organizations) (`POST /organizations`, `POST /organizations/{organization}/members` with `user_id` and `roles`, `POST /authz/resource-types/{resource_type}/roles`), or the same operations as tools of the [Pontive MCP server](/docs/guides/pontive-mcp-server). - **By your customers' own admins, inside your app:** the `` component lists members and invitations, changes roles and invites people, within the signed-in user's own roles. It needs the `pontive:org:member:read`, `pontive:org:member:manage` and `pontive:org:member:invite` scopes, allowed on the app and asked for at sign-in, and refresh tokens on. --- # The Pontive MCP server > Connect Claude, ChatGPT, Codex, Claude Code, Cursor or VS Code to Pontive's hosted MCP server to configure an instance from an AI client, signing in with OAuth or using a secret key. Source: https://www.pontive.com/docs/guides/pontive-mcp-server The Pontive MCP server lets an AI client configure your Pontive instances: apps, registered APIs and their client grants, roles, permissions, resource types, resources, organizations and their members, groups, agents, service accounts, users, invitations and webhook subscriptions. It also reads audit logs and webhook deliveries, and exports and imports branding and auth flows as whole documents. It is hosted at one global URL, for instances in every region: ```txt https://mcp.pontive.com/mcp ``` Each tool call is one management API request, so what the client can do is exactly what the credential it uses may do. There are two ways to connect: | | Sign in with OAuth | Secret key | | --- | --- | --- | | Acts as | you, with your own roles | the key's service account, on the key's instance | | Reaches | every instance your roles reach; each call names `instance_id` | one instance | | Also manages | your workspaces, projects and instances (the control-plane tools) | — | | Clients | Claude, ChatGPT, Codex, Claude Code, Cursor, VS Code | Claude Code, Codex, Cursor, VS Code, CI | ## Sign in with OAuth [#sign-in-with-oauth] Add the server's URL with no key. The client receives a `401` pointing at the server's protected resource metadata and finds Pontive's authorization server there. Its metadata (`/.well-known/oauth-authorization-server`) advertises both ways for a client to register itself: - a **client ID metadata document** (CIMD, `client_id_metadata_document_supported`): the client's `client_id` is the URL of a document describing it. Claude, ChatGPT, Codex and Claude Code use this. - **Dynamic Client Registration** (DCR, RFC 7591, `registration_endpoint`): the client posts its metadata to `/oauth2/register` and gets a `client_id` back. Cursor, and any other MCP client that only does DCR, uses this. Either way the client then opens a browser for you to sign in to Pontive and consent, and checks the `iss` on the authorization response (RFC 9207, `authorization_response_iss_parameter_supported`). Every tool call then acts as you. **Claude** (claude.ai, Desktop): Settings → Connectors → Add custom connector, with the URL `https://mcp.pontive.com/mcp`. **ChatGPT**: Settings → Connectors (developer mode) → Create, with the URL and OAuth authentication. **Claude Code**: ```sh claude mcp add --transport http pontive https://mcp.pontive.com/mcp ``` Then run `/mcp` in Claude Code and choose to authenticate the `pontive` server. **Codex**: ```sh codex mcp add pontive --url https://mcp.pontive.com/mcp codex mcp login pontive ``` **Cursor** (`~/.cursor/mcp.json` or `.cursor/mcp.json`): ```json { "mcpServers": { "pontive": { "url": "https://mcp.pontive.com/mcp" } } } ``` Cursor registers itself with DCR. Open Cursor Settings → MCP, where the `pontive` server shows that it needs a login, and choose to connect: Cursor opens the browser to sign in to Pontive. **VS Code** (`.vscode/mcp.json`): ```json { "servers": { "pontive": { "type": "http", "url": "https://mcp.pontive.com/mcp" } } } ``` Start the server from the file or the MCP view, and allow VS Code to authenticate when it asks. In this mode every tool takes an `instance_id` (`inst_…`), and `list_instances` lists the instances you can use, filtered by workspace, project or environment; the assistant calls it to find the right one and asks you when several fit. The control-plane tools (`list_workspaces`, `create_project`, `create_instance`…) manage your Pontive account and take no `instance_id`. Some actions stay in the dashboard and are refused to the MCP server: deleting a workspace or a production instance, billing, ownership and owner changes, and secret keys. A client registered with CIMD or DCR that is never used, with no sign-in consented to within 24 hours of registering, is removed, and so is one idle for 90 days, with no consent and no live refresh token in that time. Nothing is lost: the client registers again the next time you connect it, and you consent again. ## Use a secret key [#use-a-secret-key] Create a secret key on the instance in the Pontive dashboard. It looks like `pontive_sk_test_us_…`. A key from any region works on the same URL. Keep it in an environment variable, never in a file you commit. **Claude Code**: ```sh claude mcp add --transport http pontive https://mcp.pontive.com/mcp \ --header "Authorization: Bearer $PONTIVE_SECRET_KEY" ``` **Cursor** (`~/.cursor/mcp.json` or `.cursor/mcp.json`): ```json { "mcpServers": { "pontive": { "url": "https://mcp.pontive.com/mcp", "headers": { "Authorization": "Bearer ${env:PONTIVE_SECRET_KEY}" } } } } ``` **VS Code** (`.vscode/mcp.json`): ```json { "inputs": [ { "type": "promptString", "id": "pontive-key", "description": "Pontive secret key", "password": true } ], "servers": { "pontive": { "type": "http", "url": "https://mcp.pontive.com/mcp", "headers": { "Authorization": "Bearer ${input:pontive-key}" } } } } ``` **Codex** (`~/.codex/config.toml`): ```toml [mcp_servers.pontive] url = "https://mcp.pontive.com/mcp" bearer_token_env_var = "PONTIVE_SECRET_KEY" ``` A request with a secret key and an `Origin` header (that is, from a browser) is refused with `403 secret_key_in_browser`. Secret keys are for servers and local tools. ## Read-only mode [#read-only-mode] Send `X-Pontive-Read-Only: true` and only the read-only tools are listed and callable: ```sh claude mcp add --transport http pontive https://mcp.pontive.com/mcp \ --header "Authorization: Bearer $PONTIVE_SECRET_KEY" --header "X-Pontive-Read-Only: true" ``` Read-only mode only hides tools. For a hard limit, give the key's service account a read-only role. ## Docs tools [#docs-tools] Beside the configuration tools, the server offers `search_docs`, `get_doc`, `list_docs` and `get_integration_guide`, and the prompts *Add Pontive sign-in to this app* and *Protect this API with Pontive*. They read these docs, need no permission and take no `instance_id`. They are the tools of the public [docs MCP server](/docs/guides/docs-mcp-server), which needs no sign-in at all: connect that one when you only want the docs. ## What the server never does [#what-the-server-never-does] No tool reveals, mints, rotates or revokes a secret: client secrets, secret keys, access keys, personal access tokens, webhook signing secrets, sessions or passwords. A credential handed to a model ends up in its context and transcript. Create and copy those in the dashboard. Creating a webhook subscription is therefore not a tool either, since its response carries the new signing secret. Configuration documents (resource types, roles, permissions, a service account's token settings) use optimistic concurrency: their read tools return an `ETag`, and updates and deletes take it back as `if_match`. A stale one is `412 precondition_failed`; read again and retry. Branding and auth flow imports are dry runs unless `dry_run` is `false`, and applying one needs the dry run's `ETag`, so a plan is always reviewed before it is written. --- # The docs MCP server > Let Claude Code, Cursor, VS Code or any MCP client search and read these docs, and get the documented setup for its framework, with no sign-in. Source: https://www.pontive.com/docs/guides/docs-mcp-server The docs MCP server gives an AI client these docs as tools. It is public: no account, key or sign-in. ```txt https://www.pontive.com/docs/mcp ``` It speaks MCP over streamable HTTP and keeps no session, so any client that supports remote MCP servers can use it. ## Tools [#tools] | Tool | What it does | | --- | --- | | `search_docs` | Searches every page, the API reference included. Takes `query` and an optional `limit` (1 to 20, default 8); returns the best pages, each with its title, section, page URL, Markdown URL and a snippet. | | `get_doc` | Returns one page as Markdown, the same text as its `.md` URL. Takes `path_or_url`: `/docs/quickstart/nextjs`, `quickstart/nextjs` or a full URL, with or without `.md`; `/auth.md` works too. | | `list_docs` | Lists the pages in sidebar order, with URLs and descriptions. Takes an optional `section`: `quickstart`, `guides`, `sdk`, `api-reference`, or one API such as `api-reference/management`. | | `get_integration_guide` | Returns the documented setup for one framework, assembled from these pages: packages, environment variables, code and steps. Takes `framework` (`nextjs`, `react`, `vue`, `express`, `fastapi` or `go`) and optional `features` (`sign-in`, `protect-api`, `organizations`, `mcp-server`). | `get_integration_guide` says which parts are documented for that framework and which are not, and names the closest guide instead of making code up. Python and Go have no Pontive SDK: their guides verify access tokens with common libraries against your instance's keys. Two prompts come with it, for clients that show prompts as commands: - **Add Pontive sign-in to this app** (`add_pontive_signin`) - **Protect this API with Pontive** (`protect_api_with_pontive`) Each takes an optional `framework` and walks the agent through the right guide. ## Add it to your client [#add-it-to-your-client] **Claude Code**: ```sh claude mcp add --transport http pontive-docs https://www.pontive.com/docs/mcp ``` **Cursor** (`~/.cursor/mcp.json` or `.cursor/mcp.json`): ```json { "mcpServers": { "pontive-docs": { "url": "https://www.pontive.com/docs/mcp" } } } ``` Or open this link to install it in Cursor: `cursor://anysphere.cursor-deeplink/mcp/install?name=pontive-docs&config=eyJ1cmwiOiJodHRwczovL3d3dy5wb250aXZlLmNvbS9kb2NzL21jcCJ9` **VS Code** (`.vscode/mcp.json`): ```json { "servers": { "pontive-docs": { "type": "http", "url": "https://www.pontive.com/docs/mcp" } } } ``` Or from a terminal: ```sh code --add-mcp '{"name":"pontive-docs","type":"http","url":"https://www.pontive.com/docs/mcp"}' ``` **Codex**: ```sh codex mcp add pontive-docs --url https://www.pontive.com/docs/mcp ``` **Claude** (claude.ai, Desktop): Settings → Connectors → Add custom connector, with the URL above and no authentication. ## The Pontive MCP server has them too [#the-pontive-mcp-server-has-them-too] The [Pontive MCP server](/docs/guides/pontive-mcp-server) (`https://mcp.pontive.com/mcp`), which configures your instances, offers the same four tools and two prompts, answered by this server. If you already use it, you don't need both. Connect this one when you only want the docs, or work without a Pontive account. ## Other ways for agents to read the docs [#other-ways-for-agents-to-read-the-docs] - [`/llms.txt`](/llms.txt): instructions for coding agents and the index of every page. - [`/llms-full.txt`](/llms-full.txt): every page in one file. - Any page as Markdown: add `.md` to its URL, or ask for it with `Accept: text/markdown`. - Every docs page sends a `Link` header naming `llms.txt`, this server's card (`/.well-known/mcp/server-card.json`) and the page's Markdown. --- # Use Pontive with Supabase > Sign users in with Pontive and keep your data in Supabase. Supabase trusts Pontive's access tokens as a custom OIDC issuer, and Row Level Security policies scope every row to the organization in the token. Includes apps built in Lovable. Source: https://www.pontive.com/docs/guides/supabase Pontive signs your users in, holds their organizations, roles and permissions, and runs billing. Supabase holds your data and runs your backend. Supabase's [third-party auth](https://supabase.com/docs/guides/auth/third-party/overview) makes the two meet: your Supabase project accepts Pontive's access tokens as they are, so there are no tokens to exchange and no users to copy into Supabase Auth. ## How it fits together [#how-it-fits-together] 1. **Pontive signs the user in** and issues an access token for your app. The token is signed with RS256, carries a `kid`, and names the organization the session acts in (`org_id`) and what the user holds there (`roles`, `permissions`). 2. **The Supabase client sends that token** on every request. With supabase-js you pass a function that returns it (`accessToken`), and the client asks it for a token before each call. 3. **Supabase checks the signature** against the keys in your instance's JWKS, which it finds through `https:///.well-known/openid-configuration`. A token whose `role` claim is `authenticated` runs as Postgres's `authenticated` role. 4. **Row Level Security decides access.** Policies read the verified claims with `auth.jwt()`, so a row is visible only inside the organization the token names. 5. **Pontive Billing gates features through its API.** Entitlements are not in the token: you ask the entitlement check API, from an Edge Function or your server. Two settings make it work: Supabase must trust your Pontive issuer, and the token must carry `role: "authenticated"`. ## 1. Add the `role` claim to the app's tokens [#1-add-the-role-claim-to-the-apps-tokens] Supabase reads the `role` claim of every token to choose the Postgres role. Without one, a request runs as `anon`. Pontive's tokens have no `role` claim of their own (they carry `roles`, an array), so add one with the app's **access-token claims template**. In the Pontive dashboard, open **Apps**, then your app, then **Security**. Under **Access token claims**, set the template to: ```json { "role": "authenticated" } ``` Use **Preview** with one of your users' ids to see the claims a token would carry. Through the [management API](/docs/api-reference/management/apps), the template is the app's `token_config.access_token.claims_template`, and `POST /v1/apps/{app_id}/claims-template/preview` renders it without saving. The template is rendered at sign-in, on every refresh and on every organization switch, so every access token the app gets carries the claim. ID tokens are not affected. If you already have a template, add the `role` key to it. A token for this app then looks like this: ```json { "iss": "https://acme-x7k2p9qa-dev.auth.us.pontive.dev", "sub": "usr_...", "aud": ["app_..."], "client_id": "app_...", "org_id": "org_...", "roles": ["admin"], "permissions": ["project:read", "project:write"], "role": "authenticated", "exp": 1796342400 } ``` `aud` is a list holding the app's id. `org_id` is there only while the session acts in an organization; a `b2c` token never has one. See [which organization a session acts in](/docs/guides/organizations-and-roles#which-organization-a-session-acts-in). ## 2. Trust Pontive's issuer in Supabase [#2-trust-pontives-issuer-in-supabase] Your issuer is the app's auth domain with `https://` in front of it, for example `https://acme-x7k2p9qa-dev.auth.us.pontive.dev`, or the custom auth domain the app is bound to. It must match the token's `iss` exactly. In the Supabase dashboard: 1. Go to **Authentication**, then **Sign In / Providers**, then **Third-Party Auth**. 2. Click **Add provider** and choose **Custom OIDC**. 3. Enter the issuer in **Issuer URL**, exactly as it appears in the token's `iss`, and click **Add provider**. Or call the Supabase Management API's [create third-party auth integration](https://supabase.com/docs/reference/api/v1-create-project-tpa-integration) with the issuer in `oidc_issuer_url`. Each Pontive instance is its own issuer with its own keys. Add one integration per instance you connect, for example your development instance on a development Supabase project and your production instance on the production one. ## 3. Send the token from your app [#3-send-the-token-from-your-app] Pass `accessToken` to `createClient`. supabase-js calls it before each request, and for Realtime on connect and on every heartbeat. ### React and other browser apps [#react-and-other-browser-apps] With `@pontive/pontkit-react` set up as in the [React quickstart](/docs/quickstart/react), read the current access token from `Auth` in `@pontive/oidc-client`, the client the provider configured: ```ts title="src/lib/supabase.ts" import { createClient } from "@supabase/supabase-js"; import { Auth } from "@pontive/oidc-client"; export const supabase = createClient( import.meta.env.VITE_SUPABASE_URL, import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY, { // The Pontive access token, or null when nobody is signed in (requests then run as anon). accessToken: async () => Auth.getCurrentSession()?.access_token ?? null, }, ); ``` `getCurrentSession()` returns the stored session and starts a background refresh once 80% of the token's lifetime has passed. Turn **refresh tokens** on for the app and ask for `offline_access`, so the session is renewed before the token expires. When the user switches organization, the next request carries the new `org_id`. Reload what you fetched for the old one: `useSession()` reports `organization-changed`. ```tsx import { useEffect } from "react"; import { useSession } from "@pontive/pontkit-react"; function useReloadOnOrganizationChange(reload: () => void) { const change = useSession(); useEffect(() => { if (change?.reason === "organization-changed") reload(); }, [change, reload]); } ``` ### Next.js on the server [#nextjs-on-the-server] On the server, `pontive().auth()` from the [Next.js quickstart](/docs/quickstart/nextjs) returns the session with its access token. Create a client per request: ```ts title="lib/supabase-server.ts" import { createClient } from "@supabase/supabase-js"; import { pontive } from "@/lib/pontive"; export async function supabaseForRequest() { const session = await pontive().auth(); return createClient(process.env.NEXT_PUBLIC_SUPABASE_URL!, process.env.NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY!, { accessToken: async () => session?.accessToken ?? null, }); } ``` A client created with `accessToken` throws on every `supabase.auth.*` call. Sign-in, sign-out and the user's profile go through Pontive. If you also need Supabase Auth somewhere, create a second client for it. ## 4. Write RLS policies on the organization [#4-write-rls-policies-on-the-organization] In a `b2b` app the tenant is the organization. Key every tenant table by `org_id` and compare it with the token's **`org_id` claim, never with `sub`**. A policy on `sub` gives each user their own rows, so two members of the same organization would never see each other's data, and a user's rows would follow them into every organization they belong to. ```sql create table public.projects ( id uuid primary key default gen_random_uuid(), -- Pontive ids are text, such as org_... and usr_... org_id text not null default (auth.jwt()->>'org_id'), name text not null, created_by text not null default (auth.jwt()->>'sub'), created_at timestamptz not null default now() ); create index projects_org_id_idx on public.projects (org_id); alter table public.projects enable row level security; -- Members see their organization's projects. create policy "Members read their organization's projects" on public.projects for select to authenticated using (org_id = (select auth.jwt()->>'org_id')); -- Creating, changing and deleting need a permission from the token. create policy "project:write creates projects in the organization" on public.projects for insert to authenticated with check ( org_id = (select auth.jwt()->>'org_id') and (select auth.jwt()->'permissions') ? 'project:write' ); create policy "project:write changes the organization's projects" on public.projects for update to authenticated using ( org_id = (select auth.jwt()->>'org_id') and (select auth.jwt()->'permissions') ? 'project:write' ) with check (org_id = (select auth.jwt()->>'org_id')); create policy "Admins delete the organization's projects" on public.projects for delete to authenticated using ( org_id = (select auth.jwt()->>'org_id') and (select auth.jwt()->'roles') ? 'admin' ); ``` - `permissions` and `roles` are JSON arrays, so `?` tests whether one holds a key. Prefer permissions to role names: a role's permissions can change in Pontive without touching SQL. - A token with no `org_id` matches no row, and one with no `permissions` claim passes no permission check. Every policy fails closed. - Wrapping `auth.jwt()` in `(select …)` lets Postgres evaluate it once per statement rather than once per row. - The token is a snapshot. A role granted or revoked, or a member removed, reaches Supabase with the user's next access token, at the latest when the current one expires. **Per-user data.** `sub` is the right key only for data that belongs to one person and follows them everywhere, which is the usual case in a `b2c` app. Use a `text` column: ```sql create policy "Users read their own notes" on public.notes for select to authenticated using (user_id = (select auth.jwt()->>'sub')); ``` Do not use `auth.uid()`. It casts `sub` to `uuid`, and a Pontive `sub` such as `usr_...` is not a UUID, so the cast fails. ### Accept only your app's tokens [#accept-only-your-apps-tokens] Supabase trusts every token your issuer signs that carries `role: "authenticated"`, and it does not document an audience check for third-party tokens. Your Supabase project also keeps Supabase Auth, which cannot be turned off and issues tokens of its own. Add a **restrictive** policy to each table so only tokens Pontive issued to your app get through: ```sql create policy "Only tokens Pontive issued to this app" on public.projects as restrictive for all to authenticated using ( (select auth.jwt()->>'iss') = 'https://acme-x7k2p9qa-dev.auth.us.pontive.dev' and (select auth.jwt()->>'client_id') = 'app_...' ); ``` A restrictive policy grants nothing; it narrows the permissive ones. Keep the `as restrictive` clause, or the policy would instead let every such token read and write every row. If several Pontive apps share the database, such as a web app and a mobile app, list each app id with `in (…)`. ### Storage and Realtime [#storage-and-realtime] The same claims work in Storage and Realtime policies. Store an organization's files under a folder named for its `org_id`: ```sql create policy "Members read their organization's files" on storage.objects for select to authenticated using ( bucket_id = 'documents' and (storage.foldername(name))[1] = (select auth.jwt()->>'org_id') ); ``` Storage records the uploader's `sub` in `owner_id`, a text column. Compare it with `auth.jwt()->>'sub'`, never with `auth.uid()`. For private Realtime channels, name each organization's topic after it and check the topic in a policy on `realtime.messages`: ```sql create policy "Members join their organization's channel" on realtime.messages for select to authenticated using (realtime.topic() = 'org:' || (select auth.jwt()->>'org_id')); ``` Postgres Changes deliver only the rows a subscriber's policies let them read. Realtime re-reads the policies when it receives a new token, and supabase-js asks `accessToken` for the current one on every heartbeat. After an organization switch, subscribe again to the new organization's topic. ## 5. Gate features with Pontive Billing [#5-gate-features-with-pontive-billing] Entitlements are not in the access token: a token would be stale until its next refresh, and a numeric or metered feature needs a value, not a yes or no. Ask the [entitlement check API](/docs/api-reference/authz/billing-entitlements) when it matters, from a Supabase Edge Function or your own server. ```ts title="supabase/functions/generate-report/index.ts" import { createRemoteJWKSet, jwtVerify } from "npm:jose@5"; const ISSUER = Deno.env.get("PONTIVE_ISSUER")!; // https:// const APP_ID = Deno.env.get("PONTIVE_APP_ID")!; // app_... const jwks = createRemoteJWKSet(new URL(`${ISSUER}/oauth2/jwks.json`)); Deno.serve(async (req) => { // Verify the Pontive token the browser sent, and read the organization from it. const token = req.headers.get("authorization")?.replace(/^Bearer /, "") ?? ""; const verified = await jwtVerify(token, jwks, { issuer: ISSUER, audience: APP_ID, typ: "at+jwt" }).catch(() => null); if (!verified) return new Response("Unauthorized", { status: 401 }); const orgId = verified.payload.org_id as string | undefined; if (!orgId) return new Response("Choose an organization first", { status: 403 }); // Ask Pontive Billing whether the organization's plan includes the feature. const res = await fetch("https://authz.us.pontive.com/v1/entitlements/check", { // your instance's region method: "POST", headers: { authorization: `Bearer ${Deno.env.get("PONTIVE_SECRET_KEY")}`, // a secret key holding sys:billing:check "content-type": "application/json", }, body: JSON.stringify({ subject: { type: "organization", id: orgId }, feature: "advanced_reports" }), }); const { allowed, reason } = await res.json(); if (!allowed) return Response.json({ upgrade: true, reason }, { status: 402 }); // ... build the report return Response.json({ ok: true }); }); ``` A denial is a `200` with `allowed: false` and a `reason`: `not_entitled`, `allowance_exhausted`, `balance_exhausted` or `access_restricted`. Keep the secret key in the function's secrets, never in the browser. To hide or show controls in the UI, the signed-in user's own check is `POST /v1/me/entitlements/check`. ## Building in Lovable [#building-in-lovable] Lovable offers two backends: its built-in backend, Lovable Cloud, and a Supabase project you own and connect. They differ in what you can configure: | | Lovable Cloud | Your own Supabase project | | --- | --- | --- | | Third-Party Auth (trust Pontive's tokens) | Not offered. Auth settings are Lovable's own sign-in methods, and there is no Supabase dashboard | Yes, in the Supabase dashboard | | `org_id`, `roles` and `permissions` in RLS | No | Yes | | Sign in with Pontive | Yes, as an OIDC sign-in method, then Supabase Auth issues its own session | Yes, with the Pontive SDK | ### Recommended: connect your own Supabase project [#recommended-connect-your-own-supabase-project] For organization-scoped data, connect your own Supabase project to the Lovable project (**Connect to Supabase** in Lovable), then do steps 1 and 2 above in the Pontive and Supabase dashboards. Lovable does not move a project between its built-in backend and Supabase for you, so choose your own Supabase project before you build. Then give Lovable a prompt like this, with your own values: ```txt Use Pontive for sign-in, organizations, roles and billing. Do not use Supabase Auth: no Supabase sign-in or sign-up pages, and never call supabase.auth. 1. Install @pontive/pontkit-react and wrap the app in its with domain="", appId="", signinUrl="/signin", signupUrl="/signup" and scope="openid email profile offline_access". Add /signin/* and /signup/* routes that render and , and an in the header. 2. Where the Supabase client is created, pass this option to createClient: accessToken: async () => Auth.getCurrentSession()?.access_token ?? null with Auth imported from "@pontive/oidc-client". 3. Every table that holds customer data has org_id text not null default (auth.jwt()->>'org_id'), indexed. Its RLS policies compare org_id with (select auth.jwt()->>'org_id'), never with auth.uid() or the user's id. Writes also need the permission, for example (select auth.jwt()->'permissions') ? 'project:write'. 4. Add a restrictive policy to every table: (select auth.jwt()->>'iss') = '' and (select auth.jwt()->>'client_id') = ''. 5. When the session's organization changes (useSession() reports organization-changed), reload the data on screen. ``` Then, in the Pontive app's settings, add your published Lovable URL, such as `https://your-app.lovable.app`, to the app's allowed origins, and set up the auth endpoints as in the [React quickstart](/docs/quickstart/react) and [the auth proxy](/docs/sdk/auth-proxy). #### Sign in from Lovable's preview [#sign-in-from-lovables-preview] The editor's preview runs in an iframe on a host that changes with each draft, such as `.lovableproject.com`, so an allowed origin or redirect URI cannot list it. On a **development instance**, turn on Lovable in the app's **Builder previews** card in the dashboard, or set the app's `builder_previews` field with the [management API](/docs/api-reference/management/apps): ```json { "builder_previews": ["lovable"] } ``` The preview then signs in with nothing else to register: - **Embedded sign-in** (``, ``) is accepted from the preview's origin. A step that leaves the page, such as Google, opens in a popup, so allow pop-ups for Lovable. - **OAuth redirects** use the hosted preview callback, `https:///oauth2/preview-callback?origin=`, in that same popup. It sends the authorization response back to the preview with `postMessage`. Server sessions from `@pontive/pontkit-server` use it on their own. - Safari, and Firefox with Total Cookie Protection, block cookies inside the iframe. Open the preview in its own tab and sign in there. This lets every page on Lovable's preview hosts start your app's sign-in, so turn it on only while you build. A production instance never admits previews: it rejects the setting with `422 builder_previews_not_allowed`. In production, sign in on your published URL or your own domain. More detail, including v0, Vercel, Replit, Bolt and CodeSandbox, is in the `pontive-builder-previews` skill in [Agent Skills](/docs/agent-skills#the-skills). ### Lovable Cloud: sign-in only [#lovable-cloud-sign-in-only] Lovable Cloud's **OIDC sign-in** can use Pontive as the identity provider: in Lovable, open **More**, then **Users**, then **Settings**, then **OIDC**, and enter your issuer and the client id and secret of a confidential oauth app in Pontive whose redirect URI is the one Lovable shows. Users then sign in through Pontive, but Lovable Cloud's own auth issues the session token. That token carries none of Pontive's claims, so RLS cannot see the user's organization, roles or permissions, and the app must ask Pontive's APIs from an Edge Function instead. Lovable allows one OIDC provider per project and asks only for `openid`, `profile` and `email`. Use this when sign-in is all you need from Pontive. ## Limits and caveats [#limits-and-caveats] - **Supabase Auth stays on.** It cannot be disabled. Turn off new sign-ups in Supabase Auth's settings and keep the restrictive issuer policy, so its tokens never reach your data. - **No Supabase Auth features in the app.** `supabase.auth.*` throws in a client created with `accessToken`; `auth.users` has no rows for Pontive's users, so nothing can reference it; and `auth.uid()` fails on Pontive ids. Users, sessions, MFA, email and organizations are Pontive's. - **Local development.** The Supabase CLI has no custom OIDC provider and no config file option for one. Test against a hosted Supabase project, such as a development project or a branch. - **Signing-key rotation.** Supabase stores your issuer's keys and checks them for changes periodically, and asks you to allow up to 30 minutes for a new key to be picked up. Pontive rotates each instance's signing key every 24 hours and signs with the new key straight away, so for a short while after a rotation Supabase can refuse a freshly signed token. Handle a `401` from Supabase by retrying after a delay rather than signing the user out. - **Claim size.** When a user's roles and permissions are too large for a token, Pontive leaves the `permissions` claim out, then `roles`, and names them in `claims_overflow`. Policies on those claims then fail closed. Narrow what tokens carry under **Roles and permissions in tokens** on the app's **Security** page. - **Agents.** An AI agent acting for a user gets a token issued to the agent, without your app's claims template. Supabase runs it as `anon`, and the restrictive policy refuses it. - **Realtime.** A channel closes when its token expires and no new one has arrived. The Pontive SDK renews the token before then while refresh tokens are on. - **Pricing.** Supabase bills users who use a third-party provider as Monthly Active Third-Party Users: 50,000 included on Free and 100,000 on Pro and Team, then $0.00325 each. See [Supabase's pricing](https://supabase.com/docs/guides/platform/manage-your-usage/monthly-active-users-third-party). ## See also [#see-also] - [Organizations and roles](/docs/guides/organizations-and-roles): the claims and how a session picks its organization. - [Protect an API](/docs/guides/protect-an-api): verifying Pontive tokens in your own services. - Supabase: [Custom OIDC provider](https://supabase.com/docs/guides/auth/third-party/custom-oidc) and [Row Level Security](https://supabase.com/docs/guides/database/postgres/row-level-security). --- # The framework bindings > The React, Next.js and Vue bindings for pontkit's web components: Provider, hooks, widgets and their events. Source: https://www.pontive.com/docs/sdk/bindings The bindings wrap `@pontive/pontkit-core`'s elements (`pont-*`), which the loader fetches from the CDN at the release the platform decides. | Package | What | |---|---| | `@pontive/pontkit-react` | `Provider`, the hooks and control components, the widget wrappers | | `@pontive/pontkit-nextjs` | `.` re-exports `@pontive/pontkit-react`; `./server` is the auth proxy and server sessions | | `@pontive/pontkit-vue` | the loader plugin, `isPontElement`, `PONT_ELEMENTS` and the element types | | `@pontive/pontkit-loader` | resolves the release (`/v1/frontend/runtime-config`), loads its module and stylesheet with SRI | Core never imports the auth SDK: `` is given one (`sdk`). The React `Provider` injects `Auth` from `@pontive/oidc-client` (a dependency of `@pontive/pontkit-react`); Vue and plain pages set it themselves. ## React [#react] ```tsx import { Provider, SignedIn, SignedOut, Signin, AccountMenu, OrganizationSwitcher, useAuthState, } from "@pontive/pontkit-react"; export function App() { return ( { e.preventDefault(); router.push(e.detail.url); }} > } /> reload(e.detail.organizationId)} /> ); } ``` ### `Provider` [#provider] Renders `` and does the one thing the element can't: it **injects the SDK**. By default that is `Auth` from `@pontive/oidc-client`, installed with this package, so an app that imports the same package shares one instance. Pass `sdk` to use another client. Its props are the element's inputs, as properties: `appId`, `domain` (required), `locales`, `signinUrl`, `signupUrl`, `invitationUrl`, `signinRedirectUrl`, `continueHereUrl`, `scope`, `organizationId`, `apiBaseUrl`, `loginHint`, `autoRedirect`, `theme`, `headers`, `accountClient`, `config` (your own SDK callbacks, chained after the provider's; never call `Auth.configure()` yourself), `sdk`. See pontkit-core `docs/kit/provider.md`. | Hook / component | | |---|---| | `useAuthState()` | `{ isAuthenticated, resolved }`, from `pont-auth-changed` (seeded from `.auth`) | | `useSession()` | the last `pont-session-changed` (`{ reason, source, isAuthenticated, organizationId }`), or null | | `useSdk()` | the injected SDK | | `useAccountClient()` | the account client the widgets use (`effectiveAccountClient`), or undefined until the SDK is configured; for the calls an app makes beside them, such as `listBillingAccounts()` and `listMyContracts()` to choose between `Checkout` and `BillingPortal` | | `SignedIn`, `SignedOut`, `AuthResolved` | branch on `useAuthState()`; nothing until `resolved` (or `fallback`) | | `Authenticated` | children for a signed-in user; others go to `redirectUrl` or the provider's `signinUrl` (`onRedirect` for a router) | These are React components, not wrappers over `` / ``: those detach their children, which React must keep owning. ### Widgets and their events [#widgets-and-their-events] `Signin`, `Signup`, `Invitation`, `Consent`, `AccountMenu`, `OrganizationSwitcher`, `AccountSettings`, `MemberManagement`, `Checkout`, `BillingPortal`. The two billing widgets are beta: they need the instance's `billing` capability, the `pontive:billing:read` and `pontive:billing:pay` scopes and refresh tokens (pontkit-core `docs/kit/checkout.md` and `docs/kit/billing-portal.md`). Props are assigned as element properties once the element is defined. `fallback` (a placeholder until the first screen) is offered only by the flow widgets (`Signin`, `Signup`, `Invitation`), the elements that honour `[part="fallback"]`. Every `pont-*` event an element fires is a callback prop: drop `pont-`, camel-case, prefix `on`. **The callback gets the event itself**, so `event.detail` is the payload and a cancelable event can be cancelled with `event.preventDefault()`. | Element | Event | Prop | Cancel it to | |---|---|---|---| | provider | `pont-auth-changed` | `onAuthChanged` | | | | `pont-locale-changed` | `onLocaleChanged` | | | | `pont-session-changed` | `onSessionChanged` | | | | `pont-redirect` | `onRedirect` | navigate with your router | | signin, signup, invitation | `pont-flow-response` | `onFlowResponse` | | | account menu | `pont-account-settings` | `onAccountSettings` | navigate yourself | | | `pont-logout` | `onLogout` | sign out yourself | | | `pont-menu-item-click` | `onMenuItemClick` | stop the item's own action | | | `pont-open-change` | `onOpenChange` | keep the menu as it is | | organization switcher | `pont-organization-changed` | `onOrganizationChanged` | | | | `pont-organization-switch-failed` | `onOrganizationSwitchFailed` | | | | `pont-open-change` | `onOpenChange` | | | account settings | `pont-profile-updated` | `onProfileUpdated` | | | | `pont-authorized-app-revoked` | `onAuthorizedAppRevoked` | | | | `pont-open-change` | `onOpenChange` | | | member management | `pont-members-invited` | `onMembersInvited` | | | | `pont-member-roles-updated` | `onMemberRolesUpdated` | | | | `pont-member-removed` | `onMemberRemoved` | | | | `pont-invitation-resent` | `onInvitationResent` | | | | `pont-invitation-revoked` | `onInvitationRevoked` | | | checkout | `pont-checkout-completed` | `onCheckoutCompleted` | stay on the page or route yourself | | | `pont-checkout-cancelled` | `onCheckoutCancelled` | handle Cancel yourself | | billing portal | `pont-billing-contract-changed` | `onBillingContractChanged` | | | | `pont-billing-contract-cancelled` | `onBillingContractCancelled` | | | | `pont-billing-cancellation-revoked` | `onBillingCancellationRevoked` | | | | `pont-billing-invoice-paid` | `onBillingInvoicePaid` | | | | `pont-billing-payment-method-added` | `onBillingPaymentMethodAdded` | | | | `pont-billing-payment-method-default-changed` | `onBillingPaymentMethodDefaultChanged` | | | | `pont-billing-payment-method-removed` | `onBillingPaymentMethodRemoved` | | Note the switcher's prop is `onOrganizationSwitchFailed` (the event's name), called with the event. The element also has an `onSwitchFailed` / `onOrganizationChanged` *property* taking the detail; the binding listens for the events instead and never sets those properties. ## Next.js [#nextjs] `@pontive/pontkit-nextjs` re-exports `@pontive/pontkit-react`. The components use hooks, so mount them from a client component (`"use client"`). They import and server-render safely: the tags go out empty and upgrade when the bundle loads. `domain="/__pontive"` goes through the auth proxy (`createAuthProxy`), which forwards `/v1/frontend`, `/v1/me` and `/oauth2`, so the provider's `runtime-config`, `widget-messages` and `theme` reads, and the signed-in user's own `/v1/me` calls (profile, sessions, memberships, billing), go through it too. **Organization management does not**: `apiBaseUrl` must be the absolute regional API URL (`https://api.us.pontive.com`, whose routes are under `/v1`; the default account client refuses anything else), read for example from a `NEXT_PUBLIC_` variable. ## Vue [#vue] Vue needs no wrappers: it mounts custom elements and passes properties and listens for events itself. Tell the compiler to leave the tags alone, and set the provider's SDK: ```ts import { createApp } from "vue"; import PontKit, { isPontElement } from "@pontive/pontkit-vue"; app.config.compilerOptions.isCustomElement = isPontElement; // every pont-* tag app.use(PontKit); ``` ```vue ``` --- # Proxying the auth endpoints under your own origin > Serve the auth endpoints from your app's own origin so every auth cookie is first-party: recipes for Next.js, Vite and other hosts. Source: https://www.pontive.com/docs/sdk/auth-proxy A browser treats a cookie as first-party only when it comes from the origin the page is on. An app on `app.acme.com` talking to an auth server on another hostname is cross-site, so the refresh cookie is a third-party cookie — blocked outright in Safari, and on borrowed time everywhere else. There are two ways to stop being cross-site, and either is fine in production: | | How | In Safari | |---|---|---| | **Proxy** (this page) | Forward two path prefixes from the origin your app is already served from to the auth server. No DNS record, no certificate, no verification; one rule wherever the app is hosted. | Sessions last as long as the app's refresh lifetime. | | **Custom auth domain** | `auth.acme.com`, a CNAME to Pontive, called directly. | Safari caps cookies set through a CNAME to another company's servers at 7 days, so a user away for more than 7 days signs in again. Active users stay signed in: every refresh resets the 7 days. | Prefer the proxy where your host can do it — almost all can, without any server code, as the recipes below show. Where it cannot (GitHub Pages, a bare S3 website), use a custom auth domain. An app that signs people in on the hosted pages, rather than with embedded widgets, needs neither. The proxy carries only the auth domain's endpoints the browser calls with `fetch`: pontkit's frontend API (`/v1/frontend`), the signed-in user's own surface (`/v1/me`: profile, sessions, memberships, billing) and OAuth (`/oauth2`). Organization management goes to the API host (`https://api.{region}.pontive.com/v1/…`) with a bearer token, and needs no proxy. ## The two halves [#the-two-halves] **Forward three prefixes to the auth server** — `/v1/frontend`, `/v1/me` and `/oauth2`, under a base path, `/__pontive` unless you choose another: ``` https://app.acme.com/__pontive/oauth2/token → https:///oauth2/token ``` **Point the SDK at the base path** instead of the auth hostname: ```tsx ``` Those two have to agree. The helpers below derive both from one setting where they can. If you mount the proxy anywhere but `/__pontive` or the root — your app runs under a sub-path, or your gateway already routes `/api/*` — register that path on the app (dashboard → the app's settings → **Proxy paths**). The links Pontive emails during sign-up and sign-in come back through it, and an unregistered path sends them to your bare origin instead. The dashboard tells you when that happens. ## Every recipe, the same four rules [#every-recipe-the-same-four-rules] Whatever does the forwarding: 1. **Send the auth host as `Host`**, not your app's. The auth server resolves which project it is answering as from `Host`; your hostname arrives as "no such project". 2. **Pass `Set-Cookie` through untouched** — every one of them, unscoped, unrenamed, unfolded. 3. **Allow every method** (`GET`, `POST`, `OPTIONS` at least) and **cache nothing**. 4. **Do not follow redirects** on the browser's behalf. The section at the end, *What the proxy must not do*, says why. ## Next.js [#nextjs] A rewrite is enough. A rewrite to an external destination sends the destination's `Host` upstream, which is what the auth server needs. ```js // next.config.mjs import { authProxyRewrites } from "@pontive/pontkit-nextjs/server"; export default { rewrites: async () => authProxyRewrites({ authHost: process.env.PONTIVE_AUTH_HOST }), }; ``` Middleware is for when something has to happen on the way through — a client IP to resolve, a path decided at runtime: ```ts // middleware.ts import { createAuthProxy } from "@pontive/pontkit-nextjs/server"; import { NextResponse } from "next/server"; const authProxy = createAuthProxy({ authHost: process.env.PONTIVE_AUTH_HOST! }); export function middleware(request: Request) { return authProxy.handles(request) ? authProxy.forward(request) : NextResponse.next(); } export const config = { matcher: authProxy.matcher }; ``` ## Vite (development) [#vite-development] Vite has a proxy of its own; what it does not have is the prefixes and `changeOrigin`. ```ts // vite.config.ts import { viteAuthProxy } from "@pontive/pontkit-loader/proxy"; export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), ""); return { server: { proxy: viteAuthProxy({ authHost: env.VITE_PONTIVE_AUTH_HOST }) }, }; }); ``` Worth doing even where the browser tolerates the cross-site setup: a dev server that proxies is rehearsing the topology production runs on. It is also the only way an embedded sign-in works in Safari against a shared Pontive domain. The Vite proxy runs only in development. In production, use the recipe for wherever the built app is hosted. ## Vercel [#vercel] An external rewrite in `vercel.json`. Put the auth rules before your SPA fallback, so they win. ```json { "rewrites": [ { "source": "/__pontive/v1/frontend/:path*", "destination": "https:///v1/frontend/:path*" }, { "source": "/__pontive/v1/me/:path*", "destination": "https:///v1/me/:path*" }, { "source": "/__pontive/oauth2/:path*", "destination": "https:///oauth2/:path*" }, { "source": "/(.*)", "destination": "/index.html" } ] } ``` ## Netlify [#netlify] Proxying rewrites (status `200`) in `_redirects`, again before the SPA fallback: ``` /__pontive/v1/frontend/* https:///v1/frontend/:splat 200 /__pontive/v1/me/* https:///v1/me/:splat 200 /__pontive/oauth2/* https:///oauth2/:splat 200 /* /index.html 200 ``` Or the same in `netlify.toml` as `[[redirects]]` entries with `status = 200`. ## Cloudflare [#cloudflare] A Worker in front of the app, or the Worker that serves it. No dependency needed: ```js export default { async fetch(request, env) { const url = new URL(request.url); const auth = url.pathname.match(/^\/__pontive(\/(?:v1\/frontend|v1\/me|oauth2)\/.*)$/); // Not an auth path: serve the app as usual (static assets binding here). if (!auth) return env.ASSETS.fetch(request); const upstream = new URL(auth[1] + url.search, `https://${env.PONTIVE_AUTH_HOST}`); // A new URL means a new Host — the auth host's. Redirects go back to the // browser as they are. return fetch(new Request(upstream, request), { redirect: "manual" }); }, }; ``` `createAuthProxy` (from `@pontive/pontkit-nextjs/server`) is a Web-standard handler and runs in Workers too, if you would rather use it. ## AWS CloudFront (S3 or any origin) [#aws-cloudfront-s3-or-any-origin] No code beyond a four-line function, because CloudFront's `Origin path` can only prepend. 1. **Origin:** add one for ``, HTTPS only, origin path empty. 2. **Function** (CloudFront Functions, viewer request, runtime `cloudfront-js-2.0`), published: ```js function handler(event) { var request = event.request; request.uri = request.uri.replace(/^\/__pontive(?=\/|$)/, ""); return request; } ``` 3. **Behaviour** on `/__pontive/*` → that origin, with: - viewer protocol policy: redirect HTTP to HTTPS - allowed methods: GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE - cache policy: **Managed-CachingDisabled** - origin request policy: **Managed-AllViewerExceptHostHeader** — *not* AllViewer, which forwards your app's `Host` - function association: viewer request → the function above - **precedence above** your app's own behaviours (e.g. `/*` or a sub-path like `/portal*`), or they catch the request first and serve your `index.html` An app served under a sub-path (`/portal`) uses `/portal/__pontive/*`, strips `/portal/__pontive` in the function, and registers `/portal/__pontive` as a proxy path. ## nginx [#nginx] ```nginx location ~ ^/__pontive/(v1/frontend|v1/me|oauth2)/ { rewrite ^/__pontive/(.*)$ /$1 break; proxy_pass https://; proxy_set_header Host ; proxy_ssl_server_name on; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; } ``` ## Caddy [#caddy] ```txt handle_path /__pontive/* { @auth path /v1/frontend/* /v1/me/* /oauth2/* reverse_proxy @auth https:// { header_up Host {upstream_hostport} } } ``` ## Hosts that only serve files [#hosts-that-only-serve-files] GitHub Pages, a bare S3 website and the like have nowhere to forward a request. Put CloudFront (or Cloudflare) in front of them and use that recipe, or use a custom auth domain and accept Safari's 7-day limit for users who are away longer. ## Checking it works [#checking-it-works] From a terminal, against the deployed app: ```sh # 200, JSON — the request reached the auth server, as your project curl -s https://app.acme.com/__pontive/v1/frontend/runtime-config # 400 "grant_type is required" — POST is forwarded, and answered by the auth server curl -s -X POST https://app.acme.com/__pontive/oauth2/token ``` An HTML page means your app's own routing caught the request: the rule is missing, or ordered after the SPA fallback. A 401 or "no such project" means your app's `Host` reached the auth server (rule 1). ## What the proxy must not do [#what-the-proxy-must-not-do] Each of these fails silently — the requests still work, the session just does not persist: - **Do not rewrite `Set-Cookie`.** The server writes it with no `Domain`, which is what makes it host-only on your origin. Scoping or renaming it undoes the whole exercise. - **Do not fold repeated `Set-Cookie` headers into one.** A cookie carrying an `Expires` date contains a comma, so the fold produces something the browser cannot parse. `createAuthProxy` uses `getSetCookie` for this reason. - **Do not send your own Host upstream.** The auth server resolves which project it is answering as from `Host`. Your hostname arrives as "no such project" and the symptom is a CORS refusal and an empty issuer. - **Do not overwrite `X-Forwarded-For` with the immediate peer.** That forwards the address of whatever CDN is in front of you, so every user upstream looks like one client. - **Do not cache, and do not follow redirects on the browser's behalf.** ## What is deliberately not proxied [#what-is-deliberately-not-proxied] Only the endpoints the browser calls with `fetch` for the session. `/authorize`, the hosted sign-in page and a redirect-mode `/logout` are top-level navigations, and a `SameSite=Lax` cookie is sent on those from any origin — so proxying them buys nothing, and would break: the authorization server builds those URLs on its own hostname, so the browser leaves the proxy at the first redirect regardless. Nor the platform API: account, organization and member management and billing are called on the API host with the user's access token as a bearer token. No cookie is involved, so there is nothing for a proxy to make first-party. --- # Server-side sessions > Read the signed-in session on your server (server components, route handlers, server actions), in browser-SDK or confidential mode. Source: https://www.pontive.com/docs/sdk/server-sessions For an app whose server needs to know who is signed in, or call APIs as them: server components, route handlers, server actions. Your code asks for the session and gets one; the SDK decides how it is kept, from one thing — whether you give it a client secret. | Your app | Configure | Who signs in and refreshes | What the server reads | | --- | --- | --- | --- | | Regular app (embedded widgets), or public oauth app | no client secret | the browser SDK | the access token cookie the auth server keeps current | | Confidential oauth app | `clientSecret` + `sessionSecret` | the SDK, on your server | an encrypted session cookie it keeps | Either way `auth()` returns the same session, and either way exactly one thing spends the refresh token, so refresh-token rotation never signs anyone out. ## Browser-SDK apps [#browser-sdk-apps] The widgets sign the user in and the browser refreshes, as they always have. What this adds is the server's view of that session. It needs the auth proxy (see [auth-proxy.md](/docs/sdk/auth-proxy)): through it the auth server's cookies are first-party on your origin, including an HttpOnly `__Host-pontive_access` holding the current access token. ```ts // lib/pontive.ts import { pontiveAuth } from "@pontive/pontkit-nextjs/server"; export const pontive = pontiveAuth({ issuer: process.env.PONTIVE_ISSUER!, // your auth domain clientId: process.env.PONTIVE_CLIENT_ID!, // the app's id // authPath: "/__pontive", // where the auth proxy is mounted }); ``` ```ts // proxy.ts (middleware.ts before Next 16) import type { NextRequest } from "next/server"; import { pontive } from "@/lib/pontive"; export function proxy(req: NextRequest) { return pontive.middleware(req); } ``` `pontive.auth()` then verifies the access token cookie and returns the user and token. The middleware never refreshes: when a signed-in user loads a page after the access token has lapsed (they came back to a closed tab, say), it sends the browser through the auth server's session handshake, which renews the cookies and returns straight to the page. Fetches and client-side navigations are never redirected; the browser SDK renews the token for those on its own. ## Confidential oauth apps [#confidential-oauth-apps] ```ts // lib/pontive.ts import { pontiveAuth } from "@pontive/pontkit-nextjs/server"; export const pontive = pontiveAuth({ issuer: process.env.PONTIVE_ISSUER!, // your auth domain clientId: process.env.PONTIVE_CLIENT_ID!, // the app's id clientSecret: process.env.PONTIVE_CLIENT_SECRET!, sessionSecret: process.env.PONTIVE_SESSION_SECRET!, // 32+ random characters baseUrl: process.env.PUBLIC_URL, // e.g. https://app.acme.com }); ``` ```ts // app/api/auth/[...pontive]/route.ts import { pontive } from "@/lib/pontive"; export const { GET, POST } = pontive.handlers; ``` ```ts // proxy.ts (middleware.ts before Next 16) import type { NextRequest } from "next/server"; import { pontive } from "@/lib/pontive"; export function proxy(req: NextRequest) { return pontive.middleware(req, (session) => { if (!session && !req.nextUrl.pathname.startsWith("/login")) { return Response.redirect(new URL(`/api/auth/login?returnTo=${req.nextUrl.pathname}`, req.url)); } }); } ``` ```ts // Anywhere on the server const session = await pontive.auth(); session?.user.email; await fetch(api, { headers: { authorization: `Bearer ${session!.accessToken}` } }); ``` Register `https:///api/auth/callback` as a redirect URI and `https:///login` as a post-logout redirect URI on the app. Sign-in starts at `/api/auth/login`, sign-out at `/api/auth/logout`. ## What the confidential mode handles for you [#what-the-confidential-mode-handles-for-you] - **Refresh.** The middleware refreshes the access token shortly before it expires, before anything renders, and hands the refreshed session to the page rendered for that same request. `auth()` only ever reads, so it works in a server component, where cookies cannot be written. - **Rotation.** Each refresh spends the refresh token it presents. Concurrent requests share one refresh, and a request still holding the old cookie a moment later gets the same result instead of spending the old token again. A refresh token presented twice is otherwise read as stolen, and signs the user out. - **Several replicas.** Refreshes that race across instances are absorbed by the auth server's short reuse grace window; no shared lock is needed. - **Nothing in the page.** Both tokens live only in an HttpOnly cookie, encrypted with your session secret. Page JavaScript never sees either. ## Organizations (B2B) [#organizations-b2b] A session can act in one organization. Its access token then says so (`org_id`) along with the user's effective `roles` and `permissions` there, which the auth server re-reads on every refresh, and `session.organization` exposes them: ```ts const session = await pontive.auth(); session?.organization; // { id, roles, permissions } | null ``` The user is never asked to pick one. A sign-in starts in the organization the app names (`/api/auth/login?organization_id=…`, or `organization_id` on `/authorize`), otherwise in the user's only organization, otherwise in none. B2C apps never see one: `organization` is `null`. To move a session, send the browser to the switch route. Both modes support it: a confidential app refreshes into the organization on its server; a browser-SDK app goes through the auth server's session handshake, so the browser stays the only thing that spends its refresh token. ```tsx import { switchOrganizationPath } from "@pontive/pontkit-nextjs/server"; {org.name} ``` A switch the user cannot make (not a member) returns to `returnTo` with `?organization_error=not_a_member` and leaves the session exactly as it was. ## Other frameworks [#other-frameworks] `@pontive/pontkit-server` is the same thing on plain Web `Request`/`Response`: `createServerAuth(config)` returns `handle(request)` for the sign-in routes, `getSession(cookieHeader)`, and `refresh(request)` for whatever runs before your handlers. --- # Using Pontive with NextAuth.js (Auth.js) > Sign people in through Pontive from an app already on NextAuth.js (Auth.js v5), with the generic OIDC provider. Source: https://www.pontive.com/docs/sdk/nextauth Pontive is a standard OpenID Connect provider, so an app already on NextAuth.js (Auth.js v5) can sign people in through it with the generic OIDC provider. This page is the setup, and the four things NextAuth does not do for you. For a new Next.js app, prefer `@pontive/pontkit-nextjs` (`pontiveAuth()` with a client secret): it does the same OIDC code flow on the server, and also refreshes rotating tokens once per session, switches organizations, ends the Pontive session on sign-out and handles invitations — everything below you would otherwise write yourself. This recipe is for apps that already use NextAuth, or use it for several providers. NextAuth signs people in on Pontive's hosted pages: the embedded sign-in widgets are not available to it, and it needs no proxy. ## 1. Register the app in Pontive [#1-register-the-app-in-pontive] In the dashboard, create an app for the instance: | Setting | Value | |---|---| | Type / mode | **Web**, **OAuth** | | Client type | **Confidential** — then generate a client secret (shown once) | | Redirect URIs | `https://app.acme.com/api/auth/callback/pontive` | | Post-logout redirect URIs | `https://app.acme.com/` | | Sign-in URL (`initiate_login_uri`) | `https://app.acme.com/login` (step 4) | | Security → refresh token **Delivery** | **Response body** | The last one matters: a confidential app gets its refresh token as a browser cookie unless it asks for the response body, and NextAuth calls the token endpoint from your server, where a cookie is no use. ## 2. Configure the provider [#2-configure-the-provider] ```sh # .env AUTH_SECRET=… # npx auth secret AUTH_URL=https://app.acme.com PONTIVE_ISSUER=https:// # the app's issuer, no trailing slash PONTIVE_CLIENT_ID=app_… PONTIVE_CLIENT_SECRET=… ``` ```ts // auth.ts import NextAuth from "next-auth"; import type { JWT } from "next-auth/jwt"; const issuer = process.env.PONTIVE_ISSUER!; export const { handlers, auth, signIn, signOut } = NextAuth({ providers: [ { id: "pontive", name: "Pontive", type: "oidc", issuer, // endpoints come from /.well-known/openid-configuration; PKCE and state are on clientId: process.env.PONTIVE_CLIENT_ID, clientSecret: process.env.PONTIVE_CLIENT_SECRET, authorization: { params: { scope: "openid email profile" } }, }, ], callbacks: { async jwt({ token, account, trigger, session }) { // Sign-in: keep what the token endpoint returned. if (account) { return { ...token, accessToken: account.access_token, expiresAt: account.expires_at, refreshToken: account.refresh_token, idToken: account.id_token, }; } // An organization switch asked for with update({ organizationId }). if (trigger === "update" && session?.organizationId) { return refresh(token, session.organizationId); } // Still good for 30 s or more: nothing to do. if (Date.now() < (token.expiresAt as number) * 1000 - 30_000) return token; return refresh(token); }, async session({ session, token }) { session.accessToken = token.accessToken as string; session.idToken = token.idToken as string; session.error = token.error as string | undefined; return session; }, }, }); export const { GET, POST } = handlers; ``` ```ts // app/api/auth/[...nextauth]/route.ts export { GET, POST } from "@/auth"; ``` Pontive's access token carries the session's organization as `org_id`, with `roles` and `permissions`. Decode it (it is a JWT) where you need them, or call `/oauth2/userinfo` with it. ## 3. Refresh rotating tokens [#3-refresh-rotating-tokens] NextAuth does not refresh for you. Pontive rotates refresh tokens: each refresh returns a new one and retires the old, and presenting a retired one more than 30 seconds later revokes the whole chain — the user is signed out. ```ts // auth.ts, continued let tokenEndpoint: string | undefined; async function refresh(token: JWT, organizationId?: string): Promise { tokenEndpoint ??= (await (await fetch(`${issuer}/.well-known/openid-configuration`)).json()) .token_endpoint as string; const body = new URLSearchParams({ grant_type: "refresh_token", refresh_token: token.refreshToken as string, }); // Pontive moves the session to this organization as it refreshes. if (organizationId) body.set("organization_id", organizationId); const response = await fetch(tokenEndpoint, { method: "POST", headers: { "content-type": "application/x-www-form-urlencoded", authorization: "Basic " + Buffer.from(`${process.env.PONTIVE_CLIENT_ID}:${process.env.PONTIVE_CLIENT_SECRET}`).toString("base64"), }, body, }); const tokens = await response.json(); // A refused switch is not a lapsed session: Pontive spent nothing, so keep // the tokens as they were and say why. if (!response.ok && organizationId) return { ...token, switchError: tokens.error_description ?? tokens.error }; if (!response.ok) return { ...token, error: "RefreshTokenError" }; return { ...token, accessToken: tokens.access_token, expiresAt: Math.floor(Date.now() / 1000) + tokens.expires_in, // Rotation: always the new one. Never keep the token just spent. refreshToken: tokens.refresh_token ?? token.refreshToken, idToken: tokens.id_token ?? token.idToken, }; } ``` Two rules keep rotation from signing users out: - **Refresh where NextAuth can write cookies.** NextAuth stores the session — and so the new refresh token — in a cookie, and can only rewrite it in middleware, route handlers and server actions. A refresh during a Server Component render is used once and then lost, and the next request spends the retired token. Run `auth` as middleware so every request refreshes there first: ```ts // middleware.ts export { auth as middleware } from "@/auth"; export const config = { matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"] }; ``` - **Concurrent refreshes are fine within 30 seconds.** Two requests that refresh the same token at once both succeed: Pontive accepts a just-retired token for 30 seconds. Past that, a replay is treated as theft. When `session.error` is `"RefreshTokenError"`, the session is over: send the user to sign in again. ## 4. Invitations: the sign-in URL [#4-invitations-the-sign-in-url] An accepted invitation sends the invitee to the app's **Sign-in URL** with `organization_id` (the organization they joined) and `login_hint` (their address). That URL has to start a sign-in on a plain `GET`, and NextAuth's own routes start one only with a `POST`. So add a route that does: ```ts // app/login/route.ts import { signIn } from "@/auth"; export async function GET(request: Request) { const url = new URL(request.url); const params: Record = {}; for (const name of ["organization_id", "login_hint"]) { const value = url.searchParams.get(name); if (value) params[name] = value; } // Redirects to Pontive with the organization and the address passed on. await signIn("pontive", { redirectTo: "/" }, params); } ``` Register it as the app's Sign-in URL (step 1). The invitee arrives signed in, in the organization they were invited to — Pontive signed them in moments earlier, so they are not asked again. ## 5. Sign-out that ends the Pontive session [#5-sign-out-that-ends-the-pontive-session] `signOut()` clears NextAuth's cookie, but the Pontive session lives on, so the next sign-in goes straight through. To end both, send the browser to Pontive's end-session endpoint afterwards: ```ts // app/logout/route.ts import { auth, signOut } from "@/auth"; export async function GET() { const session = await auth(); await signOut({ redirect: false }); const url = new URL(`${process.env.PONTIVE_ISSUER}/oauth2/logout`); if (session?.idToken) url.searchParams.set("id_token_hint", session.idToken); url.searchParams.set("post_logout_redirect_uri", `${process.env.AUTH_URL}/`); return Response.redirect(url); } ``` `post_logout_redirect_uri` must be one of the app's registered post-logout redirect URIs, or Pontive stops on its own "signed out" page. ## Switching organization [#switching-organization] With the `jwt` callback above, switching is a session update: ```tsx "use client"; import { useSession } from "next-auth/react"; export function SwitchTo({ organizationId }: { organizationId: string }) { const { update } = useSession(); return ; } ``` The refresh moves the Pontive session to that organization. A switch Pontive refuses — the user is not a member — spends nothing: the session stays where it was, and `token.switchError` says why (surface it from the `session` callback if the UI needs it). ## What not to do [#what-not-to-do] - **Do not request `offline_access`** unless the app is allowed offline refresh tokens and you mean it: such a token outlives the Pontive session, so signing out of Pontive no longer signs the user out of your app. - **Do not expose the access token to the browser** unless the browser calls APIs with it. `session.accessToken` above is readable through `/api/auth/session`; keep it server-side if only your server uses it. - **Do not keep the old refresh token** after a refresh — it is retired, and presenting it later revokes the chain. --- # Protect an MCP server with Pontive (TypeScript) > Protect an MCP server or any HTTP API with Pontive access tokens in TypeScript: verification, challenges, protected resource metadata and per-tool scopes. Source: https://www.pontive.com/docs/sdk/mcp-server For an MCP server, or any HTTP API, that accepts tokens a Pontive instance issued for it. Register the API in the dashboard first (*APIs*, with its identifier and scopes). Its identifier is the server's URL, e.g. `https://mcp.acme.com/mcp`. `@pontive/pontkit-server/resource-server` then does the rest: - verifies each request's bearer token on your server, against the issuer's keys (fetched once and cached, so no network call per request); - answers a missing or failing token with the `401` and `WWW-Authenticate` challenge an MCP client follows to sign the user in; - serves your server's protected resource metadata (RFC 9728), which tells the client which authorization server to use; - hands your handler the verified caller as a `Principal`. ```sh npm install @pontive/pontkit-server ``` ## Configure [#configure] ```ts // pontive.ts import { createResourceServer } from "@pontive/pontkit-server/resource-server"; export const rs = createResourceServer({ issuer: process.env.PONTIVE_ISSUER!, // your auth domain, e.g. https://acme.auth.us.pontive.app resource: "https://mcp.acme.com/mcp", // the API's identifier, exactly as registered scopes: ["files:read", "files:write"], // the API's scopes resourceName: "Acme Files", // optional display fields }); ``` | Option | | | --- | --- | | `issuer` | Your auth domain. A list when the instance has a custom auth domain beside its default one: a token from any is accepted, and each is listed in the metadata. | | `resource` | The API's identifier. Tokens must carry it in `aud`; it is also the metadata's `resource`, so the two cannot differ. | | `scopes` | The API's scopes, for `scopes_supported`: keys, or the scopes as the dashboard and `GET /v1/apis/{api_id}` give them (`{ key, description, tools, … }`), whose `tools` say which MCP tools each scope allows ([per tool](#per-tool-scopes)). A verified token carrying a scope not listed here is logged once, so configuration drift shows. | | `unlistedTools` | `"deny"` (default) or `"allow"`: what `requireTool` does with a tool no scope lists ([per tool](#per-tool-scopes)). | | `resourceName`, `resourceDocumentation`, `logoUri` | The metadata's display fields. | | `metadata.fetch` | `{ apiId, credential, managementUrl }`: read the metadata from Pontive instead (below). | | `authorizationServerMetadataProxy` | Also serve `/.well-known/oauth-authorization-server`, proxying the issuer's document, for older MCP clients that ask the resource server for it. Off by default. | | `leewaySeconds` | Clock skew allowed on `exp` and `nbf`. Default 60. | A token is accepted only when it is a Pontive access token (`typ: at+jwt`) signed by one of the issuers' keys, its `iss` is one of the issuers, its `aud` contains `resource`, and it has not expired. An ID token is never accepted. ## Serve it [#serve-it] The metadata lives at `/.well-known/oauth-protected-resource` plus the identifier's path (`https://mcp.acme.com/.well-known/oauth-protected-resource/mcp`), and at the bare path too. Both answer CORS preflight, so a browser-based MCP client can read them. `rs.metadataUrl` is the URL every challenge names. ### Express, with the MCP SDK [#express-with-the-mcp-sdk] ```ts import express from "express"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js"; import { requireBearer, wellKnown } from "@pontive/pontkit-server/resource-server/express"; import { principalOf } from "@pontive/pontkit-server/resource-server/mcp"; import { rs } from "./pontive"; const app = express(); app.use(express.json()); app.use(wellKnown(rs)); // the metadata routes app.post("/mcp", requireBearer(rs, { scopes: ["files:read"] }), async (req, res) => { const server = new McpServer({ name: "acme-files", version: "1.0.0" }); server.registerTool("list_files", { description: "List your files" }, async (extra) => { const caller = principalOf(extra.authInfo)!; // usr_…, svc_… or agt_… return { content: [{ type: "text", text: `files of ${caller.sub}` }] }; }); const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined }); await server.connect(transport); await transport.handleRequest(req, res, req.body); }); ``` `requireBearer` sets `req.principal`, and `req.auth`, the SDK's `AuthInfo` with the principal in `extra.principal`, which the transport passes to every tool as `extra.authInfo`. If you already use the SDK's own `requireBearerAuth`, give it Pontive's verifier instead (the SDK then writes the challenges): ```ts import { requireBearerAuth } from "@modelcontextprotocol/sdk/server/auth/middleware/bearerAuth.js"; import { bearerAuthOptions } from "@pontive/pontkit-server/resource-server/mcp"; app.post("/mcp", requireBearerAuth(bearerAuthOptions(rs, { scopes: ["files:read"] })), handler); ``` `@pontive/pontkit-server/resource-server/mcp` is the only entry that imports `@modelcontextprotocol/sdk`, an optional peer dependency. ### Next.js route handlers [#nextjs-route-handlers] ```ts // app/.well-known/oauth-protected-resource/mcp/route.ts import { rs } from "@/pontive"; export const { GET, OPTIONS } = rs.metadataRoute; ``` ```ts // app/mcp/route.ts import { rs } from "@/pontive"; const guard = rs.requireBearer({ scopes: ["files:read"] }); export async function POST(request: Request) { const caller = await guard(request); if (caller instanceof Response) return caller; // the 401 or 403 // ... hand the request to your MCP transport, e.g. // transport.handleRequest(request, { authInfo: authInfo(rs, caller) }) } ``` ### Hono, Workers, Bun, Deno [#hono-workers-bun-deno] Anything that speaks Web `Request`/`Response`: ```ts app.use("*", async (c, next) => (await rs.handleWellKnown(c.req.raw)) ?? next()); app.post("/mcp", async (c) => { const caller = await rs.requireBearer({ scopes: ["files:read"] })(c.req.raw); if (caller instanceof Response) return caller; // ... }); ``` `rs.verify(request, { scopes })` is the same check, throwing a `BearerError` (`status`, `wwwAuthenticate`, `toResponse()`) instead of returning a response. ## What the client sees [#what-the-client-sees] | Request | Answer | | --- | --- | | No token | `401`, `WWW-Authenticate: Bearer resource_metadata=""`, plus `scope=""` when the route declares any | | A token that fails (expired, another audience or issuer, an ID token, a bad signature) | the same `401`, plus `error="invalid_token"` | | A valid token without a scope the route needs | `403`, `WWW-Authenticate: Bearer error="insufficient_scope", scope="", resource_metadata=""` | | A `tools/call` for a tool whose scopes the token holds none of | `403`, `WWW-Authenticate: Bearer error="insufficient_scope", scope="", resource_metadata=""`; any one of them would do | | A `tools/call` for a tool no scope lists (`unlistedTools: "deny"`) | `403`, `WWW-Authenticate: Bearer resource_metadata=""`: no scope could allow it, so the client is not asked to step up | The MCP SDK's client answers a `403` with `error="insufficient_scope"` by authorizing again for the scopes the challenge names (step-up), then retrying. ## Per-tool scopes [#per-tool-scopes] Tool import (dashboard, *APIs → Scopes → Import MCP tools*) turns your server's `tools/list` result into scopes: one `tool:` scope per tool, or groups you name (`files:write` for `write_file` and `move_file`), each listing the tools it allows. A tool may sit in more than one scope; a token holding **any** scope that lists a tool may call it. **Where the map comes from.** Give the resource server the scopes with their tools, as the dashboard shows them or `GET /v1/apis/{api_id}` returns them, so the check needs no credential and no network call: ```ts export const rs = createResourceServer({ issuer: process.env.PONTIVE_ISSUER!, resource: "https://mcp.acme.com/mcp", scopes: [ { key: "files:write", description: "Change your files", tools: [{ name: "write_file" }, { name: "move_file" }] }, { key: "tool:list_files", description: "List your files", tools: [{ name: "list_files" }] }, ], }); ``` With [`metadata.fetch`](#metadata-kept-in-the-dashboard) and no tools in `scopes`, the map is read from the API in Pontive instead (`GET /v1/apis/{api_id}`, the same credential, `sys:api:read`) on the first tool call, and cached for five minutes like the metadata. A failed refresh keeps the last map. **Refuse at the HTTP layer,** before the MCP transport sees the call, so the refusal is the `403` a client steps up from. A tool handler can only answer inside a `200`. In Express, after `express.json()` and `requireBearer` (or the SDK's `requireBearerAuth` with `bearerAuthOptions`): ```ts import { requireBearer, requireToolScopes } from "@pontive/pontkit-server/resource-server/express"; app.post("/mcp", requireBearer(rs), requireToolScopes(rs), handler); ``` Anywhere else, check the parsed body yourself and hand the same body to the transport: ```ts const caller = await rs.requireBearer()(request); if (caller instanceof Response) return caller; const body = await request.json(); try { await rs.authorizeToolCalls(caller, body); // every tools/call in the message or batch } catch (err) { if (err instanceof BearerError) return err.toResponse(); throw err; } return transport.handleRequest(request, { authInfo: authInfo(rs, caller), parsedBody: body }); ``` **Hold every handler to it too** with `withToolScopes`: every tool registered on the server afterwards (`registerTool`, `tool`, and a later `update({ callback })`) runs only for a principal holding one of its scopes, and answers a tool error naming them otherwise. It is what holds when the HTTP check is missed: ```ts import { withToolScopes } from "@pontive/pontkit-server/resource-server/mcp"; const server = withToolScopes(new McpServer({ name: "acme-files", version: "1.0.0" }), rs); server.registerTool("write_file", { description: "Write a file" }, handler); ``` | Call | | | --- | --- | | `rs.scopesForTool(name)` | The scopes listing the tool; empty when none does | | `rs.authorizeTool(principal, name)` | Throws the `403` `BearerError` unless the principal holds one of them | | `rs.authorizeToolCalls(principal, body)` | `authorizeTool` for every `tools/call` in a JSON-RPC message or batch; anything else passes | | `rs.requireTool(name, { scopes }?)` | A guard for a Web-standard handler serving one tool: the principal, or the `401`/`403` response | **A tool no scope lists** is refused by default, and logged once: a tool added to the server after the last import stays uncallable until the import lists it, rather than open to every token. `unlistedTools: "allow"` lets any valid token call it. ## The principal [#the-principal] ```ts type Principal = { sub: string; // usr_…, svc_… or agt_…: whom the token speaks for kind: "user" | "service_account" | "agent"; // from the sub's prefix clientId: string; orgId?: string; roles: string[]; permissions: string[]; scopes: string[]; isDelegated: boolean; // an agent acting for the user in sub actor?: { // who acts for the subject (the act claim) sub: string; // agt_… (delegated) or svc_… (an API calling downstream) kind: "agent" | "service_account"; agentInstance?: string; }; agentInstance?: string; // when the subject itself is an agent token: string; // the raw token }; ``` **A delegated principal is not the user.** When an agent holds a token for a user (`isDelegated: true`, `actor.kind: "agent"`), `sub` is the user and `kind` is `"user"`, but the caller is the agent, and its authority is the intersection of the user's and the agent's. A handler that reads or writes by `principal.sub` alone would act with the user's full authority. Check with the authorization client instead, which sends the token and lets Pontive evaluate the pair, or branch on `principal.isDelegated`: ```ts import { createAuthorizationClient } from "@pontive/pontkit-server/authorization"; const authz = createAuthorizationClient({ managementUrl: "https://api.us.pontive.com", issuer: "https://acme.auth.us.pontive.app", credential: { clientId: process.env.PONTIVE_CLIENT_ID!, clientSecret: process.env.PONTIVE_CLIENT_SECRET! }, }); await authz.check(principal, "doc:write", { type: "doc", id: "doc_1" }, { scopes: ["files:write"] }); await authz.checkBatch(principal, docs.map((d) => ({ permission: "doc:read", resource: { type: "doc", id: d.id } }))); await authz.listAccessible(principal, { resourceType: "doc", permission: "doc:read" }); ``` The credential must hold `sys:authz:check`. A token whose actor is neither an agent nor a service account is refused as `invalid_token`. A `svc_` actor is a registered API's backend calling downstream for the user: only the user is evaluated, so it is not delegated. **Scopes are consent, not permission.** A scope says the user let this client do something on their behalf; whether the user may do it at all is your check, on `roles` and `permissions` (or Pontive's authorization check). Refuse a write the user holds no permission for, whatever scopes the token carries. ## Metadata kept in the dashboard [#metadata-kept-in-the-dashboard] By default the metadata is built from your configuration and needs no credential. To serve the scopes and display fields kept in the dashboard instead, fetch it from Pontive; it is cached for five minutes: ```ts createResourceServer({ issuer: process.env.PONTIVE_ISSUER!, resource: "https://mcp.acme.com/mcp", metadata: { fetch: { apiId: "api_…", managementUrl: "https://api.us.pontive.com", // your region's management API // The API's backend service account. A token, or a function returning one, works too. credential: { clientId: process.env.PONTIVE_SA_ID!, clientSecret: process.env.PONTIVE_SA_SECRET! }, }, }, }); ``` --- # Secure an MCP server with Pontive and Envoy > Check Pontive access tokens for an MCP server at an Envoy proxy, with jwt_authn and RBAC. Source: https://www.pontive.com/docs/sdk/mcp-server-envoy For an MCP server behind [Envoy](https://www.envoyproxy.io). Envoy's `jwt_authn` filter checks every request's Pontive access token against your instance's keys before it reaches your server, an RBAC rule requires a scope, and Envoy itself serves the server's protected resource metadata (RFC 9728) and the `401` challenge that points MCP clients at it. MCP clients such as Claude Code then sign the user in at your Pontive instance on their own. ``` MCP client ──► Envoy (jwt_authn, RBAC) ──► your MCP server │ 401 + resource_metadata └──► Pontive (sign-in, consent, token for the API) ``` Envoy needs nothing Pontive-specific: Pontive is a standard OAuth 2.1 authorization server, and the token is a signed JWT. Tested with Envoy v1.40.2. The configuration below runs in Pontive's conformance suite against a live instance on every run. ## 1. Register the MCP server as an API, and find your issuer [#1-register-the-mcp-server-as-an-api-and-find-your-issuer] As in the [agentgateway guide](/docs/sdk/mcp-server-agentgateway#1-register-the-mcp-server-as-an-api): the API's identifier is the server's **public MCP URL** (`https://mcp.acme.com/mcp`), mark it `third_party` and add it to the third-party client profile so MCP clients can connect, and give it its scopes. This guide's RBAC rule requires `files:read`. Your issuer is your auth domain, e.g. `https://acme.auth.us.pontive.app`, and its keys are at its discovery document's `jwks_uri`: `https://acme.auth.us.pontive.app/oauth2/jwks.json`. ## 2. Configure Envoy [#2-configure-envoy] ```yaml # envoy.yaml static_resources: listeners: - name: mcp address: socket_address: { address: 0.0.0.0, port_value: 8080 } filter_chains: - filters: - name: envoy.filters.network.http_connection_manager typed_config: "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager stat_prefix: mcp route_config: virtual_hosts: - name: mcp domains: ["*"] routes: # The protected resource metadata, at the identifier's well-known # path and the bare one. MCP clients read it after the 401. - match: { path: /.well-known/oauth-protected-resource/mcp } direct_response: &metadata status: 200 body: inline_string: '{"resource":"https://mcp.acme.com/mcp","authorization_servers":["https://acme.auth.us.pontive.app"],"scopes_supported":["files:read","files:write"],"bearer_methods_supported":["header"],"resource_name":"Acme Files"}' response_headers_to_add: &metadata_headers - header: { key: content-type, value: application/json } - header: { key: cache-control, value: max-age=300 } - header: { key: access-control-allow-origin, value: "*" } - match: { path: /.well-known/oauth-protected-resource } direct_response: *metadata response_headers_to_add: *metadata_headers - match: { path: /mcp } route: { cluster: mcp_server, timeout: 60s } # Envoy's own 401 and 403 carry the challenges an MCP client acts on. local_reply_config: mappers: # jwt_authn answers 403 for a token for another audience; it is an # invalid token for this API (RFC 6750 §3.1), so 401. - filter: extension_filter: name: envoy.access_loggers.extension_filters.cel typed_config: "@type": type.googleapis.com/envoy.extensions.access_loggers.filters.cel.v3.ExpressionFilter expression: response.code == 403 && response.code_details.startsWith("jwt_authn_access_denied") status_code: 401 headers_to_add: - header: { key: www-authenticate, value: 'Bearer resource_metadata="https://mcp.acme.com/.well-known/oauth-protected-resource/mcp", scope="files:read", error="invalid_token"' } append_action: OVERWRITE_IF_EXISTS_OR_ADD - filter: and_filter: filters: - status_code_filter: { comparison: { op: EQ, value: { default_value: 401, runtime_key: unused_401 } } } - header_filter: { header: { name: authorization, present_match: true } } headers_to_add: - header: { key: www-authenticate, value: 'Bearer resource_metadata="https://mcp.acme.com/.well-known/oauth-protected-resource/mcp", scope="files:read", error="invalid_token"' } append_action: OVERWRITE_IF_EXISTS_OR_ADD - filter: status_code_filter: { comparison: { op: EQ, value: { default_value: 401, runtime_key: unused_401b } } } headers_to_add: - header: { key: www-authenticate, value: 'Bearer resource_metadata="https://mcp.acme.com/.well-known/oauth-protected-resource/mcp", scope="files:read"' } append_action: OVERWRITE_IF_EXISTS_OR_ADD - filter: status_code_filter: { comparison: { op: EQ, value: { default_value: 403, runtime_key: unused_403 } } } headers_to_add: - header: { key: www-authenticate, value: 'Bearer error="insufficient_scope", scope="files:read", resource_metadata="https://mcp.acme.com/.well-known/oauth-protected-resource/mcp"' } append_action: OVERWRITE_IF_EXISTS_OR_ADD http_filters: - name: envoy.filters.http.jwt_authn typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication providers: pontive: issuer: https://acme.auth.us.pontive.app audiences: ["https://mcp.acme.com/mcp"] # the API's identifier remote_jwks: http_uri: uri: https://acme.auth.us.pontive.app/oauth2/jwks.json cluster: pontive_jwks timeout: 5s cache_duration: 300s async_fetch: {} retry_policy: {} forward: true # your server receives the token too payload_in_metadata: jwt_payload clock_skew_seconds: 60 rules: - match: { prefix: /.well-known/ } # the metadata: no token - match: { prefix: / } requires: { provider_name: pontive } # The token must carry files:read. Pontive's scope claim is one # space-separated string. - name: envoy.filters.http.rbac typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.rbac.v3.RBAC rules: action: ALLOW policies: metadata: permissions: [{ url_path: { path: { prefix: /.well-known/ } } }] principals: [{ any: true }] scope: permissions: [{ any: true }] principals: - sourced_metadata: metadata_source: DYNAMIC metadata_matcher: filter: envoy.filters.http.jwt_authn path: [{ key: jwt_payload }, { key: scope }] value: { string_match: { safe_regex: { regex: "(.* )?files:read( .*)?" } } } - name: envoy.filters.http.router typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - name: mcp_server # your MCP server type: STRICT_DNS load_assignment: cluster_name: mcp_server endpoints: - lb_endpoints: - endpoint: address: socket_address: { address: files-mcp.internal, port_value: 8080 } - name: pontive_jwks # your auth domain, for the keys type: LOGICAL_DNS dns_lookup_family: V4_ONLY load_assignment: cluster_name: pontive_jwks endpoints: - lb_endpoints: - endpoint: address: socket_address: { address: acme.auth.us.pontive.app, port_value: 443 } transport_socket: name: envoy.transport_sockets.tls typed_config: "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext sni: acme.auth.us.pontive.app common_tls_context: validation_context: trusted_ca: { filename: /etc/ssl/certs/ca-certificates.crt } match_typed_subject_alt_names: - san_type: DNS matcher: { exact: acme.auth.us.pontive.app } ``` | Part | Why | | --- | --- | | `direct_response` routes | Envoy serves the metadata itself. `resource` is the identifier, `authorization_servers` your issuer, `scopes_supported` the API's scopes. Keep them equal to the API's, or fetch the document from `GET /v1/apis/{api_id}/resource-metadata` when you deploy. | | `jwt_authn` provider | `issuer` is compared with `iss`, `audiences` with `aud`: a token for another API, or with no `resource` (its `aud` is the client's own id), is refused. `remote_jwks` fetches Pontive's keys through the `pontive_jwks` cluster, over TLS, and caches them. | | `rules` | The metadata paths need no token; everything else needs a Pontive token. | | `forward: true` | Your server receives the token too, to verify it again (for example with `@pontive/pontkit-server`'s middleware, [mcp-server.md](/docs/sdk/mcp-server), with the same identifier) or to read the caller. Its audience is this API, so this is not token passthrough to another API. | | RBAC | Requires a scope. Envoy sees HTTP, not MCP: it cannot tell one tool from another (below). | | `local_reply_config` | Envoy's own `401` and `403` get the `WWW-Authenticate` headers pontkit's middleware sends: `resource_metadata` and `scope`, `error="invalid_token"` when a token was sent, and `insufficient_scope` on RBAC's `403`. `jwt_authn` answers a token for another audience with `403`; the first mapper makes it the `401 invalid_token` RFC 6750 asks for, so the client signs in again instead of giving up. Only Envoy's own replies are rewritten, never your server's. | **Several auth domains.** A token's `iss` is the auth domain that served it. With a custom auth domain beside the default one, add a provider per domain (each with its `remote_jwks` and cluster) and require either: `requires: { requires_any: { requirements: [{ provider_name: pontive }, { provider_name: pontive_custom }] } }`. List both in the metadata's `authorization_servers`. ## 3. Run it [#3-run-it] ```sh docker run --rm -p 8080:8080 -v "$PWD/envoy.yaml:/etc/envoy/envoy.yaml:ro" \ envoyproxy/envoy:v1.40.2 -c /etc/envoy/envoy.yaml ``` In front of it, your TLS terminator serves `https://mcp.acme.com`, the origin of the identifier. ## What the client sees [#what-the-client-sees] | Request | Answer from Envoy | | --- | --- | | No token | `401`, `WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource/mcp", scope="files:read"` | | A token that fails: bad signature, expired, another audience or issuer | the same, plus `error="invalid_token"` | | A valid token without `files:read` | `403`, `WWW-Authenticate: Bearer error="insufficient_scope", scope="files:read", resource_metadata="…"` | | A valid token | the request goes to your server, with the token | ## Test it [#test-it] ```sh curl -s https://mcp.acme.com/.well-known/oauth-protected-resource/mcp | jq curl -si -X POST https://mcp.acme.com/mcp | grep -i www-authenticate ``` A service account with a client grant on the API gets a token without a user: ```sh TOKEN=$(curl -s https://acme.auth.us.pontive.app/oauth2/token \ -u "$SVC_ID:$SVC_SECRET" \ -d grant_type=client_credentials \ -d resource=https://mcp.acme.com/mcp | jq -r .access_token) curl -s https://mcp.acme.com/mcp -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}' ``` With a user, from Claude Code: ```sh claude mcp add --transport http acme-files https://mcp.acme.com/mcp ``` Then `/mcp` in Claude Code, *Authenticate*: it reads the metadata, registers with your instance, opens the sign-in and consent page, and connects. ## Per tool, and per permission [#per-tool-and-per-permission] Envoy authorizes the HTTP request, so the RBAC rule applies to every MCP method alike. For one scope per tool (`tool:`, from Pontive's tool import), check the tool in your server: pontkit's middleware maps a tool call to its scope ([mcp-server.md](/docs/sdk/mcp-server)). agentgateway parses MCP and checks tool scopes at the gateway ([agentgateway guide](/docs/sdk/mcp-server-agentgateway)). Scopes are consent, not permission: whether the user may do what a call asks is your server's check, on the token's `roles` and `permissions` or Pontive's authorization check. A Pontive external authorization service for Envoy's `ext_authz` filter is planned: a container you run beside Envoy that maps routes and MCP tools to permissions and answers each call with one authorization and billing decision. Until then, `jwt_authn` and RBAC as above are the gateway's part. ## See also [#see-also] - [Secure an MCP server with Pontive and agentgateway](/docs/sdk/mcp-server-agentgateway) - [Protect an MCP server with Pontive (TypeScript)](/docs/sdk/mcp-server) --- # Secure an MCP server with Pontive and agentgateway > Check Pontive access tokens for an MCP server at agentgateway, which also serves its protected resource metadata. Source: https://www.pontive.com/docs/sdk/mcp-server-agentgateway For an MCP server that runs behind [agentgateway](https://agentgateway.dev). agentgateway checks every request's Pontive access token before the request reaches your server, serves the server's protected resource metadata (RFC 9728), and shows each caller only the tools its token's scopes allow. MCP clients such as Claude Code then sign the user in at your Pontive instance on their own. ``` MCP client ──► agentgateway ──► your MCP server │ 401 + resource_metadata (token forwarded, or not: below) └──► Pontive (sign-in, consent, token for the API) ``` This uses agentgateway's generic configuration. **Do not set a `provider` block.** agentgateway's providers (`keycloak`, `auth0`, `okta`, `entra`, …) make the gateway stand in for an authorization server that lacks parts of the MCP authorization spec. Pontive has them all: authorization server metadata (RFC 8414), resource indicators (RFC 8707), and client registration by client ID metadata documents (CIMD) and dynamic client registration (DCR). Clients talk to Pontive directly. Tested with agentgateway v1.7.0. The configuration below runs in Pontive's conformance suite against a live instance on every run. ## 1. Register the MCP server as an API [#1-register-the-mcp-server-as-an-api] The API's identifier is the server's **public MCP URL**, the one clients connect to: the gateway's URL, not your server's internal address. Tokens for the API carry it in `aud`, and the gateway checks it. In the dashboard: *APIs* → *New API*, identifier `https://mcp.acme.com/mcp`. Or with a secret key: ```sh curl -sS https://api.us.pontive.com/v1/apis \ -H "Authorization: Bearer $PONTIVE_SECRET_KEY" \ -H "X-Pontive-Instance-ID: $PONTIVE_INSTANCE_ID" \ -H "Content-Type: application/json" \ -d '{ "identifier": "https://mcp.acme.com/mcp", "name": "Acme Files", "third_party": true, "scopes": [ { "key": "tool:list_files", "description": "List your files" }, { "key": "tool:read_file", "description": "Read a file" } ] }' ``` **One scope per tool.** Tool import writes them for you from your server's `tools/list` result: one `tool:` scope per tool, with the tool's description, which the consent screen then shows. Send the result (`{ "tools": [...] }`, every page at once). Without `dry_run: false` the call only returns the diff: ```sh jq '. + { dry_run: false }' tools-list.json | curl -sS https://api.us.pontive.com/v1/apis/$API_ID/scopes/import \ -H "Authorization: Bearer $PONTIVE_SECRET_KEY" \ -H "X-Pontive-Instance-ID: $PONTIVE_INSTANCE_ID" \ -H "Content-Type: application/json" \ -d @- ``` The gateway rule in step 3 lets a caller list and call a tool only when its token carries that tool's scope. **Let MCP clients connect.** Claude, Claude Code, ChatGPT, Cursor and VS Code are third-party clients: they register themselves (CIMD or DCR) and reach an API only through the instance's third-party client profile. With `third_party: true` on the API, turn the admission on and add the API to the profile (dashboard: *Settings* → *Third-party clients*): ```sh curl -sS -X PATCH https://api.us.pontive.com/v1/apps/settings \ -H "Authorization: Bearer $PONTIVE_SECRET_KEY" \ -H "X-Pontive-Instance-ID: $PONTIVE_INSTANCE_ID" \ -H "Content-Type: application/json" \ -d '{ "cimd": "open", "dcr": "on", "profile": { "apis": [{ "api_id": "'"$API_ID"'", "scopes": null }] } }' ``` `profile.apis` replaces the list: include the APIs already in it. A client registered this way that nobody consents to within 24 hours is removed, and so is one with no consent and no live refresh token for 90 days. It registers again the next time a user connects it. ## 2. Find your issuer [#2-find-your-issuer] Your issuer is your instance's auth domain, e.g. `https://acme.auth.us.pontive.app`. Its discovery document names the key set: ```sh curl -s https://acme.auth.us.pontive.app/.well-known/oauth-authorization-server | jq -r .jwks_uri # https://acme.auth.us.pontive.app/oauth2/jwks.json ``` Pontive serves its keys at `/oauth2/jwks.json`, and from auth-api 1.48.0 at `/.well-known/jwks.json` too, which is agentgateway's default for a configuration without a provider. `jwks.url` is therefore optional; the example below keeps it so the key set it verifies against is explicit. ## 3. Configure agentgateway [#3-configure-agentgateway] ```yaml # config.yaml # yaml-language-server: $schema=https://agentgateway.dev/schema/config binds: - port: 3000 listeners: - routes: - name: mcp matches: - path: exact: /mcp - path: exact: /.well-known/oauth-protected-resource/mcp backends: - mcp: targets: - name: files mcp: host: http://files-mcp.internal:8080/mcp # your MCP server policies: cors: allowOrigins: - "*" allowHeaders: - authorization - content-type - mcp-protocol-version - mcp-session-id exposeHeaders: - mcp-session-id - www-authenticate mcpAuthentication: mode: strict issuer: https://acme.auth.us.pontive.app audiences: - https://mcp.acme.com/mcp # the API's identifier jwks: # optional: defaults to /.well-known/jwks.json url: https://acme.auth.us.pontive.app/oauth2/jwks.json jwtValidationOptions: requiredClaims: [exp, iss, aud, sub] resourceMetadata: resource: https://mcp.acme.com/mcp # the same identifier scopesSupported: - tool:list_files - tool:read_file bearerMethodsSupported: - header resourceName: Acme Files mcpAuthorization: rules: # A tool is listed and callable only with its tool scope. # Pontive's scope claim is one space-separated string. - allow: '("tool:" + mcp.tool.name) in jwt.scope.split(" ")' # Only when the server behind checks the same token itself (below). backendAuth: passthrough: {} ``` | Setting | Why | | --- | --- | | `matches` | The MCP endpoint and its metadata path. The metadata path is `/.well-known/oauth-protected-resource` plus the identifier's path (RFC 9728 §3.1). agentgateway answers it itself, without a token. | | `issuer` | Your auth domain, compared with the token's `iss`. | | `audiences` | The API's identifier. A token Pontive issued for another API, or with no `resource` (its `aud` is then the client's own id), is refused. | | `jwks.url` | Optional. Pontive's `jwks_uri`; without it agentgateway uses `/.well-known/jwks.json`, which serves the same keys. agentgateway fetches and caches them. | | `requiredClaims` | Pontive access tokens always carry these; requiring them refuses anything else. | | `resourceMetadata` | The metadata agentgateway serves. With no `provider`, its `authorization_servers` is your `issuer`, so clients go to Pontive. `scopesSupported` should be the API's scopes. | | `mcpAuthorization` | The tool rule above. Without it, any valid token for the API may call every tool. A rule can use any claim: `jwt.sub`, `jwt.org_id`, `jwt.roles`, `jwt.permissions`. | | `backendAuth: passthrough` | Forwards the caller's token to your server. Keep it if your server verifies the token too (for example with `@pontive/pontkit-server`'s resource-server middleware, [mcp-server.md](/docs/sdk/mcp-server), configured with the same identifier), or if it reads the caller from the token. Leave it out otherwise. The token's audience is this API, so forwarding it to the server behind the gateway is not token passthrough to another API. | Pontive's access tokens carry `sub` (`usr_…`, `svc_…` or `agt_…`), `client_id`, `scope`, `org_id`, `roles` and `permissions`, and `act` when an agent acts for a user. All are usable in `mcpAuthorization` rules and in agentgateway's other CEL policies, such as rate limits keyed on `jwt.sub`. **Session key.** agentgateway encrypts MCP session ids. Set `SESSION_KEY` (32 random bytes as hex, `openssl rand -hex 32`), the same on every replica; without it agentgateway writes a generated key into `config.yaml`. ## 4. Run it [#4-run-it] ```sh docker run --rm -p 3000:3000 \ -e SESSION_KEY="$(openssl rand -hex 32)" \ -v "$PWD/config.yaml:/config.yaml:ro" \ cr.agentgateway.dev/agentgateway:v1.7.0 -f /config.yaml ``` Or the release binary: `agentgateway -f config.yaml`. In front of it, your TLS terminator serves `https://mcp.acme.com`, which must be the origin of the identifier. ## What the client sees [#what-the-client-sees] | Request | Answer from agentgateway | | --- | --- | | No token | `401`, `WWW-Authenticate: Bearer resource_metadata="https://mcp.acme.com/.well-known/oauth-protected-resource/mcp"` | | A token that fails: bad signature, expired, another audience or issuer | the same `401` | | A valid token without a tool's scope | the tool is missing from `tools/list`, and `tools/call` for it is a JSON-RPC error | | A valid token | the request goes to your server | agentgateway's challenge has no `scope` or `error="invalid_token"`, unlike pontkit's middleware. MCP clients need only `resource_metadata`: they read the metadata, then sign the user in at Pontive. ## Test it [#test-it] The metadata, and the challenge: ```sh curl -s https://mcp.acme.com/.well-known/oauth-protected-resource/mcp | jq curl -si -X POST https://mcp.acme.com/mcp | grep -i www-authenticate ``` A token without a user: a service account with a client grant on the API (*APIs* → the API → *Clients*), then its `client_credentials` token for the API: ```sh TOKEN=$(curl -s https://acme.auth.us.pontive.app/oauth2/token \ -u "$SVC_ID:$SVC_SECRET" \ -d grant_type=client_credentials \ -d resource=https://mcp.acme.com/mcp | jq -r .access_token) curl -s https://mcp.acme.com/mcp -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}' ``` With a user, from Claude Code: ```sh claude mcp add --transport http acme-files https://mcp.acme.com/mcp ``` Then run `/mcp` in Claude Code and choose *Authenticate*. It reads the metadata, registers with your instance, opens the sign-in and consent page (listing the tools the user allows), and connects with the token it gets. ## Limits [#limits] - **One issuer per route.** `mcpAuthentication` takes one `issuer`. A token's `iss` is the auth domain that served it, so with a custom auth domain beside the default one, set the domain your clients use: MCP clients use the one the metadata names. pontkit's middleware and Envoy (`jwt_authn`, several providers) accept a list. - **`typ` is not checked.** agentgateway does not check that the token is an access token (`typ: at+jwt`). A Pontive ID token never carries an API's identifier as `aud`, so the audience check refuses it anyway. A server that verifies with pontkit's middleware checks `typ` too. - **Scopes are consent, not permission.** A tool scope says the user let the client call the tool. Whether the user may do what the call asks is your server's check, on `roles` and `permissions` or Pontive's authorization check ([mcp-server.md](/docs/sdk/mcp-server#the-principal)). agentgateway can also call an external authorization service per request (`extAuthz`); a Pontive decision service for it, which checks permissions and records usage in one call, is planned. ## See also [#see-also] - [Secure an MCP server with Pontive and Envoy](/docs/sdk/mcp-server-envoy) - [Protect an MCP server with Pontive (TypeScript)](/docs/sdk/mcp-server), the middleware in your server --- # Permission-aware RAG with Pontive (TypeScript) > Drop every retrieved passage the caller may not read before it reaches a model, with Pontive's authorization client. Source: https://www.pontive.com/docs/sdk/permission-aware-rag A retrieval step (vector search, keyword search, a reranker) finds the passages most relevant to a question. It does not know who is asking. Before those passages reach a model, drop every one the caller may not read, or the model will quote a document to someone who could never have opened it. `filterAccessible` in `@pontive/pontkit-server/authorization` does that step: it takes the retrieved candidates and returns the ones the principal holds a permission on, in their order. ```sh npm install @pontive/pontkit-server ``` ## The shape of it [#the-shape-of-it] 1. **Retrieve candidates** as you do today, but over-fetch: ask the index for more than you will use (say 50 when the prompt takes 10), since some will be filtered out. 2. **Filter** the candidates with `filterAccessible`, for the principal the request is for. 3. **Take the top k** of what is left and build the prompt. Filter after retrieval, not before. Pontive is the source of truth for who may read what; copying access lists into the vector index means a revoked share stays searchable until the index is rebuilt. If your index can cheaply narrow by tenant (an organization id stored with each vector), do that as well: it shrinks the candidate set, but it does not replace the check. Each candidate needs the id of the Pontive resource that governs it: the `res_…` id of the document a chunk came from. Store it with the chunk when you index it. Chunks of one document share the id; `filterAccessible` checks it once and keeps or drops them together. A candidate whose id is missing is dropped, never sent. ## Who the check is for [#who-the-check-is-for] `filterAccessible` takes a `Principal`, the caller your resource server verified (see [Protect an MCP server with Pontive](/docs/sdk/mcp-server#the-principal)). It decides how to ask Pontive from the principal itself. **An agent acting for a user** (an MCP client, an assistant with a delegated token: `principal.isDelegated`). `sub` is the user, but the caller is the agent, and it may read only what *both* the user and the agent may read. The client sends the token, and Pontive answers for that intersection. Never filter by `principal.sub` for such a caller: that answers for the user alone, wider than the agent may act. **Your backend acting for a user** (a signed-in user's request to your own API, or a service account calling downstream for the user). The principal is not delegated, and the user is checked by subject, as themselves. The same call covers both: ```ts const visible = await authz.filterAccessible(principal, candidates, (c) => c.docId, { resourceType: "doc", permission: "doc:read", }); ``` A delegated principal's token is never put in a URL: its listings are `POST`s with the token in the body. ## Two strategies, and the threshold [#two-strategies-and-the-threshold] Pontive answers "which of these may the principal read" in two ways, and `filterAccessible` picks one by the number of distinct ids among the candidates: | | Batch check (`checkBatch`) | Listing (`listAccessible`) | | --- | --- | --- | | Used when | distinct ids ≤ `threshold` | distinct ids > `threshold` | | Requests | one per 100 ids (`POST /access/v1/evaluations`) | one per page of 100 resources the principal reaches (`POST /access/v1/search/resource`) | | Metered checks | one per id | one per listing request (per page) | | Cost grows with | the candidate count | the principal's reach | The default `threshold` is **100**: up to 100 ids are one batch request, as few as any listing takes, and its cost is known before you send it, whatever the principal can reach. Above 100, a batch needs more requests and more checks, while a listing's cost depends only on how many documents the principal reaches, which is usually far smaller than the candidate count for a narrow user, and can be far larger for an administrator. Tune it to your data: - Most principals reach few documents, and you retrieve hundreds of candidates: lower the threshold (`threshold: 0` always lists). - Some principals reach tens of thousands of documents (administrators, a shared corpus): raise it (`threshold: Infinity` always checks by batch). A listing is capped at 10,000 resources (`maxListed`). A principal who reaches more makes `filterAccessible` throw a `ListingTooLargeError`, after the first page, rather than page through everything. Catch it and fall back to a batch over the candidates, or raise `maxListed` if paging that far is what you want. ## Scopes [#scopes] Pontive does not interpret OAuth scopes in a check. If your API's read needs a scope (`docs:read`), pass it, and every candidate is dropped unless the token was granted it: ```ts await authz.filterAccessible(principal, candidates, (c) => c.docId, { resourceType: "doc", permission: "doc:read", scopes: ["docs:read"], }); ``` Scopes are consent, not permission: they say the user let this client read documents on their behalf, and the permission check says which ones the user (and the agent) may read. Without the scope, a listing is not even sent. ## Metering [#metering] A check against a custom resource type counts as one authorization check. A batch of 100 ids is 100 checks. A listing request counts as one check, whatever it returns; `filterAccessible` lists 100 resources per page, so a principal who reaches 2,500 documents costs 25 checks for any number of candidates. A delegated principal's check or listing counts the same as any other. ## A full example [#a-full-example] An MCP tool, `search_docs`, that answers from the documents the caller may read. The same handler serves an agent acting for a user and a user calling your API directly. ```ts // search.ts import { createAuthorizationClient, ListingTooLargeError } from "@pontive/pontkit-server/authorization"; import type { Principal } from "@pontive/pontkit-server/resource-server"; export const authz = createAuthorizationClient({ managementUrl: process.env.PONTIVE_MANAGEMENT_URL!, // e.g. https://api.us.pontive.com issuer: process.env.PONTIVE_ISSUER!, // e.g. https://acme.auth.us.pontive.app // A service account holding sys:authz:check in the instance. credential: { clientId: process.env.PONTIVE_CLIENT_ID!, clientSecret: process.env.PONTIVE_CLIENT_SECRET! }, }); interface Chunk { docId: string; // the Pontive resource id (res_…) of the document the chunk came from text: string; score: number; } // Your vector store: the n chunks nearest the query, best first. declare function nearestChunks(query: string, n: number, filter: { orgId?: string }): Promise; const TOP_K = 8; const CANDIDATES = 64; export async function retrieve(principal: Principal, query: string): Promise { // Narrow by organization in the index when you store it; the check below still decides. const candidates = await nearestChunks(query, CANDIDATES, { orgId: principal.orgId }); const filter = { resourceType: "doc", permission: "doc:read", scopes: ["docs:read"], }; let readable: Chunk[]; try { readable = await authz.filterAccessible(principal, candidates, (c) => c.docId, filter); } catch (err) { // Only a listing throws this; a batch over the candidates always works. if (!(err instanceof ListingTooLargeError)) throw err; readable = await authz.filterAccessible(principal, candidates, (c) => c.docId, { ...filter, threshold: Infinity }); } return readable.slice(0, TOP_K); // still in relevance order } ``` ```ts // server.ts: the tool, on the MCP SDK (see mcp-server.md for the server itself) import { principalOf } from "@pontive/pontkit-server/resource-server/mcp"; import { z } from "zod"; import { retrieve } from "./search"; server.registerTool( "search_docs", { description: "Search the documents you can read", inputSchema: { query: z.string() } }, async ({ query }, extra) => { const principal = principalOf(extra.authInfo)!; // delegated when an agent acts for a user const chunks = await retrieve(principal, query); return { content: chunks.map((c) => ({ type: "text" as const, text: `[${c.docId}] ${c.text}` })), }; }, ); ``` When retrieval feeds your own model call rather than an MCP client, build the prompt from `retrieve`'s result the same way: whatever the model sees has passed the check. ## Errors [#errors] A denial is not an error: the item is dropped. A refused request throws `AuthorizationError` with `status` and `code`: - `invalid_token`: the token expired or does not verify; the caller must obtain a new one. For an agent, its delegation may have ended. - `403`: the credential lacks `sys:authz:check`; a configuration problem. ## Reference [#reference] ```ts authz.filterAccessible( principal: Principal, items: readonly T[], idOf: (item: T) => string | null | undefined, options: { resourceType: string; // the items' resource type key permission: string; // the permission an item needs to be kept scopes?: string[]; // scopes the token must have been granted as well threshold?: number; // most distinct ids checked by batch; default 100 maxListed?: number; // most resources a listing may reach; default 10,000 }, ): Promise; ``` `checkBatch(principal, items, options?)` and `listAccessible(principal, params, options?)` are the two primitives underneath, for when you need the answers themselves. --- # API reference > Pontive's public HTTP APIs, generated from their OpenAPI documents, with the base URL and authentication of each. Source: https://www.pontive.com/docs/api-reference Every page in this section is generated from the OpenAPI documents the services publish, one page per area (Users, Organizations, Roles…). Each page is also Markdown at its URL plus `.md`, with every operation, its parameters, request body, responses and the schemas they use. | API | Base URL | For | OpenAPI document | | --- | --- | --- | --- | | [Management API](/docs/api-reference/management/users) | `https://api.{region}.pontive.com/v1` | One instance's configuration and data: users, organizations, roles, apps, registered APIs, agents, service accounts, webhooks, audit logs, billing | [`/api/openapi/management`](/api/openapi/management) | | [Authorization API](/docs/api-reference/authz/authzen) | `https://authz.{region}.pontive.com` | Permission checks on your request path (OpenID AuthZEN 1.0) and entitlement checks | [`/api/openapi/authz`](/api/openapi/authz) | | [Usage ingest API](/docs/api-reference/ingest/billing-usage) | `https://ingest.{region}.pontive.com` | Metered usage events for billing | [`/api/openapi/ingest`](/api/openapi/ingest) | | [Platform API](/docs/api-reference/platform/workspaces) | `https://api.pontive.com/v1` | Your Pontive account: workspaces, projects, instances, domains, members, secret keys | [`/api/openapi/platform`](/api/openapi/platform) | `{region}` is the region of the instance's project, such as `us`, `eu` or `au`. ## Authentication [#authentication] The management, authorization and ingest APIs take `Authorization: Bearer `: - a **secret key** (`pontive_sk_live_…` or `pontive_sk_test_…`), from a server. It acts as its service account on its own instance, so no instance header is needed; - or an **access token** issued for the API, for example a service account's client-credentials token. A token that can reach several instances also names one with `X-Pontive-Instance-ID: inst_…`. What a call may do is decided by the caller's roles on the instance. Routes under `/me` act on the signed-in user's own account and are served on the instance's auth domain, with a token the account components obtain for it, not on the management API host. The platform API's document declares no security scheme. It is called by the Pontive dashboard and the MCP server with a signed-in Pontive user's token; how your own code should authenticate to it is not documented here yet. ## Conventions [#conventions] - Ids are prefixed by kind: `usr_`, `org_`, `app_`, `svc_`, `agt_`, `res_`, `inst_`… - Errors share one envelope, `{ "error": { "code": "permission_denied", "message": "…" } }`, with a machine-readable snake_case `code`. - Lists answer `{ "object": "list", "data": [ … ], "pagination": { "page", "limit", "total", "total_pages" } }`, with the `page` and `limit` query parameters choosing the page. A list walked by cursor, such as the audit log, answers `next_cursor` instead, which the next call passes as `before`. - Many write operations accept an `X-Idempotency-Key` header (see each operation). - Configuration documents (resource types, roles, permissions) return an `ETag`; send it back as `If-Match` to update or delete; a stale one fails with `412 precondition_failed`. --- # Access keys Source: https://www.pontive.com/docs/api-reference/management/access-keys Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 access keys ```http GET https://api.{region}.pontive.com/v1/access-keys ``` List access keys with filtering and pagination. Operation ID: `ListAccessKeys` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `service_account_id` | string | | Filter by service account id (svc_…) | | `confidentiality` | string | | Filter by confidentiality (secret\|publishable) | | `status` | string | | Filter by status (active\|revoked) | | `sort` | string | | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, status. Default: -created_at | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListAccessKeysResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create access key ```http POST https://api.{region}.pontive.com/v1/access-keys ``` Mint an access key bound to a service account. The credential value is returned only here (and later via reveal for revealable keys). Operation ID: `CreateAccessKey` ### Request body (`application/json`, required): CreateAccessKeyRequest Create access key payload ### Responses - `201` Created: AccessKeyWithSecret - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get access key ```http GET https://api.{region}.pontive.com/v1/access-keys/{access_key_id} ``` Get an access key by ID. Operation ID: `GetAccessKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `access_key_id` | string | yes | Access Key ID | ### Responses - `200` OK: AccessKey - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update access key ```http PATCH https://api.{region}.pontive.com/v1/access-keys/{access_key_id} ``` Update mutable fields (name, description, metadata). Operation ID: `UpdateAccessKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `access_key_id` | string | yes | Access Key ID | ### Request body (`application/json`, required): UpdateAccessKeyRequest Update payload ### Responses - `200` OK: AccessKey - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Reveal access key ```http GET https://api.{region}.pontive.com/v1/access-keys/{access_key_id}/key ``` Return the full plaintext credential value; only for a key minted revealable. Operation ID: `GetAccessKeyValue` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `access_key_id` | string | yes | Access Key ID | ### Responses - `200` OK: RevealAccessKeyResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse ## Revoke access key ```http POST https://api.{region}.pontive.com/v1/access-keys/{access_key_id}/revoke ``` Revoke an access key immediately and irreversibly. Operation ID: `RevokeAccessKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `access_key_id` | string | yes | Access Key ID | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Schemas ### ListAccessKeysResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | AccessKey[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateAccessKeyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `confidentiality` | "secret" \| "publishable" | yes | | | `description` | string | | | | `expires_at` | string | | | | `metadata` | Metadata | | | | `name` | string | yes | | | `revealable` | boolean | | | | `service_account_id` | string | yes | | ### AccessKeyWithSecret | Field | Type | Required | Description | | --- | --- | --- | --- | | `confidentiality` | "secret" \| "publishable" | | | | `created_at` | string | | | | `description` | string | | | | `expires_at` | string | | | | `id` | string | | | | `instance_id` | string | | | | `key` | string | | | | `key_preview` | string | | | | `last_used_at` | string | | | | `metadata` | Metadata | | | | `name` | string | | | | `object` | string | | | | `revealable` | boolean | | | | `service_account_id` | string | | | | `status` | "active" \| "revoked" \| "deleted" \| "expired" | | | | `updated_at` | string | | | ### AccessKey | Field | Type | Required | Description | | --- | --- | --- | --- | | `confidentiality` | "secret" \| "publishable" | | | | `created_at` | string | | | | `description` | string | | | | `expires_at` | string | | | | `id` | string | | | | `instance_id` | string | | | | `key_preview` | string | | | | `last_used_at` | string | | | | `metadata` | Metadata | | | | `name` | string | | | | `object` | string | | | | `revealable` | boolean | | | | `service_account_id` | string | | | | `status` | "active" \| "revoked" \| "deleted" \| "expired" | | | | `updated_at` | string | | | ### UpdateAccessKeyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `metadata` | Metadata | | | | `name` | string | | | ### RevealAccessKeyResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | 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. | ### Metadata Type: Record ### 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. | --- # Account linking Source: https://www.pontive.com/docs/api-reference/management/account-linking Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 account-linking settings ```http GET https://api.{region}.pontive.com/v1/authn/account-linking-config ``` Get the instance's account-linking settings: what a first sign-in through a social or enterprise connection does when its email already belongs to an account. An instance that never saved them links by the defaults, both settings on. Linking always needs the address verified on both sides, by a provider trusted to vouch for it and on the account; no setting turns that off. Operation ID: `GetAccountLinkingConfig` ### Responses - `200` OK: AccountLinkingConfig - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Update account-linking settings ```http PATCH https://api.{region}.pontive.com/v1/authn/account-linking-config ``` Patch the instance's account-linking settings. Omitted fields are left unchanged. auto_link_by_email off refuses every first provider sign-in whose email belongs to an existing account with 409 auth_provider_link_required; allow_manual_linking off refuses a signed-in user starting a link through POST /v1/me/external-identities. Operation ID: `UpdateAccountLinkingConfig` ### 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): UpdateAccountLinkingConfigRequest Update payload ### Responses - `200` OK: AccountLinkingConfig - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `422` Unprocessable Entity: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### AccountLinkingConfig | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_manual_linking` | boolean | | AllowManualLinking lets a signed-in user link a provider account to themselves, POST /v1/me/external-identities. Off, starting a link is refused 403 permission_denied. Default true. | | `auto_link_by_email` | boolean | | AutoLinkByEmail links a first provider sign-in to the account with the same email when the provider vouches for the address and the account has verified it. Off, every such sign-in is refused 409 auth_provider_link_required. Default true. | | `object` | string | | | | `updated_at` | string | | UpdatedAt is null until the settings are first saved. | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### UpdateAccountLinkingConfigRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_manual_linking` | boolean | | | | `auto_link_by_email` | boolean | | | ### 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. | ### 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. | --- # Agents Source: https://www.pontive.com/docs/api-reference/management/agents Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 agents ```http GET https://api.{region}.pontive.com/v1/agents ``` List the instance agents and organization agents the caller may read. A caller holding sys:agent:read only on some organizations lists those organizations' own agents. Operation ID: `ListAgents` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `owner_type` | string | | root or org | | `owner_id` | string | | The agents one definer defined: an org_ id, or the inst_ id | | `sponsor` | string | | The agents this user (usr_) sponsors | | `no_sponsor` | boolean | | The agents with no sponsor | | `status` | string | | active or deactivated | | `search` | string | | Search by name | | `page` | integer | | Page number | | `limit` | integer | | Items per page | | `sort` | string | | created_at, updated_at, name or status; prefix - for descending | ### Responses - `200` OK: ListAgentsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create agent ```http POST https://api.{region}.pontive.com/v1/agents ``` Define an agent (pontive-spec 45 §4): an instance agent (owner_type root; sys:agent:manage on the root) or an organization agent (owner_type org, owner_id its org_ id; sys:agent:manage on the organization). owner_type is the definer's resource-type key (D6, D44). An organization agent is installed in its organization at once, with its requested org roles approved by its creator. Operation ID: `CreateAgent` ### Request body (`application/json`, required): CreateAgentRequest Agent definition ### Responses - `201` Created: Agent - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` agent_wrong_owner: an organization agent has no offer and no auto-install: ErrResponse - `422` agent_limit_reached: ErrResponse - `500` Internal Server Error: ErrResponse ## Get agent ```http GET https://api.{region}.pontive.com/v1/agents/{agent_id} ``` Get an agent: its definition, requested roles, offer, secrets (previews), keys and sponsors. Operation ID: `GetAgent` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Responses - `200` OK: Agent - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update agent ```http PATCH https://api.{region}.pontive.com/v1/agents/{agent_id} ``` Change an agent's definition; an omitted field is left as it is. sponsors, requested_roles and org_access are fields of the agent (D22), each replaced whole when sent: adding a requested role leaves every installation of its type with a pending approval, removing one takes it off every installation at once. jwks_uri (D20) sets or, with null, clears where its keys are fetched from (sys:agent:secret). Turning auto_install on installs the agent, once, in every organization it is offered to. Operation ID: `UpdateAgent` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Request body (`application/json`, required): UpdateAgentRequest Fields to change ### Responses - `200` OK: Agent - `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 agent ```http DELETE https://api.{region}.pontive.com/v1/agents/{agent_id} ``` Delete the agent with its installations, offer, sponsors and client grants. Tokens already issued live out their lifetime. Operation ID: `DeleteAgent` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List agent client secrets ```http GET https://api.{region}.pontive.com/v1/agents/{agent_id}/client-secrets ``` The agent's client secrets that still authenticate (D19), newest first: preview, label, status, created and expiry, never the value. Operation ID: `ListAgentClientSecrets` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent 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 agent client secret ```http POST https://api.{region}.pontive.com/v1/agents/{agent_id}/client-secrets ``` Mint a client secret (D19); needs sys:agent:secret. Creating the agent 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: `CreateAgentClientSecret` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent 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 agent client secret ```http DELETE https://api.{region}.pontive.com/v1/agents/{agent_id}/client-secrets/{secret_id} ``` Remove one of the agent's client secrets (D8, D19); it stops working at once. Operation ID: `DeleteAgentClientSecret` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | | `secret_id` | string | yes | Client secret ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` client_secret_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Deactivate agent ```http POST https://api.{region}.pontive.com/v1/agents/{agent_id}/deactivate ``` Deactivate an agent: every installation is suspended and its token requests are refused (invalid_client). Its credentials are kept. Operation ID: `DeactivateAgent` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Responses - `200` OK: Agent - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List agent federated credentials ```http GET https://api.{region}.pontive.com/v1/agents/{agent_id}/federated-credentials ``` Every federated credential of the agent (at most 20). Needs sys:agent:read on its definer (the instance root or its organization). Operation ID: `ListAgentFederatedCredentials` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID (agt_) | ### 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 agent federated credential ```http POST https://api.{region}.pontive.com/v1/agents/{agent_id}/federated-credentials ``` Let the agent 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 agent'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 agent, the name once. Needs sys:agent:secret on its definer (the instance root or its organization). Operation ID: `CreateAgentFederatedCredential` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID (agt_) | ### 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 agent), trusted_issuer_not_found: ErrResponse - `409` federated_credential_conflict: the name is taken: ErrResponse - `500` Internal Server Error: ErrResponse ## Get agent federated credential ```http GET https://api.{region}.pontive.com/v1/agents/{agent_id}/federated-credentials/{credential_id} ``` Needs sys:agent:read on its definer (the instance root or its organization). Operation ID: `GetAgentFederatedCredential` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID (agt_) | | `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 agent federated credential ```http PATCH https://api.{region}.pontive.com/v1/agents/{agent_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:agent:secret on its definer (the instance root or its organization). Operation ID: `UpdateAgentFederatedCredential` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID (agt_) | | `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 agent federated credential ```http DELETE https://api.{region}.pontive.com/v1/agents/{agent_id}/federated-credentials/{credential_id} ``` The credential stops authenticating at once; tokens already issued live out their lifetime. Needs sys:agent:secret on its definer (the instance root or its organization). Operation ID: `DeleteAgentFederatedCredential` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID (agt_) | | `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 ## List agent installations ```http GET https://api.{region}.pontive.com/v1/agents/{agent_id}/installations ``` Every installation of the agent — on the root, organizations and resources — with its approved roles, pending approval and status. Each is managed by its id under its home (D21). Operation ID: `ListAgentInstallations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListInstallationsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List an agent's offer ```http GET https://api.{region}.pontive.com/v1/agents/{agent_id}/organizations ``` The organizations an instance agent's selected offer admits (pontive-spec 45 §5.1): its allow-list edge (D22). org_access (all or selected) is a field of the agent. Operation ID: `ListAgentOrganizations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListAgentOrganizationsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Add organizations to an agent's offer ```http POST https://api.{region}.pontive.com/v1/agents/{agent_id}/organizations ``` Add one or more organizations to an instance agent's selected offer (D22); one already offered is not an error. With auto_install on, an organization added is installed. Operation ID: `CreateAgentOrganizations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Request body (`application/json`, required): AddAgentOrganizationsRequest Organizations to add ### Responses - `200` OK: Organizations - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` agent_wrong_owner: an organization agent has no offer: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Remove an organization from an agent's offer ```http DELETE https://api.{region}.pontive.com/v1/agents/{agent_id}/organizations/{organization_id} ``` Take one organization off an instance agent's selected offer (D22), which suspends its installations there. Operation ID: `DeleteAgentOrganization` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | | `organization_id` | string | yes | Organization ID | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Add agent public key ```http POST https://api.{region}.pontive.com/v1/agents/{agent_id}/public-keys ``` Add a public JWK to the agent's inline keys, for private_key_jwt (pontive-spec 45 §7.2). 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 agent 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: `CreateAgentPublicKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Request body (`application/json`, required): JWK The public JWK ### Responses - `201` Created: Agent - `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 agent has a jwks_uri: ErrResponse - `500` Internal Server Error: ErrResponse ## Remove agent public key ```http DELETE https://api.{region}.pontive.com/v1/agents/{agent_id}/public-keys/{key_id} ``` Remove one of the agent's inline keys by kid. Assertions signed with it are refused from now on. Operation ID: `DeleteAgentPublicKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | | `key_id` | string | yes | Key ID | ### Responses - `200` OK: Agent - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` public_key_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Reactivate agent ```http POST https://api.{region}.pontive.com/v1/agents/{agent_id}/reactivate ``` Reactivate a deactivated agent: its installations return to active. Operation ID: `ReactivateAgent` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | Agent ID | ### Responses - `200` OK: Agent - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List every agent installation in the organization ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations ``` The agents installed on the organization and on each of its resources (pontive-spec 20 G2, D21), with their approved roles, pending approvals and status; filterable by agent, resource and status. Needs sys:agent:read on the organization; an organization's owners and admins hold it, and an end user's token with pontive:org:agent:read reaches it for their own organization. Operation ID: `ListOrganizationAgentInstallations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | One agent's installations (agt_) | | `resource_id` | string | | The installations on one of the organization's resources (res_) | | `status` | string | | active or suspended | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListInstallationsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Install an agent on the organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations ``` Install an agent in the organization — on the organization itself, or on the resource resource_id names, which must be the organization's (D21) — with roles approved: any of those it requests for the target's type, or none (sys:agent:install on the organization, or on the root). The roles are also held to what the caller could grant there. With delegated_only true, the roles act only as the agent's side of a delegation: a token the agent exchanged to act for a user is allowed what both hold, while the agent's own token holds none of them. Operation ID: `CreateOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`, required): InstallRequest Agent and approved roles ### Responses - `201` Created: Installation - `400` agent_role_not_requested: ErrResponse - `401` Unauthorized: ErrResponse - `403` agent_not_offered, agent_wrong_owner: ErrResponse - `404` Not Found: ErrResponse - `409` agent_already_installed: ErrResponse - `500` Internal Server Error: ErrResponse ## Get an agent's installation on the organization ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations/{installation_id} ``` One installation in the organization — on the organization or one of its resources — with its pending approval (D21). 404 for an installation in another organization or in none. Operation ID: `GetOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Change an agent's roles on the organization ```http PATCH https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations/{installation_id} ``` Replace the roles approved for the agent on the organization, within what it requests (sys:agent:install on the organization, or on the root). delegated_only, when present, turns delegation-only on or off. Operation ID: `UpdateOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): UpdateInstallationRequest Approved roles ### Responses - `200` OK: Installation - `400` agent_role_not_requested: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Uninstall an agent from the organization ```http DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations/{installation_id} ``` Delete the installation. The agent's next token request for the organization is refused; a token already issued lives out its lifetime. Operation ID: `DeleteOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Approve an agent's requested roles on the organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations/{installation_id}/approve ``` Approve the agent's requested roles up to version, after the installation's approved_version and at most the agent's; roles are the approved roles from now on — typically what it holds plus pending_roles (sys:agent:install on the organization, or on the root). Operation ID: `ApproveOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): ApproveInstallationRequest Version and approved roles ### Responses - `200` OK: Installation - `400` agent_role_not_requested, agent_version_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Decline an agent's requested roles on the organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations/{installation_id}/decline ``` Mark version seen without adding its roles; the installation keeps working with the roles it has. Operation ID: `DeclineOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): DeclineInstallationRequest Version ### Responses - `200` OK: Installation - `400` agent_version_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Resume an agent on the organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations/{installation_id}/resume ``` Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the organization suspended or not offered) stays suspended until that ends. Operation ID: `ResumeOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Suspend an agent on the organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/agent-installations/{installation_id}/suspend ``` Suspend the installation: its roles are withdrawn and the agent's tokens for the organization refused until it is resumed. Operation ID: `SuspendOrganizationAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List an organization's agents ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/agents ``` The organization's agents page (pontive-spec 45 §13; api-route-review D43): every agent installed in it, offered to it, or its own, each with its installation there or null. relation narrows it, repeated for any of several: installed (an installation here), offered (an instance agent offered to the organization, installed or not), own (defined by the organization). Organization-scoped tokens with pontive:org:agent:read reach it. Operation ID: `ListOrganizationAgents` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `relation` | string[] | | installed, offered or own | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListOrganizationAgentsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List the resource's agent installations ```http GET https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations ``` The agents installed on the resource, with their approved roles, pending approvals and status; filterable by agent and status (D21). Operation ID: `ListResourceAgentInstallations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | One agent's installations (agt_) | | `status` | string | | active or suspended | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListInstallationsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Install an agent on the resource ```http POST https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations ``` Install an agent on the resource with roles approved: any of those it requests for the resource's type, or none (sys:agent:install on the resource's organization, or on the root for a resource in none — never on the resource itself). The roles are also held to what the caller could grant there. With delegated_only true, the roles act only as the agent's side of a delegation: a token the agent exchanged to act for a user is allowed what both hold, while the agent's own token holds none of them. Operation ID: `CreateResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Request body (`application/json`, required): InstallRequest Agent and approved roles ### Responses - `201` Created: Installation - `400` agent_role_not_requested: ErrResponse - `401` Unauthorized: ErrResponse - `403` agent_not_offered, agent_wrong_owner: ErrResponse - `404` Not Found: ErrResponse - `409` agent_already_installed: ErrResponse - `500` Internal Server Error: ErrResponse ## Get an agent's installation on the resource ```http GET https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations/{installation_id} ``` One installation on the resource, a resource in no organization (D21), with its pending approval. An installation in an organization is under /organizations/{organization}/agent-installations. Operation ID: `GetResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Change an agent's roles on the resource ```http PATCH https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations/{installation_id} ``` Replace the roles approved for the agent on the resource, within what it requests (sys:agent:install on the resource's organization, or on the root for a resource in none — never on the resource itself). delegated_only, when present, turns delegation-only on or off. Operation ID: `UpdateResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): UpdateInstallationRequest Approved roles ### Responses - `200` OK: Installation - `400` agent_role_not_requested: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Uninstall an agent from the resource ```http DELETE https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations/{installation_id} ``` Delete the installation. The agent's next token request for the resource is refused; a token already issued lives out its lifetime. Operation ID: `DeleteResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Approve an agent's requested roles on the resource ```http POST https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations/{installation_id}/approve ``` Approve the agent's requested roles up to version, after the installation's approved_version and at most the agent's; roles are the approved roles from now on — typically what it holds plus pending_roles (sys:agent:install on the resource's organization, or on the root for a resource in none — never on the resource itself). Operation ID: `ApproveResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): ApproveInstallationRequest Version and approved roles ### Responses - `200` OK: Installation - `400` agent_role_not_requested, agent_version_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Decline an agent's requested roles on the resource ```http POST https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations/{installation_id}/decline ``` Mark version seen without adding its roles; the installation keeps working with the roles it has. Operation ID: `DeclineResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): DeclineInstallationRequest Version ### Responses - `200` OK: Installation - `400` agent_version_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Resume an agent on the resource ```http POST https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations/{installation_id}/resume ``` Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the organization suspended or not offered) stays suspended until that ends. Operation ID: `ResumeResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Suspend an agent on the resource ```http POST https://api.{region}.pontive.com/v1/resources/{resource_id}/agent-installations/{installation_id}/suspend ``` Suspend the installation: its roles are withdrawn and the agent's tokens for the resource refused until it is resumed. Operation ID: `SuspendResourceAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List the installations in no organization ```http GET https://api.{region}.pontive.com/v1/root/agent-installations ``` The installations in no organization (D21): on the instance root and on resources in none, with their approved roles, pending approvals and status; filterable by agent, resource and status. Operation ID: `ListRootAgentInstallations` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | One agent's installations (agt_) | | `resource_id` | string | | The installations on one resource in no organization (res_) | | `status` | string | | active or suspended | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListInstallationsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Install an agent on the instance root ```http POST https://api.{region}.pontive.com/v1/root/agent-installations ``` Install an agent in no organization — on the instance root, or on the resource resource_id names, a resource in none (D21) — with roles approved: any of those it requests for the target's type, or none (sys:agent:install on the root). The roles are also held to what the caller could grant there. With delegated_only true, the roles act only as the agent's side of a delegation: a token the agent exchanged to act for a user is allowed what both hold, while the agent's own token holds none of them. Operation ID: `CreateRootAgentInstallation` ### Request body (`application/json`, required): InstallRequest Agent and approved roles ### Responses - `201` Created: Installation - `400` agent_role_not_requested: ErrResponse - `401` Unauthorized: ErrResponse - `403` agent_not_offered, agent_wrong_owner: ErrResponse - `404` Not Found: ErrResponse - `409` agent_already_installed: ErrResponse - `500` Internal Server Error: ErrResponse ## Get an agent's installation on the instance root ```http GET https://api.{region}.pontive.com/v1/root/agent-installations/{installation_id} ``` One installation in no organization — on the instance root or on a resource in none (D21) — with its pending approval. Operation ID: `GetRootAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Change an agent's roles on the instance root ```http PATCH https://api.{region}.pontive.com/v1/root/agent-installations/{installation_id} ``` Replace the roles approved for the agent on the instance root, within what it requests (sys:agent:install on the root). delegated_only, when present, turns delegation-only on or off. Operation ID: `UpdateRootAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): UpdateInstallationRequest Approved roles ### Responses - `200` OK: Installation - `400` agent_role_not_requested: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Uninstall an agent from the instance root ```http DELETE https://api.{region}.pontive.com/v1/root/agent-installations/{installation_id} ``` Delete the installation. The agent's next token request for the instance root is refused; a token already issued lives out its lifetime. Operation ID: `DeleteRootAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Approve an agent's requested roles on the instance root ```http POST https://api.{region}.pontive.com/v1/root/agent-installations/{installation_id}/approve ``` Approve the agent's requested roles up to version, after the installation's approved_version and at most the agent's; roles are the approved roles from now on — typically what it holds plus pending_roles (sys:agent:install on the root). Operation ID: `ApproveRootAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): ApproveInstallationRequest Version and approved roles ### Responses - `200` OK: Installation - `400` agent_role_not_requested, agent_version_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Decline an agent's requested roles on the instance root ```http POST https://api.{region}.pontive.com/v1/root/agent-installations/{installation_id}/decline ``` Mark version seen without adding its roles; the installation keeps working with the roles it has. Operation ID: `DeclineRootAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `installation_id` | string | yes | Installation ID (ain_) | ### Request body (`application/json`, required): DeclineInstallationRequest Version ### Responses - `200` OK: Installation - `400` agent_version_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Resume an agent on the instance root ```http POST https://api.{region}.pontive.com/v1/root/agent-installations/{installation_id}/resume ``` Lift an admin's suspension. An installation suspended for another cause (the agent deactivated, the organization suspended or not offered) stays suspended until that ends. Operation ID: `ResumeRootAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Suspend an agent on the instance root ```http POST https://api.{region}.pontive.com/v1/root/agent-installations/{installation_id}/suspend ``` Suspend the installation: its roles are withdrawn and the agent's tokens for the instance root refused until it is resumed. Operation ID: `SuspendRootAgentInstallation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `installation_id` | string | yes | Installation ID (ain_) | ### Responses - `200` OK: Installation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListAgentsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Agent[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateAgentRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `auto_install` | boolean | | | | `description` | string | | | | `domain_id` | string | | DomainID is the auth domain its tokens are issued by; omitted is the instance's default. | | `logo_url` | string | | | | `metadata` | Record | | | | `name` | string | yes | | | `org_access` | "all" \| "selected" | | OrgAccess is an instance agent's offer: all (the default) or selected, with no organization listed yet (POST /agents/{agent_id}/organizations). | | `owner_id` | string | | OwnerID is the definer: the organization's org_ id for org; the instance's inst_ id, or omitted, for root. | | `owner_type` | "root" \| "org" | yes | OwnerType is the definer's resource-type key (D6, D44): root, or org. | | `requested_roles` | RequestedRole[] | | | | `sponsors` | string[] | | Sponsors are usr_ ids, each holding sys:agent:read on the definer. | | `token_ttl` | integer | | TokenTTL is in seconds, 60–3600; omitted is 900. | ### Agent | Field | Type | Required | Description | | --- | --- | --- | --- | | `auto_install` | boolean | | AutoInstall installs an instance agent, with its requested org roles, in every organization it is offered to. | | `client_secrets` | ClientSecret[] | | ClientSecrets are the secrets that still authenticate, previews only (GET /agents/{agent_id}/client-secrets, D19). A secret's value is shown once, when it is created. | | `created_at` | string | | | | `description` | string | | | | `domain_id` | string | | | | `id` | string | | | | `instance_id` | string | | | | `issuer` | string | | | | `jwks_uri` | string | | | | `last_used_at` | string | | | | `logo_url` | string | | | | `metadata` | Record | | | | `name` | string | | | | `object` | string | | | | `org_access` | "all" \| "selected" | | OrgAccess is an instance agent's offer: every organization, or the selected ones (GET /agents/{agent_id}/organizations, D22). Empty for an organization agent. | | `owner_id` | string | | OwnerID is the definer's prefixed id: the instance's inst_ id, or the organization's org_ id. | | `owner_type` | "root" \| "org" | | OwnerType is the definer's resource-type key (D6, D44): root, or org for an organization. | | `public_keys` | PublicKey[] | | PublicKeys are the inline keys the agent signs private_key_jwt assertions with; JWKSURI is where they are fetched from instead. At most one is set. | | `requested_roles` | RequestedRole[] | | RequestedRoles are the agent's ceiling everywhere: an installation approves these or fewer, never more. Each carries the version that added it. | | `requested_roles_version` | integer | | RequestedRolesVersion grows each time a role is added to requested_roles; installations approved below it have a pending approval. | | `sponsors` | string[] | | Sponsors are the users (usr_) accountable for the agent. | | `status` | "active" \| "deactivated" | | | | `token_ttl` | integer | | TokenTTL is its access tokens' lifetime in seconds, 60–3600. | | `updated_at` | string | | | ### UpdateAgentRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `auto_install` | boolean | | | | `description` | string | | | | `jwks_uri` | string | | JWKSURI is where the agent's keys are fetched from (D20); null clears it. Refused while inline public keys exist. | | `logo_url` | string | | | | `metadata` | Record | | Metadata, when sent, replaces the metadata; {} clears it. | | `name` | string | | | | `org_access` | "all" \| "selected" | | OrgAccess is an instance agent's offer: all or selected. | | `requested_roles` | RequestedRole[] | | RequestedRoles, when sent, replace the roles the agent requests: adding one increments requested_roles_version and leaves every installation of its type with a pending approval; removing one takes it off every installation at once. | | `sponsors` | string[] | | Sponsors, when sent, replace the sponsors: at most ten usr_ ids, each holding sys:agent:read on the definer; [] clears them. | | `token_ttl` | integer | | | ### 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 | | | ### ClientSecretWithValue | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `expires_at` | string | | | | `id` | string | | | | `label` | string | | | | `last_used_at` | string | | | | `object` | string | | | | `preview` | string | | | | `secret` | 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 | | 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 | | 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 | | RequiredClaims, when present, replaces the map; {} requires none. | | `subject` | string | | | ### ListInstallationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Installation[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ListAgentOrganizationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | AgentOrganization[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### AddAgentOrganizationsRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `organization_ids` | string[] | yes | OrganizationIDs are the organizations to add, at most 100. Adding one already offered is not an error. | ### Organizations | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | | | `object` | string | | | | `org_access` | "all" \| "selected" | | | | `organization_ids` | string[] | | OrganizationIDs are the organizations a selected offer lists. | ### 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 | | | ### InstallRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | | | `delegated_only` | boolean | | DelegatedOnly lends the roles only to the agent's side of a delegation: the agent's own token holds none of them here. Default false. | | `resource_id` | string | | ResourceID installs on this resource instead of the path's container. | | `roles` | string[] | | | ### Installation | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | | | `approved_by` | Actor | | CreatedBy is who created the grant, or last replaced it. | | `approved_version` | integer | | ApprovedVersion is the requested_roles_version last approved or declined. PendingVersion is the agent's version when it is newer, else 0, and PendingRoles what it asks for here: the pending approval. | | `created_at` | string | | | | `delegated_only` | boolean | | DelegatedOnly lends Roles only to the agent's side of a delegation (pontive-spec 20 C3, agent-intersection scenarios OQ-2): a token the agent exchanged to act for a user is allowed what both hold, while the agent's own token, and a check of the agent alone, ignore them. | | `id` | string | | | | `installed_by` | Actor | | CreatedBy is who created the grant, or last replaced it. | | `instance_id` | string | | | | `object` | string | | | | `organization_id` | string | | OrganizationID is the target's organization: itself, or the resource's; empty for the root and for a resource in none. | | `pending_roles` | string[] | | | | `pending_version` | integer | | | | `resource_type` | string | | ResourceType is the target's type: the roles are of it. | | `roles` | string[] | | | | `status` | "active" \| "suspended" | | | | `suspended_at` | string | | | | `suspended_reasons` | string[] | | SuspendedReasons are why it is suspended: agent_deactivated, organization_suspended, not_offered, admin. | | `target_id` | string | | TargetID is the instance id, the org_ id or the res_ id. | | `target_type` | "root" \| "org" \| "resource" | | | | `updated_at` | string | | | ### UpdateInstallationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `delegated_only` | boolean | | DelegatedOnly, when present, lends the roles only to the agent's side of a delegation (true), or to the agent's own token too (false). | | `roles` | string[] | | | ### ApproveInstallationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | | | `version` | integer | yes | | ### DeclineInstallationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `version` | integer | yes | | ### ListOrganizationAgentsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | OrganizationAgent[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### 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. | ### RequestedRole | Field | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | | | | `role` | string | | | | `version` | integer | | Version is the requested_roles_version that added it; ignored on input. | ### ClientSecret | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `expires_at` | string | | | | `id` | string | | | | `label` | string | | | | `last_used_at` | string | | | | `object` | string | | | | `preview` | string | | | | `status` | "active" \| "rotating" | | | ### 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 | | | ### AgentOrganization | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | | | `object` | string | | | | `organization_id` | string | | | ### Actor CreatedBy is who created the grant, or last replaced it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `name` | string | | | | `type` | string | | | ### OrganizationAgent | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent` | Agent | | | | `installation` | Installation | | | | `object` | 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. | --- # 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 ` 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://.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 | | | | `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 | | | | `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 | | 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 | | | ### 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 | | 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 | | 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.), organization.* (id, name, slug, external_id, metadata.) 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 | | | --- # Audit logs Source: https://www.pontive.com/docs/api-reference/management/audit-logs Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 audit log entries ```http GET https://api.{region}.pontive.com/v1/logs/audit ``` The instance's audit log, newest first. Pass next_cursor as before to page back, or as after to poll for what committed since, oldest first. Needs sys:audit:read on the instance, or on the organization named by organization_id. Operation ID: `ListAuditLogs` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `action` | string[] | | Action name, or a prefix such as pontive.secret_key.* (repeatable) | | `category` | string[] | | Category (repeatable) | | `severity` | string[] | | info, warning or high (repeatable) | | `result` | string[] | | success, failure or denied (repeatable) | | `actor_type` | string | | Actor type | | `actor_id` | string | | Actor id | | `actor_instance` | string | | The agent instance that acted (an agent actor's actor.instance) | | `on_behalf_of` | string | | A delegator (usr_…): entries an actor wrote for them with a delegated token | | `credential_id` | string | | Credential id, such as a secret key's key_… | | `target_id` | string | | Id of any target | | `organization_id` | string | | An organization's entries (org_…) | | `ip_address` | string | | Client IP address | | `request_id` | string | | Request id (req_…) | | `subject` | string | | An entity in any role: the actor, the credential or a target | | `from` | string | | RFC 3339: occurred at or after | | `to` | string | | RFC 3339: occurred before | | `after` | string | | Cursor: entries committed after it, oldest first | | `before` | string | | Cursor: older entries, newest first | | `limit` | integer | | 1–100, default 50 | ### Responses - `200` OK: ListResponseDoc - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `503` Service Unavailable: ErrResponse ## Get an audit log entry ```http GET https://api.{region}.pontive.com/v1/logs/audit/{audit_log_entry_id} ``` One audit_log_entry (pontive-spec 43 §4.1). Operation ID: `GetAuditLog` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `audit_log_entry_id` | string | yes | Entry id (ale_…) | ### Responses - `200` OK: AuditLogEntryDoc - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `503` Service Unavailable: ErrResponse ## List request log entries ```http GET https://api.{region}.pontive.com/v1/logs/requests ``` Every management-API call made against the instance, reads included, newest first. Needs sys:audit:read on the instance. Operation ID: `ListRequestLogs` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `actor_type` | string | | Actor type, such as agent | | `actor_id` | string | | Actor id | | `actor_instance` | string | | The agent instance that made the request (an agent actor's actor.instance) | | `on_behalf_of` | string | | A delegator (usr_…): requests an actor made for them with a delegated token | | `credential_id` | string | | Credential id, such as a secret key's key_… | | `method` | string[] | | GET, POST, PUT, PATCH or DELETE (repeatable) | | `status_class` | string[] | | 2xx, 3xx, 4xx or 5xx (repeatable) | | `ip_address` | string | | Client IP address | | `route` | string | | Route pattern, as recorded (/v1/users/{identifier}) | | `from` | string | | RFC 3339: occurred at or after | | `to` | string | | RFC 3339: occurred before | | `after` | string | | Cursor: entries committed after it, oldest first | | `before` | string | | Cursor: older entries, newest first | | `limit` | integer | | 1–100, default 50 | ### Responses - `200` OK: ListResponseDoc - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `503` Service Unavailable: ErrResponse ## Get a request log entry ```http GET https://api.{region}.pontive.com/v1/logs/requests/{request_id} ``` One request_log_entry (pontive-spec 43 §4.6), by the request id returned in X-Request-ID. Operation ID: `GetRequestLog` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `request_id` | string | yes | Request id (req_…) | ### Responses - `200` OK: RequestLogEntryDoc - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `503` Service Unavailable: ErrResponse ## List the agent activity in an organization ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/agent-activity ``` What agents did in the organization (pontive-spec 20 G2, G3): its audit entries whose actor is an agent, on its own installation or acting for a member with a delegated token (on_behalf_of names the member), newest first. Filter by actor_id (an agt_…) and on_behalf_of (a usr_…). The view an organization's owners and admins read from the embedded agent-management element, with pontive:org:agent:read; audit-svc decides it with sys:audit:read on the organization, which they hold. Operation ID: `ListOrganizationAgentActivity` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `action` | string[] | | Action name, or a prefix such as pontive.member.* (repeatable) | | `actor_id` | string | | One agent (agt_…) | | `actor_instance` | string | | The agent instance that acted (an agent actor's actor.instance) | | `on_behalf_of` | string | | A member (usr_…): what agents did for them with a delegated token | | `from` | string | | RFC 3339: occurred at or after | | `to` | string | | RFC 3339: occurred before | | `after` | string | | Cursor: entries committed after it, oldest first | | `before` | string | | Cursor: older entries, newest first | | `limit` | integer | | 1–100, default 50 | ### Responses - `200` OK: ListResponseDoc - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `503` Service Unavailable: ErrResponse ## List an organization's audit log entries ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/audit-logs ``` The entries that belong to one organization: the view its admins read with sys:audit:read on the organization. Same filters and cursors as GET /audit-logs. Operation ID: `ListOrganizationAuditLogs` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `action` | string[] | | Action name, or a prefix such as pontive.member.* (repeatable) | | `severity` | string[] | | info, warning or high (repeatable) | | `actor_id` | string | | Actor id | | `actor_instance` | string | | The agent instance that acted (an agent actor's actor.instance) | | `on_behalf_of` | string | | A delegator (usr_…): entries an actor wrote for them with a delegated token | | `target_id` | string | | Id of any target | | `from` | string | | RFC 3339: occurred at or after | | `to` | string | | RFC 3339: occurred before | | `after` | string | | Cursor: entries committed after it, oldest first | | `before` | string | | Cursor: older entries, newest first | | `limit` | integer | | 1–100, default 50 | ### Responses - `200` OK: ListResponseDoc - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `503` Service Unavailable: ErrResponse ## Schemas ### ListResponseDoc | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Record[] | | | | `next_cursor` | string | | | | `object` | string | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### AuditLogEntryDoc | Field | Type | Required | Description | | --- | --- | --- | --- | | `action` | string | | | | `actor` | Actor | | | | `category` | string | | | | `changes` | Record | | | | `context` | Context | | | | `credential` | Credential | | | | `details` | Record | | | | `id` | string | | | | `object` | string | | | | `occurred_at` | string | | | | `on_behalf_of` | Actor[] | | | | `outcome` | Outcome | | | | `schema_version` | integer | | | | `scope` | Scope | | | | `severity` | string | | | | `targets` | Target[] | | | ### RequestLogEntryDoc | Field | Type | Required | Description | | --- | --- | --- | --- | | `actor` | Actor | | | | `context` | Context | | | | `credential` | Credential | | | | `duration_ms` | integer | | | | `error_code` | string | | | | `id` | string | | | | `method` | string | | | | `object` | string | | | | `occurred_at` | string | | | | `on_behalf_of` | Actor[] | | | | `path` | string | | | | `route` | string | | | | `scope` | Scope | | | | `status` | integer | | | ### 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. | ### Actor | Field | Type | Required | Description | | --- | --- | --- | --- | | `access` | StaffAccess | | | | `email` | string | | | | `id` | string | | | | `instance` | string | | Instance is the running copy of an agent that acted (pontive-spec 45 §12, 20 D10): the token's agent_instance. Only for an agent actor. | | `name` | string | | | | `type` | string | | | ### Context | Field | Type | Required | Description | | --- | --- | --- | --- | | `asn` | ASN | | | | `geo` | Geo | | | | `ip_address` | string | | | | `origin` | string | | | | `request_id` | string | | | | `trace_id` | string | | | | `user_agent` | string | | | ### Credential | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `id` | string | | | | `session_id` | string | | | | `type` | string | | | | `value` | string | | | ### Outcome | Field | Type | Required | Description | | --- | --- | --- | --- | | `reason` | string | | | | `result` | string | | | ### Scope | Field | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | | | | `organization_id` | string | | | | `project_id` | string | | | | `workspace_id` | string | | | ### Target | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `name` | string | | | | `type` | 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. | ### StaffAccess | Field | Type | Required | Description | | --- | --- | --- | --- | | `expires_at` | string | | | | `reason` | string | | | | `session_id` | string | | | ### ASN | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | | | | `number` | integer | | | ### Geo | Field | Type | Required | Description | | --- | --- | --- | --- | | `city` | string | | | | `country` | string | | | | `region` | string | | | --- # Authflows document Source: https://www.pontive.com/docs/api-reference/management/authflows-document Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## Export the authflows document ```http GET https://api.{region}.pontive.com/v1/authn/authflows/document ``` The instance's auth flows as one authflows/v1 document (api-route-review D47): its published custom flows, each with its own widgets, and the custom widget definitions they show, so the document is self-contained. Only the published state is exported; drafts stay in the dashboard. Built-in flows and definitions are the same everywhere and never travel, and which app runs a flow is the app's authflow_bindings, not part of the flow. Everything is named by a key, never an id: a view node's widget is a definition's key or flow:, one of the flow's own widgets. authflow_id, repeatable, exports just those flows and the definitions they show (a flow that is not a published custom flow is 404); importing that document touches only them. The output is deterministic: two exports of the same state are byte-identical, and the ETag is the hash of the bytes. Send it as If-None-Match to get 304 when nothing changed. Import the document into another instance with POST /v1/authn/authflows/document/import. Needs sys:flow:read and sys:widget:read. Operation ID: `GetAuthflowsDocument` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `authflow_id` | string[] | | Export only these flows, by id; repeat it for several | ### Responses - `200` An authflows/v1 document: AuthflowsDocument - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` An authflow_id that is not a published custom flow: ErrResponse - `500` Internal Server Error: ErrResponse ## Import an authflows document ```http POST https://api.{region}.pontive.com/v1/authn/authflows/document/import ``` Plans importing an authflows/v1 document into this instance and, with dry_run false, applies the plan (api-route-review D47). Flows and widget definitions are merged by key: a new key is created, a differing flow replaced whole, and one the document lacks is listed as absent and left alone. Nothing is deleted; delete a flow with DELETE /v1/authn/authflows/{authflow_id}. A definition the instance lacks is created and published; identical markup is unchanged, and different markup is a conflict, since a published definition never changes. A changed flow keeps each of its own widgets whose content matches, and gets a new one where content changed. With publish true (the default) each changed flow is published, its widgets first; with publish false it writes drafts for review in the dashboard. Anything the flow's publish validator refuses, a reference to a key in neither the document nor the instance, and a draft with unpublished changes the import would overwrite (unless discard_unpublished) are conflicts. Re-importing an instance's own export plans every entry unchanged and writes nothing. The dry run's ETag is the revision of the flows it read: send it as If-Match on the apply to be refused 412 precondition_failed if anything changed since. An apply with conflicts is 409 import_conflict, one detail per conflict, field .., and applies nothing. A document the format refuses (not JSON, a member it does not define, a pontive_document it does not read) is 422 field_invalid_format; one over 5 MB is 422 field_too_long. X-Idempotency-Key makes an apply safe to retry; the same key with another request is 422 idempotency_key_reused. Needs sys:flow:manage, sys:widget:read and sys:widget:manage. Operation ID: `ImportAuthflowsDocument` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `If-Match` | string | | The dry run's ETag: the apply is refused 412 precondition_failed if the instance's flows changed since | | `X-Idempotency-Key` | string | | Idempotency key, read on an apply | ### Request body (`application/json`, required): ImportAuthflowsRequest The document and how to import it ### Responses - `200` OK: AuthflowImportPlan - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `409` import_conflict: the plan has conflicts, one detail each; nothing was applied: ErrResponse - `412` precondition_failed: the flows changed since the dry run: ErrResponse - `422` field_invalid_format, field_too_long, missing_required_field or idempotency_key_reused: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### AuthflowsDocument Document is an authflows/v1 document, passed to identity-svc as the bytes it was sent. At most 5 MB. | Field | Type | Required | Description | | --- | --- | --- | --- | | `authflows` | AuthflowsDocumentFlow[] | | | | `pontive_document` | "authflows/v1" | | PontiveDocument is the document type. An import reads the current and the previous major version. | | `pontkit` | string | | Pontkit is the pontkit release the document was exported against. Informational: an import checks markup against the target's release. | | `widget_definitions` | DocumentWidgetDefinition[] | | WidgetDefinitions are the instance's own definitions the flows show, never a built-in. A published definition never changes, so this copy is the branding document's: a key the target lacks is created and published, identical markup is unchanged, other markup is a conflict. | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### ImportAuthflowsRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `discard_unpublished` | boolean | | DiscardUnpublished lets the import overwrite a draft with unpublished changes, which is otherwise a conflict. | | `document` | AuthflowsDocument | | Document is an authflows/v1 document, passed to identity-svc as the bytes it was sent. At most 5 MB. | | `dry_run` | boolean | | DryRun returns the plan and writes nothing. True when omitted: send false to apply. | | `publish` | boolean | | Publish publishes what the import changes. True when omitted; false writes drafts for review in the dashboard. | | `secrets` | Record | | Secrets are the values of the document's {"$secret": ""} placeholders, by name; never inside the document, and never echoed back. A placeholder with no value here or in the target is a conflict. | ### AuthflowImportPlan | Field | Type | Required | Description | | --- | --- | --- | --- | | `absent` | PlanEntry[] | | | | `changed` | PlanEntry[] | | | | `conflicts` | PlanIssue[] | | | | `created` | PlanEntry[] | | | | `dry_run` | boolean | | DryRun is true when nothing was written. | | `object` | "authflow_import_plan" | | | | `publish` | boolean | | Publish says whether the changed flows are published, or left as drafts. New widget definitions are published either way. | | `unchanged` | PlanEntry[] | | | | `warnings` | PlanIssue[] | | | ### AuthflowsDocumentFlow | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `edges` | Edge[] | | | | `entry_node` | string | | | | `id` | string | | | | `intents` | "signin" \| "signup" \| "invitation"[] | | | | `metadata` | DocumentMetadata | | | | `name` | string | | | | `nodes` | Node[] | | | | `role` | "entry" \| "subflow" | | | | `widgets` | Record | | Widgets are the flow's own widgets by ref: the widget's key, suffixed -2, -3 in node order when the flow owns several copies of one definition. | ### DocumentWidgetDefinition | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `key` | string | | | | `markup` | string | | Markup is the definition's pontkit markup. | | `name` | string | | | ### 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. | ### PlanEntry | Field | Type | Required | Description | | --- | --- | --- | --- | | `fields` | string[] | | Fields are the document fields that differ, for a changed object. | | `key` | string | | Key is the object's key in the document: a flow's or a blueprint's id, a definition's key, a customization's widget_key, an asset's sha256-, or "" for a singleton (brand, theme, localization). | | `kind` | string | | Kind is what the object is. | ### PlanIssue | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code says why. A conflict's: invalid, immutable, retired, missing_reference, unpublished_changes, missing_secret or assets_not_available. A warning's: instance_specific_id, unknown_connection, locale_not_enabled, unused_asset, unused_secret or validation. | | `field` | string | | Field is the document field it is about, "" for the whole object. The whole path is .., the field a 409 import_conflict detail names. | | `key` | string | | | | `kind` | string | | | | `message` | string | | | ### Edge | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | | | | `id` | string | | | | `to` | string | | | | `trigger` | Trigger | | | ### DocumentMetadata | Field | Type | Required | Description | | --- | --- | --- | --- | | `viewport` | Viewport | | | ### Node | Field | Type | Required | Description | | --- | --- | --- | --- | | `action_type` | string | | ActionType is the catalog action id on an action node. | | `expression` | string | | Expression is the condition node's branch expression. | | `flow_id` | string | | FlowID is the flow a subflow node delegates to. | | `id` | string | | | | `kind` | "start" \| "end" \| "view" \| "action" \| "condition" \| "subflow" | | | | `metadata` | NodeMetadata | | | | `name` | string | | | | `outcome` | string | | Outcome is set on an end node: the outcome the flow ends with, a slug (lower-case letters, digits and underscores), "succeeded" when absent. A flow's outcomes are the distinct values on its end nodes; a parent's subflow node routes them by name. | | `properties` | Record | | Properties is the action configuration. An action node names no widget: one that waits for the user shows its own screens (pontive-spec 23). | | `widget` | string | | Widget is the view node's widget id — a built-in widget's or a custom widget's. | | `widget_overrides` | Record | | WidgetOverrides, on a subflow node, replaces widgets inside the flow it enters and below it: key is the KEY of the widgets replaced — the definition they descend from — value the id of the widget shown instead. At most 16 entries; absent when there are none (pontive-spec 16a, 22). | ### AuthflowsDocumentFlowWidget | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | string | | | | `markup` | string | | | | `name` | 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. | ### Trigger | Field | Type | Required | Description | | --- | --- | --- | --- | | `event` | string | | | | `kind` | "user-event" \| "outcome" \| "auto" | | | | `outcome` | string | | | ### Viewport | Field | Type | Required | Description | | --- | --- | --- | --- | | `x` | number | | | | `y` | number | | | | `zoom` | number | | | ### NodeMetadata | Field | Type | Required | Description | | --- | --- | --- | --- | | `note` | string | | | | `position` | NodePosition | | | ### NodePosition | Field | Type | Required | Description | | --- | --- | --- | --- | | `x` | number | | | | `y` | number | | | --- # Authflows Source: https://www.pontive.com/docs/api-reference/management/authflows Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## Delete authflow ```http DELETE https://api.{region}.pontive.com/v1/authn/authflows/{authflow_id} ``` Delete a custom auth flow. Builtin flows cannot be deleted. Returns 204 No Content on success; 409 when the flow is the project default or referenced by an app binding. Operation ID: `DeleteAuthflow` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `authflow_id` | string | yes | Flow 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) | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Authorization Source: https://www.pontive.com/docs/api-reference/management/authorization Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## Preview authorization model ```http GET https://api.{region}.pontive.com/v1/authz/model/preview ``` Generate a read-only preview of the instance's OpenFGA authorization (FGA) model from the current registry (resource types, roles, permissions and inheritance), without writing it. Returns the OpenFGA DSL and JSON. Operation ID: `GetAuthorizationModelPreview` ### Responses - `200` OK: PreviewModelResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Regenerate authorization model ```http POST https://api.{region}.pontive.com/v1/authz/model/regenerate ``` Regenerate the instance's OpenFGA authorization (FGA) model from the current registry and write it to the instance's existing store; relationship tuples are kept. Registry changes do this automatically — use it after a platform upgrade that changes how the model is generated. Operation ID: `RegenerateAuthorizationModel` ### Responses - `200` OK: RegenerateModelResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### PreviewModelResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `dsl` | string | | DSL is the human-readable OpenFGA DSL. | | `json` | string | | JSON is the api.openfga.dev JSON model (importable into the OpenFGA playground). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### RegenerateModelResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `authorization_model_id` | string | | AuthorizationModelID is the id of the newly written OpenFGA model. | ### 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. | ### 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. | --- # Billing capability Source: https://www.pontive.com/docs/api-reference/management/billing-capability Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/capabilities/billing/disable ```http POST https://api.{region}.pontive.com/v1/capabilities/billing/disable ``` billing.customer.v1.CapabilityService/DisableBillingCapability (32-billing-overview.md, API Surface, Capability, Enabling and disabling the capability). Needs instance:manage. Refused with capability_in_use while contracts, unsettled invoices or prepaid balances remain. Operation ID: `DisableBillingCapability` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` { capabilities: { fga, billing } }: object - `401` Unauthorized: ErrResponse - `409` capability_in_use: ErrResponse ## POST /v1/capabilities/billing/enable ```http POST https://api.{region}.pontive.com/v1/capabilities/billing/enable ``` billing.customer.v1.CapabilityService/EnableBillingCapability (32-billing-overview.md, API Surface, Capability; 02b-instance-management.md, Capability toggle). Needs instance:manage. Answers the instance's capabilities after the change. Operation ID: `EnableBillingCapability` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` { capabilities: { fga, billing } }: object - `401` Unauthorized: ErrResponse - `403` capability_not_entitled: ErrResponse ## Schemas ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing catalog promotion Source: https://www.pontive.com/docs/api-reference/management/billing-catalog-promotion Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/catalog ```http GET https://api.{region}.pontive.com/v1/billing/catalog ``` billing.catalog.v1.CatalogPromotionService/ExportCatalog (34-billing-catalog.md, Promoting a catalog between instances; API Surface; billing-svc docs/questions.md, P113). The whole catalog as one document keyed by key, never by id: { pontive_document: "billing-catalog/v1", event_types, meters, products, features, pricing_units, rate_cards, packages, catalog_rules } (api-route-review D47), every list in key order, written as billing-svc wrote it. Needs sys:billing:read, and answers while billing is off, as every read does. Operation ID: `GetCatalog` · Capability: `billing` ### Responses - `200` A billing-catalog/v1 document: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/catalog/import ```http POST https://api.{region}.pontive.com/v1/billing/catalog/import ``` billing.catalog.v1.CatalogPromotionService/ImportCatalog (34-billing-catalog.md, Promoting a catalog between instances; API Surface; billing-svc docs/questions.md, P113). Body { document, dry_run, effective_at }: document is a billing-catalog/v1 document, passed to billing-svc byte for byte; dry_run is true when omitted, and returns the plan without applying it; with dry_run false the plan is applied in one transaction; effective_at (RFC 3339, default now) is when changed rates start. Answers the catalog_import_plan: dry_run, effective_at, created, changed, unchanged, absent (each { kind, key, fields }) and conflicts ({ kind, key, field, message }). An apply with conflicts is import_conflict, 409, with one details entry per conflict (field ..), and applies nothing. The body may be up to 6 MiB (an import document is at most 5 MB). Needs sys:billing:manage. Operation ID: `ImportCatalog` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key, read on an apply only | ### Responses - `200` A catalog_import_plan object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing catalog rules Source: https://www.pontive.com/docs/api-reference/management/billing-catalog-rules Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/catalog-rules ```http GET https://api.{region}.pontive.com/v1/billing/catalog-rules ``` billing.catalog.v1.CatalogRulesService/GetCatalogRules (34-billing-catalog.md, API Surface). Operation ID: `GetCatalogRules` · Capability: `billing` ### Responses - `200` A CatalogRules object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/catalog-rules ```http PATCH https://api.{region}.pontive.com/v1/billing/catalog-rules ``` billing.catalog.v1.CatalogRulesService/UpdateCatalogRules (34-billing-catalog.md, API Surface). Operation ID: `UpdateCatalogRules` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | | `If-Match` | string | | The ETag the document was read with, checked by billing-svc in the update: a stale one is refused 412 precondition_failed (D42) | ### Responses - `200` A CatalogRules object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing checkout sessions Source: https://www.pontive.com/docs/api-reference/management/billing-checkout-sessions Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/billing/checkout-sessions ```http POST https://api.{region}.pontive.com/v1/billing/checkout-sessions ``` billing.contract.v1.CheckoutSessionService/CreateCheckoutSession (35-contracts.md, Checkout session and API Surface). The client's server creates a session for a Customer or a subject; the checkout element confirms it through /v1/me/billing. success_url and cancel_url must be on one of the instance's app origins (billing-svc docs/questions.md, P71). Operation ID: `CreateCheckoutSession` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A CheckoutSession object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/checkout-sessions/{checkout_session_id} ```http GET https://api.{region}.pontive.com/v1/billing/checkout-sessions/{checkout_session_id} ``` billing.contract.v1.CheckoutSessionService/GetCheckoutSession (35-contracts.md, Checkout session and API Surface). Operation ID: `GetCheckoutSession` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `checkout_session_id` | string | yes | id | ### Responses - `200` A CheckoutSession object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/checkout-sessions/{checkout_session_id}/expire ```http POST https://api.{region}.pontive.com/v1/billing/checkout-sessions/{checkout_session_id}/expire ``` billing.contract.v1.CheckoutSessionService/ExpireCheckoutSession (35-contracts.md, Checkout session and API Surface). An open session becomes expired. Operation ID: `ExpireCheckoutSession` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `checkout_session_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A CheckoutSession object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing contracts Source: https://www.pontive.com/docs/api-reference/management/billing-contracts Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/contracts ```http GET https://api.{region}.pontive.com/v1/billing/contracts ``` billing.contract.v1.ContractService/ListContracts (35-contracts.md, API Surface). Operation ID: `ListContracts` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `customer_id` | string | | A cust_ id | | `status` | string | | status | | `package` | string | | A package's pkg_ id or its key (api-route-review D29, D55) | | `package_version` | integer | | package_version | ### Responses - `200` A list of Contract objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/contracts ```http POST https://api.{region}.pontive.com/v1/billing/contracts ``` billing.contract.v1.ContractService/CreateContract (35-contracts.md, API Surface). Operation ID: `CreateContract` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Contract object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/contracts/preview ```http POST https://api.{region}.pontive.com/v1/billing/contracts/preview ``` billing.contract.v1.ContractService/PreviewContract (35-contracts.md, API Surface). Operation ID: `PreviewContract` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The PreviewContractResponse fields: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/contracts/{contract_id} ```http GET https://api.{region}.pontive.com/v1/billing/contracts/{contract_id} ``` billing.contract.v1.ContractService/GetContract (35-contracts.md, API Surface). Operation ID: `GetContract` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `at` | string | | RFC 3339 time | ### Responses - `200` A Contract object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/contracts/{contract_id}/cancel ```http POST https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/cancel ``` billing.contract.v1.ContractService/CancelContract (35-contracts.md, API Surface). Operation ID: `CancelContract` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Contract object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/contracts/{contract_id}/change-package ```http POST https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/change-package ``` billing.contract.v1.ContractService/ChangeContractPackage (35-contracts.md, API Surface). Operation ID: `ChangeContractPackage` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Contract object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/contracts/{contract_id}/edits ```http GET https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/edits ``` billing.contract.v1.ContractService/ListContractEdits (35-contracts.md, API Surface). Operation ID: `ListContractEdits` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of Edit objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/contracts/{contract_id}/edits ```http POST https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/edits ``` billing.contract.v1.ContractService/CreateContractEdit (35-contracts.md, API Surface). Operation ID: `CreateContractEdit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Edit object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/contracts/{contract_id}/edits/preview ```http POST https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/edits/preview ``` billing.contract.v1.ContractService/PreviewContractEdit (35-contracts.md, API Surface). Operation ID: `PreviewContractEdit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The PreviewContractEditResponse fields: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id} ```http DELETE https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/edits/{edit_id} ``` billing.contract.v1.ContractService/DeleteContractEdit (35-contracts.md, API Surface). Operation ID: `DeleteContractEdit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | | `edit_id` | string | yes | edit_id | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/contracts/{contract_id}/history ```http GET https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/history ``` billing.contract.v1.ContractService/GetContractHistory (35-contracts.md, API Surface). Operation ID: `GetContractHistory` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Responses - `200` A ContractHistory object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/contracts/{contract_id}/revoke-cancellation ```http POST https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/revoke-cancellation ``` billing.contract.v1.ContractService/RevokeContractCancellation (35-contracts.md, API Surface). Operation ID: `RevokeContractCancellation` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The RevokeContractCancellationResponse fields: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing credit notes Source: https://www.pontive.com/docs/api-reference/management/billing-credit-notes Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/credit-notes ```http GET https://api.{region}.pontive.com/v1/billing/credit-notes ``` billing.invoice.v1.CreditNoteService/ListCreditNotes (37-invoicing.md, API Surface). Operation ID: `ListCreditNotes` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `invoice_id` | string | | A binv_ id | | `customer_id` | string | | A cust_ id | ### Responses - `200` A list of CreditNote objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/credit-notes ```http POST https://api.{region}.pontive.com/v1/billing/credit-notes ``` billing.invoice.v1.CreditNoteService/CreateCreditNote (37-invoicing.md, API Surface). Operation ID: `CreateCreditNote` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A CreditNote object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/credit-notes/preview ```http POST https://api.{region}.pontive.com/v1/billing/credit-notes/preview ``` billing.invoice.v1.CreditNoteService/PreviewCreditNote (37-invoicing.md, API Surface). Operation ID: `PreviewCreditNote` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A CreditNote object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/credit-notes/{credit_note_id} ```http GET https://api.{region}.pontive.com/v1/billing/credit-notes/{credit_note_id} ``` billing.invoice.v1.CreditNoteService/GetCreditNote (37-invoicing.md, API Surface). Operation ID: `GetCreditNote` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `credit_note_id` | string | yes | id | ### Responses - `200` A CreditNote object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/credit-notes/{credit_note_id}/pdf ```http GET https://api.{region}.pontive.com/v1/billing/credit-notes/{credit_note_id}/pdf ``` billing.invoice.v1.CreditNoteService/GetCreditNotePdf (37-invoicing.md, API Surface; The document). The credit note's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment with the file name billing-svc gives, {number}.pdf. A voided credit note's is the VOID rendition (billing-svc docs/questions.md, X158). locale is not read until documents are localized. Operation ID: `GetCreditNotePdf` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `credit_note_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `locale` | string | | locale | ### Responses - `200` The PDF: file, file - `401` Unauthorized: ErrResponse, ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse, ErrResponse - `422` Unprocessable Entity: ErrResponse, ErrResponse ## POST /v1/billing/credit-notes/{credit_note_id}/void ```http POST https://api.{region}.pontive.com/v1/billing/credit-notes/{credit_note_id}/void ``` billing.invoice.v1.CreditNoteService/VoidCreditNote (37-invoicing.md, API Surface). Operation ID: `VoidCreditNote` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `credit_note_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A CreditNote object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing currencies Source: https://www.pontive.com/docs/api-reference/management/billing-currencies Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/currencies ```http GET https://api.{region}.pontive.com/v1/billing/currencies ``` billing.catalog.v1.CurrencyService/ListCurrencies (32-billing-overview.md, API Surface, Currencies). Every currency billing accepts, sorted by code: its upper-case ISO 4217 code, English name, minor units (exponent), whether Stripe can charge it (chargeable) and Stripe's minimum charge, or null. chargeable=true lists only the chargeable ones. Unpaginated. Operation ID: `ListCurrencies` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `chargeable` | boolean | | Only the currencies Stripe can charge | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` A list of Currency objects: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing customers Source: https://www.pontive.com/docs/api-reference/management/billing-customers Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/customers ```http GET https://api.{region}.pontive.com/v1/billing/customers ``` billing.customer.v1.CustomerService/ListCustomers (32-billing-overview.md, API Surface). Operation ID: `ListCustomers` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `subject_type` | string | | subject_type | | `subject_id` | string | | subject_id | | `ingest_alias` | string | | ingest_alias | | `status` | string | | status | | `email` | string | | email | | `invoicing_status` | string | | invoicing_status | | `time_machine_id` | string | | time_machine_id | ### Responses - `200` A list of Customer objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/customers ```http POST https://api.{region}.pontive.com/v1/billing/customers ``` billing.customer.v1.CustomerService/CreateCustomer (32-billing-overview.md, API Surface; Customer). tax_status is auto, taxable, exempt or reverse_charge; left out, it is auto: billing decides reverse charge, and taxable forces tax (billing-svc docs/questions.md, P104, P105). Operation ID: `CreateCustomer` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Customer object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/customers/{customer_id} ```http GET https://api.{region}.pontive.com/v1/billing/customers/{customer_id} ``` billing.customer.v1.CustomerService/GetCustomer (32-billing-overview.md, API Surface). Operation ID: `GetCustomer` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Responses - `200` A Customer object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/customers/{customer_id} ```http PATCH https://api.{region}.pontive.com/v1/billing/customers/{customer_id} ``` billing.customer.v1.CustomerService/UpdateCustomer (32-billing-overview.md, API Surface; Customer). tax_status is auto, taxable, exempt or reverse_charge (billing-svc docs/questions.md, P105). Operation ID: `UpdateCustomer` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Customer object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/customers/{customer_id}/anonymize ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/anonymize ``` billing.customer.v1.CustomerService/AnonymizeCustomer (32-billing-overview.md, Customers, Anonymizing). Removes a settled Customer's personal data for a GDPR erasure: its name becomes the given one (default "Deleted customer"); its email, billing address, tax ids, locale, ingest aliases and metadata are cleared; its payment methods are detached on the provider; it is archived and its anonymized_at set. Its id, subject and history stay, and its issued invoices keep their documents, the tax record. Refused with customer_in_use while a contract has not ended or an invoice is a draft, held or open. Idempotent and irreversible: later writes are customer_anonymized. Operation ID: `AnonymizeCustomer` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Customer object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse - `503` Service Unavailable: ErrResponse ## POST /v1/billing/customers/{customer_id}/archive ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/archive ``` billing.customer.v1.CustomerService/ArchiveCustomer (32-billing-overview.md, API Surface). Operation ID: `ArchiveCustomer` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Customer object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/customers/{customer_id}/change-subject ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/change-subject ``` billing.customer.v1.CustomerService/ChangeCustomerSubject (32-billing-overview.md, Changing the subject). Re-points the Customer from user to organization, or from external to user or organization; the new subject must have no Customer of its own. Operation ID: `ChangeCustomerSubject` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Customer object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/customers/{customer_id}/unarchive ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/unarchive ``` billing.customer.v1.CustomerService/UnarchiveCustomer (32-billing-overview.md, API Surface). Operation ID: `UnarchiveCustomer` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Customer object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing dunning Source: https://www.pontive.com/docs/api-reference/management/billing-dunning Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/customers/{customer_id}/dunning ```http GET https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/dunning ``` billing.payment.v1.DunningService/GetCustomerDunning (38-payments-and-tax.md, API Surface, Dunning; Customer dunning state). The same state the Customer object carries as dunning; a send_invoice Customer is always none. Operation ID: `GetCustomerDunning` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | The Customer id | ### Responses - `200` A customer_dunning object: { status, started_at, invoice_ids, next_action }: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/customers/{customer_id}/dunning/retry ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/dunning/retry ``` billing.payment.v1.DunningService/RetryCustomerDunning (38-payments-and-tax.md, API Surface, Dunning). Tries every overdue invoice at once, oldest first, as the client; the schedule does not move. Operation ID: `RetryCustomerDunning` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | The Customer id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The customer_dunning object after the retries: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/dunning-policy ```http GET https://api.{region}.pontive.com/v1/billing/dunning-policy ``` billing.payment.v1.DunningService/GetDunningPolicy (38-payments-and-tax.md, API Surface, Dunning; Dunning policy). The instance's policy, with 38's defaults until it is changed. Operation ID: `GetDunningPolicy` · Capability: `billing` ### Responses - `200` A DunningPolicy object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/dunning-policy ```http PATCH https://api.{region}.pontive.com/v1/billing/dunning-policy ``` billing.payment.v1.DunningService/UpdateDunningPolicy (38-payments-and-tax.md, API Surface, Dunning; Dunning policy). A field left out keeps its value; retries and steps replace their lists; send_invoice is merged field by field, and null turns a field off (null on send_invoice turns every field in it off). More than 6 retries or 20 steps is field_too_long and changes nothing. Operation ID: `UpdateDunningPolicy` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | | `If-Match` | string | | The ETag the document was read with, checked by billing-svc in the update: a stale one is refused 412 precondition_failed (D42) | ### Responses - `200` The updated DunningPolicy object: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing entitlements Source: https://www.pontive.com/docs/api-reference/management/billing-entitlements Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/entitlements ```http GET https://api.{region}.pontive.com/v1/billing/entitlements ``` billing.entitlement.v1.EntitlementService/ListEntitlements (39-entitlements-and-controls.md, API Surface; Entitlement (resolved)). The resolved set for a subject (subject_type and subject_id) or a Customer: every feature some source sets, by key, each with its via. A boolean or numeric feature is { feature_id, key, type, value, via }; a metered one carries meter_id, allowance, limit, overage, period_start, period_end, used, remaining and balance in place of value. Operation ID: `GetEntitlements` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user, organization or external | | `subject_id` | string | | subject_id | | `customer_id` | string | | A cust_ id | | `context_organization_id` | string | | An org_ id: the organization a user subject acts in | ### Responses - `200` An entitlement_set object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing event types Source: https://www.pontive.com/docs/api-reference/management/billing-event-types Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/event-types ```http GET https://api.{region}.pontive.com/v1/billing/event-types ``` billing.metering.v1.EventTypeService/ListEventTypes (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). The instance's event types, newest first. Operation ID: `ListEventTypes` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `status` | string | | active or archived | | `origin` | string | | client or detected | ### Responses - `200` A list of event_type objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/event-types ```http POST https://api.{region}.pontive.com/v1/billing/event-types ``` billing.metering.v1.EventTypeService/CreateEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Defines an event type before any event of its key is sent: origin client, validation warn unless given (none, warn or reject), auto_enrich true unless given. Each property is { key, type, required, description }, type string, number or boolean, up to 100. A key already used, detected or defined, is event_type_key_conflict; at the instance's limit of active event types, event_type_limit_reached. Operation ID: `CreateEventType` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` An event_type object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `409` event_type_key_conflict, event_type_limit_reached: ErrResponse - `422` invalid_event_type_schema: ErrResponse ## POST /v1/billing/event-types/infer ```http POST https://api.{region}.pontive.com/v1/billing/event-types/infer ``` billing.metering.v1.EventTypeService/InferEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Takes { event }, one sample event as it would be sent, and answers a draft: the key, and one property per property of the sample with its value's type, each required false. Nothing is saved, so the draft has an empty id, null timestamps, and X-Idempotency-Key is not read; the client edits the draft and creates it. Operation ID: `InferEventType` · Capability: `billing` ### Responses - `200` A draft event_type object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/event-types/{event_type} ```http GET https://api.{region}.pontive.com/v1/billing/event-types/{event_type} ``` billing.metering.v1.EventTypeService/GetEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). An event type by its etyp_ id or its key. Each property carries its source, types_seen, first_seen_at and last_seen_at, read-only. An unknown one is event_type_not_found. Operation ID: `GetEventType` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_type` | string | yes | The event type's etyp_ id or its key (api-route-review D55) | ### Responses - `200` An event_type object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` event_type_not_found: ErrResponse ## PATCH /v1/billing/event-types/{event_type} ```http PATCH https://api.{region}.pontive.com/v1/billing/event-types/{event_type} ``` billing.metering.v1.EventTypeService/UpdateEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). A field left out keeps its value; the key does not change. properties replaces the whole list: a property left out is removed, one set or changed becomes source client, and [] removes them all. properties, auto_enrich and validation may not be null. Removing a property a meter names, or changing its type away from number where a meter needs one, is event_type_property_in_use. Operation ID: `UpdateEventType` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_type` | string | yes | The event type's etyp_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` An event_type object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` event_type_not_found: ErrResponse - `409` event_type_property_in_use: ErrResponse - `422` invalid_event_type_schema: ErrResponse ## POST /v1/billing/event-types/{event_type}/archive ```http POST https://api.{region}.pontive.com/v1/billing/event-types/{event_type}/archive ``` billing.metering.v1.EventTypeService/ArchiveEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). Refused with event_type_in_use while a meter's current or future version names it. Events of an archived type are accepted with no check and no enrichment. Operation ID: `ArchiveEventType` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_type` | string | yes | The event type's etyp_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` An event_type object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` event_type_not_found: ErrResponse - `409` event_type_in_use: ErrResponse ## POST /v1/billing/event-types/{event_type}/unarchive ```http POST https://api.{region}.pontive.com/v1/billing/event-types/{event_type}/unarchive ``` billing.metering.v1.EventTypeService/UnarchiveEventType (33-metering.md, API Surface, Event types; Event types and schemas; billing-svc docs/questions.md, P99). Served under /billing, since /v1/event-types is webhook-svc's (11-webhooks.md), as /v1/billing/events is (P32). At the instance's limit of active event types, refused with event_type_limit_reached. Operation ID: `UnarchiveEventType` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_type` | string | yes | The event type's etyp_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` An event_type object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` event_type_not_found: ErrResponse - `409` event_type_limit_reached: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing events Source: https://www.pontive.com/docs/api-reference/management/billing-events Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/events ```http GET https://api.{region}.pontive.com/v1/billing/events ``` billing.event.v1.EventService/ListEvents (32-billing-overview.md, API Surface, Events; billing-svc docs/questions.md, P32). Operation ID: `ListEvents` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `after` | string | | Cursor: a next_cursor, to continue forward | | `before` | string | | Cursor: a next_cursor, to read the page just before it | | `type` | string | | repeated or comma separated | | `customer_id` | string | | A cust_ id | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | ### Responses - `200` A list of Event objects, walked by cursor (api-route-review D41): CursorList - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/events/{event_id} ```http GET https://api.{region}.pontive.com/v1/billing/events/{event_id} ``` billing.event.v1.EventService/GetEvent (32-billing-overview.md, API Surface, Events; billing-svc docs/questions.md, P32). Operation ID: `GetEvent` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_id` | string | yes | id | ### Responses - `200` A Event object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### CursorList | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `next_cursor` | string | | | | `object` | string | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing exchange rates Source: https://www.pontive.com/docs/api-reference/management/billing-exchange-rates Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/exchange-rates ```http GET https://api.{region}.pontive.com/v1/billing/exchange-rates ``` billing.catalog.v1.ExchangeRateService/GetExchangeRate (32-billing-overview.md, API Surface, Exchange rates). The rate a line whose service period ends at at takes: the ECB's reference rate, or a manual rate for a pair the ECB does not publish. exchange_rate_unavailable while there is none yet. Operation ID: `GetExchangeRate` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | yes | ISO 4217 code of the currency converted from | | `to` | string | yes | ISO 4217 code of the currency converted to | | `at` | string | yes | RFC 3339 instant the line's service period ends at | ### Responses - `200` An ExchangeRate object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PUT /v1/billing/exchange-rates/{from}/{to}/{date} ```http PUT https://api.{region}.pontive.com/v1/billing/exchange-rates/{from}/{to}/{date} ``` billing.catalog.v1.ExchangeRateService/SetManualExchangeRate (32-billing-overview.md, API Surface, Exchange rates). A manual rate for one day (UTC) of a pair the ECB does not publish: { rate, note }. exchange_rate_published for a pair the ECB publishes; exchange_rate_in_use for a change to a rate a finalized invoice used. Operation ID: `ReplaceExchangeRate` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | yes | from | | `to` | string | yes | to | | `date` | string | yes | date, YYYY-MM-DD | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` An ExchangeRate object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing features Source: https://www.pontive.com/docs/api-reference/management/billing-features Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/features ```http GET https://api.{region}.pontive.com/v1/billing/features ``` billing.catalog.v1.FeatureService/ListFeatures (34-billing-catalog.md, API Surface). Operation ID: `ListFeatures` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of Feature objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/features ```http POST https://api.{region}.pontive.com/v1/billing/features ``` billing.catalog.v1.FeatureService/CreateFeature (34-billing-catalog.md, API Surface). Operation ID: `CreateFeature` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Feature object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/features/{feature} ```http GET https://api.{region}.pontive.com/v1/billing/features/{feature} ``` billing.catalog.v1.FeatureService/GetFeature (34-billing-catalog.md, API Surface). Operation ID: `GetFeature` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `feature` | string | yes | The feature's feat_ id or its key (api-route-review D55) | ### Responses - `200` A Feature object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/features/{feature} ```http PATCH https://api.{region}.pontive.com/v1/billing/features/{feature} ``` billing.catalog.v1.FeatureService/UpdateFeature (34-billing-catalog.md, API Surface). Operation ID: `UpdateFeature` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `feature` | string | yes | The feature's feat_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Feature object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/features/{feature}/archive ```http POST https://api.{region}.pontive.com/v1/billing/features/{feature}/archive ``` billing.catalog.v1.FeatureService/ArchiveFeature (34-billing-catalog.md, API Surface). Operation ID: `ArchiveFeature` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `feature` | string | yes | The feature's feat_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Feature object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing for the end customer Source: https://www.pontive.com/docs/api-reference/management/billing-for-the-end-customer Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/me/billing/balances ```http GET https://{auth_domain}/v1/me/billing/balances ``` billing.ledger.v1.MeLedgerService/ListMyBalances (36-credits-ledger.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyBalances` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `unit` | string | | unit | ### Responses - `200` A list of Balance objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/checkout-sessions ```http POST https://{auth_domain}/v1/me/billing/checkout-sessions ``` billing.contract.v1.MeContractService/CreateMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). The body is { subject?, packages, success_url, cancel_url }. billing-svc checks both URLs against the browser's Origin, which the gateway passes in the request context, and refuses a request without one (35-contracts.md, Checkout; billing-svc docs/questions.md, P71). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `CreateMyCheckoutSession` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A MyCheckoutSession object, object checkout_session: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/checkout-sessions/{checkout_session_id} ```http GET https://{auth_domain}/v1/me/billing/checkout-sessions/{checkout_session_id} ``` billing.contract.v1.MeContractService/GetMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). Under pontive:billing:pay, the scope the checkout element holds (41-embedded-organization-management.md, section 5.1). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `GetMyCheckoutSession` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `checkout_session_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` A MyCheckoutSession object, object checkout_session: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/checkout-sessions/{checkout_session_id}/confirm ```http POST https://{auth_domain}/v1/me/billing/checkout-sessions/{checkout_session_id}/confirm ``` billing.contract.v1.MeContractService/ConfirmMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). The body is { package, billing_frequency, billing_address?, tax_id?, promotion_code? }, package a pkg_ id or the package's key (api-route-review D55). The answer carries a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `ConfirmMyCheckoutSession` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `checkout_session_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The ConfirmMyCheckoutSessionResponse fields: outcome, contract_id, invoice_id, payment_id, client_secret, intent_type, decline_message and keys: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/checkout-sessions/{checkout_session_id}/preview ```http POST https://{auth_domain}/v1/me/billing/checkout-sessions/{checkout_session_id}/preview ``` billing.contract.v1.MeContractService/PreviewMyCheckoutSession (35-contracts.md, End-customer portal and API Surface). The body is confirm's (P65). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. Operation ID: `PreviewMyCheckoutSession` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `checkout_session_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` The first Invoice as it would be; nothing is saved: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/contracts ```http GET https://{auth_domain}/v1/me/billing/contracts ``` billing.contract.v1.MeContractService/ListMyContracts (35-contracts.md, End-customer portal and API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyContracts` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of MyContract objects, object contract, with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/contracts/{contract_id}/cancel ```http POST https://{auth_domain}/v1/me/billing/contracts/{contract_id}/cancel ``` billing.contract.v1.MeContractService/CancelMyContract (35-contracts.md, End-customer portal and API Surface). The body is { reason? }. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `CancelMyContract` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A MyContract object, object contract: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/contracts/{contract_id}/change-package ```http POST https://{auth_domain}/v1/me/billing/contracts/{contract_id}/change-package ``` billing.contract.v1.MeContractService/ChangeMyContract (35-contracts.md, End-customer portal and API Surface). The body is the preview's, with its preview_hash; preview_stale when the preview changed. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `ChangeMyContractPackage` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A MyContract object, object contract: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/contracts/{contract_id}/change-package/preview ```http POST https://{auth_domain}/v1/me/billing/contracts/{contract_id}/change-package/preview ``` billing.contract.v1.MeContractService/PreviewMyContractChange (35-contracts.md, End-customer portal and API Surface). The body is { package, billing_frequency? } or { quantity, subscription_id? }. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. Operation ID: `PreviewMyContractChange` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` The PreviewMyContractChangeResponse fields: contract, invoices, upcoming_invoice and preview_hash: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## DELETE /v1/me/billing/contracts/{contract_id}/edits/{edit_id} ```http DELETE https://{auth_domain}/v1/me/billing/contracts/{contract_id}/edits/{edit_id} ``` billing.contract.v1.MeContractService/DeleteMyContractEdit (35-contracts.md, Package changes and End-customer portal; billing-svc P124). Cancels the contract's pending change, a scheduled downgrade, by deleting its edit: edit_id is the contract's pending_change.edit_id, and any other edit is not_found. Only a change the end customer asked for, pending_change.initiated_by customer, may be cancelled here; one the client made is change_not_allowed. billing.contract.edit_cancelled is written as for DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `DeleteMyContractEdit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | | `edit_id` | string | yes | edit_id: the contract's pending_change.edit_id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/contracts/{contract_id}/revoke-cancellation ```http POST https://{auth_domain}/v1/me/billing/contracts/{contract_id}/revoke-cancellation ``` billing.contract.v1.MeContractService/RevokeMyContractCancellation (35-contracts.md, End-customer portal and API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `RevokeMyContractCancellation` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A MyContract object, object contract: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/credit-notes ```http GET https://{auth_domain}/v1/me/billing/credit-notes ``` billing.invoice.v1.MeInvoiceService/ListMyCreditNotes (37-invoicing.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyCreditNotes` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of CreditNote objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/credit-notes/{credit_note_id}/pdf ```http GET https://{auth_domain}/v1/me/billing/credit-notes/{credit_note_id}/pdf ``` billing.invoice.v1.MeInvoiceService/GetMyCreditNotePdf (37-invoicing.md, API Surface). The credit note's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment with the file name billing-svc gives. A voided credit note's is the VOID rendition. Another Customer's credit note is credit_note_not_found. Needs a token for the instance's me audience with pontive:billing:read. Operation ID: `GetMyCreditNotePdf` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `credit_note_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` The PDF: file, file - `401` Unauthorized: ErrResponse, ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse, ErrResponse - `404` Not Found: ErrResponse, ErrResponse - `422` Unprocessable Entity: ErrResponse, ErrResponse ## PATCH /v1/me/billing/customer ```http PATCH https://{auth_domain}/v1/me/billing/customer ``` billing.payment.v1.MePaymentService/SetMyDefaultPaymentMethod (38-payments-and-tax.md, API Surface; api-route-review D38). The caller's Customer, or the subject's it names: default_payment_method_id, one of its payment methods, becomes its default. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `UpdateMyCustomer` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The default PaymentMethod object: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/customers ```http GET https://{auth_domain}/v1/me/billing/customers ``` billing.customer.v1.MeCustomerService/ListMyCustomers (32-billing-overview.md, End-customer surface). The caller's own user Customer, the token's organization's where they hold a billing key, and the suspended or closed organizations they own and may recover (P79, P122), each with what the caller may do there: recovery marks those, and closed marks one its client closed, where only paying and the payment method are open. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyCustomers` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` A list of MyCustomer objects, object customer, without pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/entitlements ```http GET https://{auth_domain}/v1/me/billing/entitlements ``` billing.entitlement.v1.MeEntitlementService/ListMyEntitlements (39-entitlements-and-controls.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `GetMyEntitlements` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` An EntitlementSet object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/invoices ```http GET https://{auth_domain}/v1/me/billing/invoices ``` billing.invoice.v1.MeInvoiceService/ListMyInvoices (37-invoicing.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyInvoices` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `status` | string | | status | ### Responses - `200` A list of Invoice objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/invoices/upcoming ```http GET https://{auth_domain}/v1/me/billing/invoices/upcoming ``` billing.invoice.v1.MeInvoiceService/GetMyUpcomingInvoice (37-invoicing.md, API Surface). The upcoming invoice of the contract in force; invoice_not_found when there is none. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `GetMyUpcomingInvoice` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` An Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/invoices/{invoice_id} ```http GET https://{auth_domain}/v1/me/billing/invoices/{invoice_id} ``` billing.invoice.v1.MeInvoiceService/GetMyInvoice (37-invoicing.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `GetMyInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` An Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/invoices/{invoice_id}/pay ```http POST https://{auth_domain}/v1/me/billing/invoices/{invoice_id}/pay ``` billing.payment.v1.MePaymentService/PayMyInvoice (38-payments-and-tax.md, API Surface). The body is { method }, saved or new. The answer carries a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `PayMyInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The PayMyInvoiceResponse fields: outcome, payment_id, client_secret, intent_type, decline_message and keys: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/invoices/{invoice_id}/pdf ```http GET https://{auth_domain}/v1/me/billing/invoices/{invoice_id}/pdf ``` billing.invoice.v1.MeInvoiceService/GetMyInvoicePdf (37-invoicing.md, API Surface). The invoice's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment with the file name billing-svc gives. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `GetMyInvoicePdf` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` The PDF: file, file - `401` Unauthorized: ErrResponse, ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse, ErrResponse - `404` Not Found: ErrResponse, ErrResponse - `422` Unprocessable Entity: ErrResponse, ErrResponse ## GET /v1/me/billing/ledger-entries ```http GET https://{auth_domain}/v1/me/billing/ledger-entries ``` billing.ledger.v1.MeLedgerService/ListMyLedgerEntries (36-credits-ledger.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyLedgerEntries` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `after` | string | | Cursor: a next_cursor, to continue forward | | `before` | string | | Cursor: a next_cursor, to read the page just before it | | `type` | string | | type | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | ### Responses - `200` A list of LedgerEntry objects, walked by cursor (api-route-review D41): CursorList - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/me/billing/payment-method-session ```http POST https://{auth_domain}/v1/me/billing/payment-method-session ``` billing.payment.v1.MePaymentService/CreateMyPaymentMethodSession (38-payments-and-tax.md, API Surface). The body is { mode?, return_url? }. The answer carries a client secret: no log or span holds the response body (billing-svc docs/m17-design.md, R8). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `CreateMyPaymentMethodSession` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A PaymentMethodSession object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/payment-methods ```http GET https://{auth_domain}/v1/me/billing/payment-methods ``` billing.payment.v1.MePaymentService/ListMyPaymentMethods (38-payments-and-tax.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyPaymentMethods` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of PaymentMethod objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## DELETE /v1/me/billing/payment-methods/{payment_method_id} ```http DELETE https://{auth_domain}/v1/me/billing/payment-methods/{payment_method_id} ``` billing.payment.v1.MePaymentService/RemoveMyPaymentMethod (38-payments-and-tax.md, API Surface). {id} is the spec's {pm}. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay (D31, D48). Operation ID: `DeleteMyPaymentMethod` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `payment_method_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The removed PaymentMethod object, with warnings: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/payments ```http GET https://{auth_domain}/v1/me/billing/payments ``` billing.payment.v1.MePaymentService/ListMyPayments (38-payments-and-tax.md, API Surface). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `ListMyPayments` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of Payment objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/me/billing/usage ```http GET https://{auth_domain}/v1/me/billing/usage ``` billing.metering.v1.MeUsageService/GetMyUsage (33-metering.md, API Surface). The same parameters as GET /v1/usage, for the caller's Customer. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). Operation ID: `GetMyUsage` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | | `meter` | string | | A mtr_ id or a meter key; named without _id because it takes either (route review D1) | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | | `granularity` | string | | granularity | | `group_by` | string | | group_by, repeated or comma separated | ### Responses - `200` A UsageSeries object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### CursorList | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `next_cursor` | string | | | | `object` | 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. | ### 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. | --- # Billing grants Source: https://www.pontive.com/docs/api-reference/management/billing-grants Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/contracts/{contract_id}/allowance-schedules ```http GET https://api.{region}.pontive.com/v1/billing/contracts/{contract_id}/allowance-schedules ``` billing.ledger.v1.GrantService/ListAllowanceSchedules (36-credits-ledger.md, API Surface). Operation ID: `ListAllowanceSchedules` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of AllowanceSchedule objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/grants ```http GET https://api.{region}.pontive.com/v1/billing/grants ``` billing.ledger.v1.GrantService/ListGrants (36-credits-ledger.md, API Surface). Operation ID: `ListGrants` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `customer_id` | string | | A cust_ id | | `contract_id` | string | | A ctr_ id | | `status` | string | | status | | `kind` | string | | kind | | `unit` | string | | unit | ### Responses - `200` A list of Grant objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/grants ```http POST https://api.{region}.pontive.com/v1/billing/grants ``` billing.ledger.v1.GrantService/CreateGrant (36-credits-ledger.md, API Surface). Operation ID: `CreateGrant` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Grant object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/grants/{grant_id} ```http GET https://api.{region}.pontive.com/v1/billing/grants/{grant_id} ``` billing.ledger.v1.GrantService/GetGrant (36-credits-ledger.md, API Surface). Operation ID: `GetGrant` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `grant_id` | string | yes | id | ### Responses - `200` A Grant object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/grants/{grant_id} ```http PATCH https://api.{region}.pontive.com/v1/billing/grants/{grant_id} ``` billing.ledger.v1.GrantService/UpdateGrant (36-credits-ledger.md, API Surface). Operation ID: `UpdateGrant` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `grant_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Grant object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/grants/{grant_id}/void ```http POST https://api.{region}.pontive.com/v1/billing/grants/{grant_id}/void ``` billing.ledger.v1.GrantService/VoidGrant (36-credits-ledger.md, API Surface). Operation ID: `VoidGrant` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `grant_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The VoidGrantResponse fields: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing invoices Source: https://www.pontive.com/docs/api-reference/management/billing-invoices Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/invoices ```http GET https://api.{region}.pontive.com/v1/billing/invoices ``` billing.invoice.v1.InvoiceService/ListInvoices (37-invoicing.md, API Surface). Operation ID: `ListInvoices` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `customer_id` | string | | A cust_ id | | `contract_id` | string | | A ctr_ id | | `status` | string | | status | | `kind` | string | | kind | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | | `number` | string | | number | ### Responses - `200` A list of Invoice objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/invoices ```http POST https://api.{region}.pontive.com/v1/billing/invoices ``` billing.invoice.v1.InvoiceService/CreateInvoice (37-invoicing.md, API Surface). Operation ID: `CreateInvoice` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/invoices/upcoming ```http GET https://api.{region}.pontive.com/v1/billing/invoices/upcoming ``` billing.invoice.v1.InvoiceService/GetUpcomingInvoice (37-invoicing.md, API Surface). Operation ID: `GetUpcomingInvoice` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `contract_id` | string | | A ctr_ id | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/invoices/{invoice_id} ```http GET https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id} ``` billing.invoice.v1.InvoiceService/GetInvoice (37-invoicing.md, API Surface). Operation ID: `GetInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id_or_number | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/invoices/{invoice_id} ```http PATCH https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id} ``` billing.invoice.v1.InvoiceService/UpdateInvoice (37-invoicing.md, API Surface). Operation ID: `UpdateInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/invoices/{invoice_id}/finalize ```http POST https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/finalize ``` billing.invoice.v1.InvoiceService/FinalizeInvoice (37-invoicing.md, API Surface). Operation ID: `FinalizeInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/invoices/{invoice_id}/lines ```http GET https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/lines ``` billing.invoice.v1.InvoiceService/ListInvoiceLines (37-invoicing.md, API Surface). Operation ID: `ListInvoiceLines` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `product_id` | string | | A product id | ### Responses - `200` A list of Line objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/invoices/{invoice_id}/mark-uncollectible ```http POST https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/mark-uncollectible ``` billing.invoice.v1.InvoiceService/MarkInvoiceUncollectible (37-invoicing.md, API Surface). Operation ID: `MarkInvoiceUncollectible` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/invoices/{invoice_id}/pay ```http POST https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/pay ``` billing.invoice.v1.InvoiceService/PayInvoice (37-invoicing.md, API Surface). Operation ID: `PayInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/invoices/{invoice_id}/pdf ```http GET https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/pdf ``` billing.invoice.v1.InvoiceService/GetInvoicePdf (37-invoicing.md, API Surface; The document). The invoice's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment with the file name billing-svc gives, {number}.pdf. A voided invoice's is the VOID rendition (billing-svc docs/questions.md, X158); a draft has none (not_found). locale is not read until documents are localized. Operation ID: `GetInvoicePdf` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `locale` | string | | locale | ### Responses - `200` The PDF: file, file - `401` Unauthorized: ErrResponse, ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse, ErrResponse - `422` Unprocessable Entity: ErrResponse, ErrResponse ## POST /v1/billing/invoices/{invoice_id}/recompute ```http POST https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/recompute ``` billing.invoice.v1.InvoiceService/RecomputeInvoice (37-invoicing.md, API Surface). Operation ID: `RecomputeInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/invoices/{invoice_id}/send ```http POST https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/send ``` billing.invoice.v1.InvoiceService/SendInvoice (37-invoicing.md, API Surface; Emails). Sends the invoice issued email again, with its PDF, to the Customer's email as it is now, whatever the emails toggles say. A draft, held or void invoice is invoice_not_open (billing-svc docs/questions.md, X163). X-Idempotency-Key is passed through. The body takes no field. Operation ID: `SendInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The Invoice object: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/invoices/{invoice_id}/usage-detail ```http GET https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/usage-detail ``` billing.invoice.v1.InvoiceService/GetInvoiceUsageCsv (37-invoicing.md, API Surface; The document). One row per rated usage line (billing-svc docs/questions.md, X157), as a download, not an envelope: Content-Type text/csv; charset=utf-8 and Content-Disposition attachment with the file name billing-svc gives, {number}-usage-detail.csv. Operation ID: `GetInvoiceUsageCsv` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Responses - `200` The CSV: file, file - `401` Unauthorized: ErrResponse, ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse, ErrResponse - `422` Unprocessable Entity: ErrResponse, ErrResponse ## POST /v1/billing/invoices/{invoice_id}/void ```http POST https://api.{region}.pontive.com/v1/billing/invoices/{invoice_id}/void ``` billing.invoice.v1.InvoiceService/VoidInvoice (37-invoicing.md, API Surface). Operation ID: `VoidInvoice` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invoice_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Invoice object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing ledger Source: https://www.pontive.com/docs/api-reference/management/billing-ledger Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/billing/customers/{customer_id}/account-credit/refund ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/account-credit/refund ``` billing.ledger.v1.LedgerService/RefundAccountCredit (36-credits-ledger.md, API Surface; Account credit; 38-payments-and-tax.md, Refunds). Pays refundable account credit back to the provider payment it came from, never more than what is left of that payment, as refunds with reason account_credit_refund and no credit note (billing-svc docs/questions.md, P96). Credit added by hand, an invoice's surplus or an external overpayment can only be spent. More than the balance is balance_would_be_negative; more than the refundable part (the balances read's refundable) is refund_exceeds_payment. Operation ID: `RefundAccountCredit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | The Customer id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The credit_refunded LedgerEntry object: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/customers/{customer_id}/balances ```http GET https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/balances ``` billing.ledger.v1.LedgerService/ListBalances (36-credits-ledger.md, API Surface). Operation ID: `ListBalances` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `unit` | string | | unit | | `at` | string | | RFC 3339 time | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of Balance objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/customers/{customer_id}/ledger-adjustments ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/ledger-adjustments ``` billing.ledger.v1.LedgerService/CreateLedgerAdjustment (36-credits-ledger.md, API Surface). Operation ID: `CreateLedgerAdjustment` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A LedgerEntry object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/customers/{customer_id}/top-ups ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/top-ups ``` billing.ledger.v1.LedgerService/CreateTopUp (36-credits-ledger.md, API Surface). Operation ID: `CreateTopUp` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` The CreateTopUpResponse fields: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/customers/{customer_id}/wallets/{unit} ```http GET https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/wallets/{unit} ``` billing.ledger.v1.LedgerService/GetWallet (36-credits-ledger.md, API Surface). Operation ID: `GetWallet` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | | `unit` | string | yes | unit | ### Responses - `200` A Wallet object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PUT /v1/billing/customers/{customer_id}/wallets/{unit} ```http PUT https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/wallets/{unit} ``` billing.ledger.v1.LedgerService/UpdateWalletSettings (36-credits-ledger.md, API Surface). Operation ID: `ReplaceWalletSettings` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | | `unit` | string | yes | unit | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A WalletSettings object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/ledger-entries ```http GET https://api.{region}.pontive.com/v1/billing/ledger-entries ``` billing.ledger.v1.LedgerService/ListLedgerEntries (36-credits-ledger.md, API Surface). Operation ID: `ListLedgerEntries` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `after` | string | | Cursor: a next_cursor, to continue forward | | `before` | string | | Cursor: a next_cursor, to read the page just before it | | `customer_id` | string | | A cust_ id | | `grant_id` | string | | A grant id | | `account` | string | | account | | `type` | string | | type | | `invoice_id` | string | | A binv_ id | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | ### Responses - `200` A list of LedgerEntry objects, walked by cursor (api-route-review D41): CursorList - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### CursorList | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `next_cursor` | string | | | | `object` | string | | | ### 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. | ### 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. | ### 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. | --- # Billing meters Source: https://www.pontive.com/docs/api-reference/management/billing-meters Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/meters ```http GET https://api.{region}.pontive.com/v1/billing/meters ``` billing.metering.v1.MeterService/ListMeters (33-metering.md, API Surface). Operation ID: `ListMeters` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `status` | string | | status | | `event_type` | string | | event_type | ### Responses - `200` A list of Meter objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/meters ```http POST https://api.{region}.pontive.com/v1/billing/meters ``` billing.metering.v1.MeterService/CreateMeter (33-metering.md, API Surface). Operation ID: `CreateMeter` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Meter object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/meters/preview ```http POST https://api.{region}.pontive.com/v1/billing/meters/preview ``` billing.metering.v1.MeterService/PreviewMeter (33-metering.md, API Surface). Operation ID: `PreviewMeter` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A MeterPreview object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/meters/{meter} ```http GET https://api.{region}.pontive.com/v1/billing/meters/{meter} ``` billing.metering.v1.MeterService/GetMeter (33-metering.md, API Surface). Operation ID: `GetMeter` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `meter` | string | yes | The meter's mtr_ id or its key (api-route-review D55) | ### Responses - `200` A Meter object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/meters/{meter} ```http PATCH https://api.{region}.pontive.com/v1/billing/meters/{meter} ``` billing.metering.v1.MeterService/UpdateMeter (33-metering.md, API Surface). Operation ID: `UpdateMeter` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `meter` | string | yes | The meter's mtr_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Meter object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/meters/{meter}/archive ```http POST https://api.{region}.pontive.com/v1/billing/meters/{meter}/archive ``` billing.metering.v1.MeterService/ArchiveMeter (33-metering.md, API Surface). Operation ID: `ArchiveMeter` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `meter` | string | yes | The meter's mtr_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Meter object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PUT /v1/billing/meters/{meter}/definition ```http PUT https://api.{region}.pontive.com/v1/billing/meters/{meter}/definition ``` billing.metering.v1.MeterService/ReplaceMeterDefinition (33-metering.md, API Surface). Operation ID: `ReplaceMeterDefinition` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `meter` | string | yes | The meter's mtr_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Meter object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/meters/{meter}/unarchive ```http POST https://api.{region}.pontive.com/v1/billing/meters/{meter}/unarchive ``` billing.metering.v1.MeterService/UnarchiveMeter (33-metering.md, API Surface). Operation ID: `UnarchiveMeter` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `meter` | string | yes | The meter's mtr_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Meter object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing packages Source: https://www.pontive.com/docs/api-reference/management/billing-packages Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/packages ```http GET https://api.{region}.pontive.com/v1/billing/packages ``` billing.catalog.v1.PackageService/ListPackages (34-billing-catalog.md, API Surface). Operation ID: `ListPackages` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `status` | string | | status | | `public` | boolean | | public | ### Responses - `200` A list of Package objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/packages ```http POST https://api.{region}.pontive.com/v1/billing/packages ``` billing.catalog.v1.PackageService/CreatePackage (34-billing-catalog.md, API Surface). Operation ID: `CreatePackage` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Package object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/packages/{package} ```http GET https://api.{region}.pontive.com/v1/billing/packages/{package} ``` billing.catalog.v1.PackageService/GetPackage (34-billing-catalog.md, API Surface). Operation ID: `GetPackage` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `package` | string | yes | The package's pkg_ id or its key (api-route-review D55) | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `version` | integer | | version | ### Responses - `200` A Package object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/packages/{package} ```http PATCH https://api.{region}.pontive.com/v1/billing/packages/{package} ``` billing.catalog.v1.PackageService/UpdatePackage (34-billing-catalog.md, API Surface). Operation ID: `UpdatePackage` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `package` | string | yes | The package's pkg_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Package object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/packages/{package}/archive ```http POST https://api.{region}.pontive.com/v1/billing/packages/{package}/archive ``` billing.catalog.v1.PackageService/ArchivePackage (34-billing-catalog.md, API Surface). Operation ID: `ArchivePackage` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `package` | string | yes | The package's pkg_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Package object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/packages/{package}/discard-draft ```http POST https://api.{region}.pontive.com/v1/billing/packages/{package}/discard-draft ``` billing.catalog.v1.PackageService/DiscardPackageDraft (34-billing-catalog.md, API Surface). Operation ID: `DiscardPackageDraft` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `package` | string | yes | The package's pkg_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Package object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/packages/{package}/publish ```http POST https://api.{region}.pontive.com/v1/billing/packages/{package}/publish ``` billing.catalog.v1.PackageService/PublishPackage (34-billing-catalog.md, API Surface). Operation ID: `PublishPackage` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `package` | string | yes | The package's pkg_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Package object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/packages/{package}/unarchive ```http POST https://api.{region}.pontive.com/v1/billing/packages/{package}/unarchive ``` billing.catalog.v1.PackageService/UnarchivePackage (34-billing-catalog.md, API Surface). Operation ID: `UnarchivePackage` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `package` | string | yes | The package's pkg_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Package object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/packages/{package}/versions ```http GET https://api.{region}.pontive.com/v1/billing/packages/{package}/versions ``` billing.catalog.v1.PackageService/ListPackageVersions (34-billing-catalog.md, API Surface). Operation ID: `ListPackageVersions` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `package` | string | yes | The package's pkg_ id or its key (api-route-review D55) | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of Package objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing payment connections Source: https://www.pontive.com/docs/api-reference/management/billing-payment-connections Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/payment-connections ```http GET https://api.{region}.pontive.com/v1/billing/payment-connections ``` billing.payment.v1.PaymentConnectionService/ListPaymentConnections (32-billing-overview.md, API Surface, Payment connections). Operation ID: `ListPaymentConnections` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of PaymentConnection objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/payment-connections ```http POST https://api.{region}.pontive.com/v1/billing/payment-connections ``` billing.payment.v1.PaymentConnectionService/CreatePaymentConnection (32-billing-overview.md, API Surface, Payment connections). Operation ID: `CreatePaymentConnection` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A PaymentConnection object, with authorize_url: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/payment-connections/{payment_connection_id} ```http GET https://api.{region}.pontive.com/v1/billing/payment-connections/{payment_connection_id} ``` billing.payment.v1.PaymentConnectionService/GetPaymentConnection (32-billing-overview.md, API Surface, Payment connections). tax is the connected account's Stripe Tax read, read-only and null until read: { status, head_office, registrations: [{ country, state, type }], warnings: [{ code, message, country, tax_id_type }] } (38-payments-and-tax.md, The seller's tax identity; billing-svc docs/questions.md, P104). Operation ID: `GetPaymentConnection` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `payment_connection_id` | string | yes | id | ### Responses - `200` A PaymentConnection object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/payment-connections/{payment_connection_id}/refresh ```http POST https://api.{region}.pontive.com/v1/billing/payment-connections/{payment_connection_id}/refresh ``` billing.payment.v1.PaymentConnectionService/RefreshPaymentConnection (32-billing-overview.md, API Surface, Payment connections). tax is the connected account's Stripe Tax read, read-only and null until read: { status, head_office, registrations: [{ country, state, type }], warnings: [{ code, message, country, tax_id_type }] } (38-payments-and-tax.md, The seller's tax identity; billing-svc docs/questions.md, P104). Operation ID: `RefreshPaymentConnection` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `payment_connection_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A PaymentConnection object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/payment-connections/{payment_connection_id}/revoke ```http POST https://api.{region}.pontive.com/v1/billing/payment-connections/{payment_connection_id}/revoke ``` billing.payment.v1.PaymentConnectionService/RevokePaymentConnection (32-billing-overview.md, API Surface, Payment connections). Revokes Pontive's access on the provider; the connection stays, revoked, with revoked_at (api-route-review D8, D58). Operation ID: `RevokePaymentConnection` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `payment_connection_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The revoked PaymentConnection object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing payment methods Source: https://www.pontive.com/docs/api-reference/management/billing-payment-methods Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/billing/customers/{customer_id}/payment-method-session ```http POST https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/payment-method-session ``` billing.payment.v1.PaymentMethodService/CreatePaymentMethodSession (32-billing-overview.md, API Surface, Customers; 38-payments-and-tax.md, API Surface, Payment methods). Operation ID: `CreatePaymentMethodSession` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A PaymentMethodSession object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/customers/{customer_id}/payment-methods ```http GET https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/payment-methods ``` billing.payment.v1.PaymentMethodService/ListPaymentMethods (38-payments-and-tax.md, API Surface, Payment methods). Operation ID: `ListPaymentMethods` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of PaymentMethod objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## DELETE /v1/billing/customers/{customer_id}/payment-methods/{payment_method_id} ```http DELETE https://api.{region}.pontive.com/v1/billing/customers/{customer_id}/payment-methods/{payment_method_id} ``` billing.payment.v1.PaymentMethodService/DetachPaymentMethod (38-payments-and-tax.md, API Surface, Payment methods). A warning payment_method_required comes back when it was the last reusable method (38-payments-and-tax.md, Payment methods, Removal). Operation ID: `DeleteCustomerPaymentMethod` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | yes | id | | `payment_method_id` | string | yes | payment_method_id, the spec's {pm} | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The detached PaymentMethod object, with warnings: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### 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. | ### 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. | ### 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. | --- # Billing payments Source: https://www.pontive.com/docs/api-reference/management/billing-payments Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/payments ```http GET https://api.{region}.pontive.com/v1/billing/payments ``` billing.payment.v1.PaymentService/ListPayments (38-payments-and-tax.md, API Surface, Payments). Operation ID: `ListPayments` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `customer_id` | string | | A cust_ id | | `invoice_id` | string | | A binv_ id | | `status` | string | | status | | `from` | string | | from, RFC 3339 | | `to` | string | | to, RFC 3339 | ### Responses - `200` A list of Payment objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/payments ```http POST https://api.{region}.pontive.com/v1/billing/payments ``` billing.payment.v1.PaymentService/RecordExternalPayment (38-payments-and-tax.md, API Surface, Payments; External payments). Records money received outside the provider as a succeeded payment with external set. Partial amounts are allowed; more than is owed is external_payment_exceeds_due unless allow_overpayment, which sends the excess to account credit. paid_at may not be in the future. Operation ID: `CreatePayment` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Payment object, with external: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/payments/{payment_id} ```http GET https://api.{region}.pontive.com/v1/billing/payments/{payment_id} ``` billing.payment.v1.PaymentService/GetPayment (38-payments-and-tax.md, API Surface, Payments). Operation ID: `GetPayment` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `payment_id` | string | yes | id | ### Responses - `200` A Payment object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing pricing units Source: https://www.pontive.com/docs/api-reference/management/billing-pricing-units Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/pricing-units ```http GET https://api.{region}.pontive.com/v1/billing/pricing-units ``` billing.catalog.v1.PricingUnitService/ListPricingUnits (34-billing-catalog.md, API Surface). Operation ID: `ListPricingUnits` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of PricingUnit objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/pricing-units ```http POST https://api.{region}.pontive.com/v1/billing/pricing-units ``` billing.catalog.v1.PricingUnitService/CreatePricingUnit (34-billing-catalog.md, API Surface). Operation ID: `CreatePricingUnit` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A PricingUnit object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/pricing-units/{pricing_unit} ```http GET https://api.{region}.pontive.com/v1/billing/pricing-units/{pricing_unit} ``` billing.catalog.v1.PricingUnitService/GetPricingUnit (34-billing-catalog.md, API Surface). Operation ID: `GetPricingUnit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pricing_unit` | string | yes | The pricing unit's pu_ id or its key (api-route-review D55) | ### Responses - `200` A PricingUnit object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/pricing-units/{pricing_unit} ```http PATCH https://api.{region}.pontive.com/v1/billing/pricing-units/{pricing_unit} ``` billing.catalog.v1.PricingUnitService/UpdatePricingUnit (34-billing-catalog.md, API Surface). Operation ID: `UpdatePricingUnit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pricing_unit` | string | yes | The pricing unit's pu_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A PricingUnit object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/pricing-units/{pricing_unit}/archive ```http POST https://api.{region}.pontive.com/v1/billing/pricing-units/{pricing_unit}/archive ``` billing.catalog.v1.PricingUnitService/ArchivePricingUnit (34-billing-catalog.md, API Surface). Operation ID: `ArchivePricingUnit` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pricing_unit` | string | yes | The pricing unit's pu_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A PricingUnit object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing products Source: https://www.pontive.com/docs/api-reference/management/billing-products Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/products ```http GET https://api.{region}.pontive.com/v1/billing/products ``` billing.catalog.v1.ProductService/ListProducts (34-billing-catalog.md, API Surface). Operation ID: `ListProducts` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `kind` | string | | kind | | `tag` | string | | tag | | `status` | string | | status | | `meter_id` | string | | A mtr_ id | ### Responses - `200` A list of Product objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/products ```http POST https://api.{region}.pontive.com/v1/billing/products ``` billing.catalog.v1.ProductService/CreateProduct (34-billing-catalog.md, API Surface). Operation ID: `CreateProduct` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Product object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/products/{product} ```http GET https://api.{region}.pontive.com/v1/billing/products/{product} ``` billing.catalog.v1.ProductService/GetProduct (34-billing-catalog.md, API Surface). Operation ID: `GetProduct` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `product` | string | yes | The product's prdt_ id or its key (api-route-review D55) | ### Responses - `200` A Product object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/products/{product} ```http PATCH https://api.{region}.pontive.com/v1/billing/products/{product} ``` billing.catalog.v1.ProductService/UpdateProduct (34-billing-catalog.md, API Surface). Operation ID: `UpdateProduct` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `product` | string | yes | The product's prdt_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Product object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/products/{product}/archive ```http POST https://api.{region}.pontive.com/v1/billing/products/{product}/archive ``` billing.catalog.v1.ProductService/ArchiveProduct (34-billing-catalog.md, API Surface). Operation ID: `ArchiveProduct` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `product` | string | yes | The product's prdt_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Product object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/products/{product}/unarchive ```http POST https://api.{region}.pontive.com/v1/billing/products/{product}/unarchive ``` billing.catalog.v1.ProductService/UnarchiveProduct (34-billing-catalog.md, API Surface). Operation ID: `UnarchiveProduct` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `product` | string | yes | The product's prdt_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Product object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing rate cards Source: https://www.pontive.com/docs/api-reference/management/billing-rate-cards Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/rate-cards ```http GET https://api.{region}.pontive.com/v1/billing/rate-cards ``` billing.catalog.v1.RateCardService/ListRateCards (34-billing-catalog.md, API Surface). Operation ID: `ListRateCards` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of RateCard objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/rate-cards ```http POST https://api.{region}.pontive.com/v1/billing/rate-cards ``` billing.catalog.v1.RateCardService/CreateRateCard (34-billing-catalog.md, API Surface). Operation ID: `CreateRateCard` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A RateCard object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/rate-cards/{rate_card} ```http GET https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card} ``` billing.catalog.v1.RateCardService/GetRateCard (34-billing-catalog.md, API Surface). Operation ID: `GetRateCard` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | ### Responses - `200` A RateCard object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/rate-cards/{rate_card} ```http PATCH https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card} ``` billing.catalog.v1.RateCardService/UpdateRateCard (34-billing-catalog.md, API Surface). Operation ID: `UpdateRateCard` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A RateCard object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/rate-cards/{rate_card}/archive ```http POST https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card}/archive ``` billing.catalog.v1.RateCardService/ArchiveRateCard (34-billing-catalog.md, API Surface). Operation ID: `ArchiveRateCard` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A RateCard object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PUT /v1/billing/rate-cards/{rate_card}/conversions ```http PUT https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card}/conversions ``` billing.catalog.v1.RateCardService/ReplaceConversions (34-billing-catalog.md, API Surface). Operation ID: `ReplaceConversions` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A RateCard object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/rate-cards/{rate_card}/price/search ```http POST https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card}/price/search ``` billing.catalog.v1.RateCardService/GetRateCardPrice (34-billing-catalog.md, API Surface). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. Operation ID: `SearchRateCardPrices` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | ### Responses - `200` A PriceQuote object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/rate-cards/{rate_card}/rates ```http POST https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card}/rates ``` billing.catalog.v1.RateCardService/CreateRates (34-billing-catalog.md, API Surface). Operation ID: `CreateRates` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A list of Rate objects: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/rate-cards/{rate_card}/rates/search ```http POST https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card}/rates/search ``` billing.catalog.v1.RateCardService/ListRates (34-billing-catalog.md, API Surface). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. Operation ID: `SearchRates` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of Rate objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/rate-cards/{rate_card}/rates/{rate_id} ```http PATCH https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card}/rates/{rate_id} ``` billing.catalog.v1.RateCardService/UpdateRate (34-billing-catalog.md, API Surface). Operation ID: `UpdateRate` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | | `rate_id` | string | yes | rate_id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A Rate object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## DELETE /v1/billing/rate-cards/{rate_card}/rates/{rate_id} ```http DELETE https://api.{region}.pontive.com/v1/billing/rate-cards/{rate_card}/rates/{rate_id} ``` billing.catalog.v1.RateCardService/DeleteRate (34-billing-catalog.md, API Surface). Operation ID: `DeleteRate` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `rate_card` | string | yes | The rate card's rcard_ id or its key (api-route-review D55) | | `rate_id` | string | yes | rate_id | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing refunds and disputes Source: https://www.pontive.com/docs/api-reference/management/billing-refunds-and-disputes Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/disputes ```http GET https://api.{region}.pontive.com/v1/billing/disputes ``` billing.payment.v1.DisputeService/ListDisputes (38-payments-and-tax.md, API Surface, Refunds and disputes). Newest first. Operation ID: `ListDisputes` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `status` | string | | status: needs_response, under_review, won, lost or warning_closed | | `customer_id` | string | | A cust_ id | ### Responses - `200` A list of Dispute objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/disputes/{dispute_id} ```http GET https://api.{region}.pontive.com/v1/billing/disputes/{dispute_id} ``` billing.payment.v1.DisputeService/GetDispute (38-payments-and-tax.md, API Surface, Refunds and disputes). Operation ID: `GetDispute` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `dispute_id` | string | yes | id | ### Responses - `200` A Dispute object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/refunds ```http GET https://api.{region}.pontive.com/v1/billing/refunds ``` billing.payment.v1.RefundService/ListRefunds (38-payments-and-tax.md, API Surface, Refunds and disputes). Newest first. Operation ID: `ListRefunds` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `payment_id` | string | | A pay_ id | | `customer_id` | string | | A cust_ id | | `status` | string | | status: pending, succeeded, failed or canceled | ### Responses - `200` A list of Refund objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/refunds ```http POST https://api.{region}.pontive.com/v1/billing/refunds ``` billing.payment.v1.PaymentService/RefundPayment (38-payments-and-tax.md, API Surface, Payments; Refunds). Refunds a succeeded provider payment and creates its credit note, lines spread in proportion. amount is required; reason is duplicate, fraudulent or requested_by_customer (the default). The refund is answered as it stands once sent to the provider, usually pending. More than is left of the payment, an external or unsucceeded payment, or a payment with an open dispute is refund_exceeds_payment. Operation ID: `CreateRefund` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A Refund object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/refunds/{refund_id} ```http GET https://api.{region}.pontive.com/v1/billing/refunds/{refund_id} ``` billing.payment.v1.RefundService/GetRefund (38-payments-and-tax.md, API Surface, Refunds and disputes). Operation ID: `GetRefund` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `refund_id` | string | yes | id | ### Responses - `200` A Refund object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing settings Source: https://www.pontive.com/docs/api-reference/management/billing-settings Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/settings ```http GET https://api.{region}.pontive.com/v1/billing/settings ``` billing.customer.v1.BillingSettingsService/GetBillingSettings (32-billing-overview.md, API Surface). Operation ID: `GetBillingSettings` · Capability: `billing` ### Responses - `200` A BillingSettings object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/settings ```http PATCH https://api.{region}.pontive.com/v1/billing/settings ``` billing.customer.v1.BillingSettingsService/UpdateBillingSettings (32-billing-overview.md, API Surface; 38-payments-and-tax.md, Tax settings). A field left out keeps its value. limits is read-only here: a body that sets it is refused as a field the request does not take (PATCH /v1/billing/settings/limits sets it). tax.mode, tax.missing_location and tax.validate_tax_ids are replaced together. tax.manual_rates replaces the whole list: a rate with an id keeps that rate, one without mints a new one, null or [] clears the list, more than 200 is field_too_long; left out, the rates stay as they are. Operation ID: `UpdateBillingSettings` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | | `If-Match` | string | | The ETag the document was read with, checked by billing-svc in the update: a stale one is refused 412 precondition_failed (D42) | ### Responses - `200` A BillingSettings object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `422` Unprocessable Entity: ErrResponse ## PATCH /v1/billing/settings/limits ```http PATCH https://api.{region}.pontive.com/v1/billing/settings/limits ``` billing.customer.v1.BillingSettingsService/UpdateBillingLimits (32-billing-overview.md, API Surface, Billing settings; Billing settings, limits; billing-svc docs/questions.md, P99). Pontive's own route: needs instance:manage (production_instance:manage for a production instance), as the capability does, so a client's billing keys cannot change the instance's limits. Body { event_types?, meters? }, each a whole number from 0 to 10,000; only the fields given change, and null is refused. Refused while billing is off. A limit lowered below the current count refuses nothing that exists. Answers the billing settings. Operation ID: `UpdateBillingLimits` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A billing_settings object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing subject states Source: https://www.pontive.com/docs/api-reference/management/billing-subject-states Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/subject-state ```http GET https://api.{region}.pontive.com/v1/billing/subject-state ``` billing.entitlement.v1.SubjectStateService/GetSubjectState (32-billing-overview.md, API Surface, Subject states; Data Model, Subject state). The subject's current state: its package, every feature it resolves a value for by key ({ type, value } for a boolean or numeric feature, { type, allowance, per, limit, overage, exhausted } for a metered one; billing-svc docs/questions.md, P107), seat_limit, suspended and suspension_cause, with a version that increases on every change. A subject with no state yet answers the defaults with version 0: customer_id, package and seat_limit null, the values of default_features as features (a metered default not exhausted), suspended false. Needs sys:billing:read on the root, and answers while billing is off (billing-svc docs/questions.md, P41). An unknown subject_type is invalid_subject_type; a user or organization not in the instance is subject_not_found. The RPC writes nothing, so X-Idempotency-Key is not read. Operation ID: `GetSubjectState` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | yes | user, organization or external | | `subject_id` | string | yes | A user's or organization's id, or the client's own external id | ### Responses - `200` A subject_state object: Object - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing tax Source: https://www.pontive.com/docs/api-reference/management/billing-tax Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/billing/tax/preview ```http POST https://api.{region}.pontive.com/v1/billing/tax/preview ``` billing.payment.v1.TaxService/PreviewTax (38-payments-and-tax.md, API Surface, Tax). Calculated tax, without recording: the calculation finalization uses. Give customer or address, not both; currency is required with an address. The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. No location under missing_location hold is customer_location_required. Operation ID: `PreviewTax` · Capability: `billing` ### Responses - `200` A tax_preview object: { mode, status, tax_total, lines, tax_breakdown }: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing time machines Source: https://www.pontive.com/docs/api-reference/management/billing-time-machines Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/time-machines ```http GET https://api.{region}.pontive.com/v1/billing/time-machines ``` billing.timemachine.v1.TimeMachineService/ListTimeMachines (32-billing-overview.md, API Surface). Operation ID: `ListTimeMachines` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number, from 1 | | `limit` | integer | | Items per page, 1 to 100, default 25 | ### Responses - `200` A list of TimeMachine objects with pagination: List - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/time-machines ```http POST https://api.{region}.pontive.com/v1/billing/time-machines ``` billing.timemachine.v1.TimeMachineService/CreateTimeMachine (32-billing-overview.md, API Surface). Operation ID: `CreateTimeMachine` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `201` A TimeMachine object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/time-machines/{time_machine_id} ```http GET https://api.{region}.pontive.com/v1/billing/time-machines/{time_machine_id} ``` billing.timemachine.v1.TimeMachineService/GetTimeMachine (32-billing-overview.md, API Surface). Operation ID: `GetTimeMachine` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `time_machine_id` | string | yes | id | ### Responses - `200` A TimeMachine object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/time-machines/{time_machine_id}/advance ```http POST https://api.{region}.pontive.com/v1/billing/time-machines/{time_machine_id}/advance ``` billing.timemachine.v1.TimeMachineService/AdvanceTimeMachine (32-billing-overview.md, API Surface). Operation ID: `AdvanceTimeMachine` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `time_machine_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A TimeMachine object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/time-machines/{time_machine_id}/customers ```http POST https://api.{region}.pontive.com/v1/billing/time-machines/{time_machine_id}/customers ``` billing.timemachine.v1.TimeMachineService/AddTimeMachineCustomer (32-billing-overview.md, API Surface). Operation ID: `CreateTimeMachineCustomer` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `time_machine_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A TimeMachine object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/time-machines/{time_machine_id}/end ```http POST https://api.{region}.pontive.com/v1/billing/time-machines/{time_machine_id}/end ``` billing.timemachine.v1.TimeMachineService/EndTimeMachine (32-billing-overview.md, API Surface). Operation ID: `EndTimeMachine` · Capability: `billing` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `time_machine_id` | string | yes | id | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` A TimeMachine object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### List | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### 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. | ### 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. | --- # Billing usage Source: https://www.pontive.com/docs/api-reference/management/billing-usage Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 /v1/billing/usage/diagnostics ```http GET https://api.{region}.pontive.com/v1/billing/usage/diagnostics ``` billing.metering.v1.UsageService/GetUsageDiagnostics (33-metering.md, API Surface, Usage). Counts per meter: missing_property, non_numeric, missing_group_keys, late_duplicates, and not_entitled, the events the meter counts from Customers with no feature and no product on it at the event's time, accepted and billed as any other (billing-svc docs/questions.md, P109). Operation ID: `GetUsageDiagnostics` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `meter` | string | yes | A meter's mtr_ id or its key (api-route-review D55) | | `customer_id` | string | | customer_id | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | ### Responses - `200` A UsageDiagnostics object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/usage/events ```http GET https://api.{region}.pontive.com/v1/billing/usage/events ``` billing.metering.v1.UsageService/ListUsageEvents (33-metering.md, API Surface). Operation ID: `ListUsageEvents` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Items per page, 1 to 100, default 25 | | `after` | string | | Cursor: a next_cursor, to continue forward | | `before` | string | | Cursor: a next_cursor, to read the page just before it | | `customer_id` | string | | customer_id | | `event_type` | string | | event_type | | `transaction_id` | string | | transaction_id | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | | `status` | string | | status | | `late` | boolean | | late | ### Responses - `200` A list of UsageEvent objects, walked by cursor (api-route-review D41): CursorList - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## GET /v1/billing/usage/late ```http GET https://api.{region}.pontive.com/v1/billing/usage/late ``` billing.metering.v1.UsageService/GetLateUsage (33-metering.md, API Surface). Operation ID: `GetLateUsage` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `customer_id` | string | | customer_id | | `meter` | string | | A meter's mtr_ id or its key (api-route-review D55) | | `contract_id` | string | | contract_id | | `period_start` | string | | RFC 3339 time | | `from` | string | | RFC 3339 time | | `to` | string | | RFC 3339 time | ### Responses - `200` A LateUsage object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/billing/usage/search ```http POST https://api.{region}.pontive.com/v1/billing/usage/search ``` billing.metering.v1.UsageService/GetUsage (33-metering.md, API Surface). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. Operation ID: `SearchUsage` · Capability: `billing` ### Responses - `200` A UsageSeries object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CursorList | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Object[] | | | | `next_cursor` | string | | | | `object` | string | | | ### 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. | ### 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. | --- # Blueprints Source: https://www.pontive.com/docs/api-reference/management/blueprints Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## Delete blueprint ```http DELETE https://api.{region}.pontive.com/v1/branding/blueprints/{blueprint_id} ``` Delete a custom blueprint. Built-in blueprints cannot be deleted. Widgets already instantiated from it are unaffected — they belong to their flows. Returns 204 No Content on success. Operation ID: `DeleteBlueprint` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `blueprint_id` | string | yes | Blueprint ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Branding document Source: https://www.pontive.com/docs/api-reference/management/branding-document Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## Export the branding document ```http GET https://api.{region}.pontive.com/v1/branding/document ``` The instance's branding as one branding/v1 document (api-route-review D47): the brand's published tokens and theme, the localization settings, the instance's own published widget definitions, the brand's per-widget layouts, styles and copy, the custom blueprints, and the files the brand uploaded, inlined so the document works in another instance. Only the published state is exported; drafts stay in the dashboard. Everything is named by a key, never an id, and the output is deterministic: two exports of the same state are byte-identical, and the ETag is the hash of the bytes. Send it as If-None-Match to get 304 when nothing changed. Import the document into another instance with POST /v1/branding/document/import. Needs sys:brand:read and sys:widget:read. Operation ID: `GetBrandingDocument` ### Responses - `200` A branding/v1 document: BrandingDocument - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Import a branding document ```http POST https://api.{region}.pontive.com/v1/branding/document/import ``` Plans importing a branding/v1 document into this instance and, with dry_run false, applies the plan (api-route-review D47). The brand is replaced: its tokens, theme, localization settings and every per-widget customization take the document's values, and a customization the instance has and the document lacks is reset and listed as changed. Widget definitions and blueprints are merged by key: a new key is created, a differing one replaced (a published definition's markup never changes, so a different one is a conflict), and one the document lacks is listed as absent and left alone. Nothing is deleted. With publish true (the default) the import publishes one new branding version and the theme; with publish false it writes drafts for review in the dashboard. Re-importing an instance's own export plans every entry unchanged and writes nothing. The dry run's ETag fingerprints the instance's branding: send it as If-Match on the apply to be refused 412 precondition_failed if anything changed since. An apply with conflicts is 409 import_conflict, one detail per conflict, field .., and applies nothing. A document the format refuses (not JSON, a member it does not define, a pontive_document it does not read) is 422 field_invalid_format; one over 5 MB is 422 field_too_long. X-Idempotency-Key makes an apply safe to retry; the same key with another request is 422 idempotency_key_reused. Needs sys:brand:manage and sys:widget:manage, and sys:settings:manage when the localization settings change. Operation ID: `ImportBrandingDocument` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `If-Match` | string | | The dry run's ETag: the apply is refused 412 precondition_failed if the instance's branding changed since | | `X-Idempotency-Key` | string | | Idempotency key, read on an apply | ### Request body (`application/json`, required): ImportBrandingRequest The document and how to import it ### Responses - `200` OK: BrandingImportPlan - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` instance_unclaimed: the instance is unclaimed; claim this instance to customize its branding (pontive-spec 47): ErrResponse - `409` import_conflict: the plan has conflicts, one detail each; nothing was applied: ErrResponse - `412` precondition_failed: the branding changed since the dry run: ErrResponse - `422` field_invalid_format, field_too_long, missing_required_field or idempotency_key_reused: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### BrandingDocument Document is a branding/v1 document, passed to branding-svc as the bytes it was sent. At most 5 MB. | Field | Type | Required | Description | | --- | --- | --- | --- | | `assets` | Record | | Assets are the uploaded files the tokens reference as asset:sha256-, keyed sha256-. A URL the customer hosts stays a URL. | | `blueprints` | BrandingDocumentBlueprint[] | | Blueprints are the instance's custom blueprints, by id. | | `brand` | BrandingDocumentBrand | | | | `localization` | BrandingDocumentLocalization | | | | `pontive_document` | "branding/v1" | | PontiveDocument is the document type. An import reads the current and the previous major version. | | `pontkit` | string | | Pontkit is the pontkit release the document was exported against. Informational: an import checks markup and the theme against the target's own release. | | `widget_customizations` | BrandingDocumentCustomization[] | | WidgetCustomizations are the brand's per-widget layouts, styles and copy, by the definition's key. The brand is a singleton: an import resets a customization the target has and the document lacks. | | `widgets` | DocumentWidgetDefinition[] | | Widgets are the instance's own published widget definitions (keys starting custom_). Built-ins are the same everywhere and never travel. | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### ImportBrandingRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `discard_unpublished` | boolean | | DiscardUnpublished lets the import overwrite a draft with unpublished changes, which is otherwise a conflict. | | `document` | BrandingDocument | | Document is a branding/v1 document, passed to branding-svc as the bytes it was sent. At most 5 MB. | | `dry_run` | boolean | | DryRun returns the plan and writes nothing. True when omitted: send false to apply. | | `publish` | boolean | | Publish publishes what the import changes. True when omitted; false writes drafts for review in the dashboard. | | `secrets` | Record | | Secrets are the values of the document's {"$secret": ""} placeholders, by name; never inside the document, and never echoed back. A placeholder with no value here or in the target is a conflict. | ### BrandingImportPlan | Field | Type | Required | Description | | --- | --- | --- | --- | | `absent` | PlanEntry[] | | | | `changed` | PlanEntry[] | | | | `conflicts` | PlanIssue[] | | | | `created` | PlanEntry[] | | | | `dry_run` | boolean | | DryRun is true when nothing was written. | | `object` | "branding_import_plan" | | | | `publish` | boolean | | Publish says whether the changes are published, or left as drafts. | | `unchanged` | PlanEntry[] | | | | `warnings` | PlanIssue[] | | | ### BrandingDocumentAsset | Field | Type | Required | Description | | --- | --- | --- | --- | | `content_type` | string | | | | `data` | string (byte) | | Data is the file's bytes, base64-encoded. | ### BrandingDocumentBlueprint | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `document` | object | | Document is the fragment: its nodes and edges, the widgets named by blueprint-local refs. | | `id` | string | | | | `name` | string | | | | `open_events` | string[] | | | | `widgets` | Record | | | ### BrandingDocumentBrand | Field | Type | Required | Description | | --- | --- | --- | --- | | `theme` | object | | Theme is the published pont theme, its shape pontkit-core's, in the key order it was saved with. | | `tokens` | object | | Tokens is the token tree: reference ramps, semantic roles, component overrides and assets. Fonts are font catalog keys; an uploaded file is asset:sha256-. | ### BrandingDocumentLocalization | Field | Type | Required | Description | | --- | --- | --- | --- | | `default_locale` | string | | | | `enabled_locales` | string[] | | | ### BrandingDocumentCustomization | Field | Type | Required | Description | | --- | --- | --- | --- | | `layout` | string | | Layout is the brand's own arrangement of the definition's markup. | | `styles` | BrandingDocumentStyles | | | | `translations` | Record> | | Translations maps a locale to the copy overlay's entries, . to text. | | `widget_key` | string | | WidgetKey is the definition's key: a built-in's (signin) or the instance's (custom_…). | ### DocumentWidgetDefinition | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `key` | string | | | | `markup` | string | | Markup is the definition's pontkit markup. | | `name` | string | | | ### 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. | ### PlanEntry | Field | Type | Required | Description | | --- | --- | --- | --- | | `fields` | string[] | | Fields are the document fields that differ, for a changed object. | | `key` | string | | Key is the object's key in the document: a flow's or a blueprint's id, a definition's key, a customization's widget_key, an asset's sha256-, or "" for a singleton (brand, theme, localization). | | `kind` | string | | Kind is what the object is. | ### PlanIssue | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code says why. A conflict's: invalid, immutable, retired, missing_reference, unpublished_changes, missing_secret or assets_not_available. A warning's: instance_specific_id, unknown_connection, locale_not_enabled, unused_asset, unused_secret or validation. | | `field` | string | | Field is the document field it is about, "" for the whole object. The whole path is .., the field a 409 import_conflict detail names. | | `key` | string | | | | `kind` | string | | | | `message` | string | | | ### WidgetSpec | Field | Type | Required | Description | | --- | --- | --- | --- | | `from_key` | string | | | | `markup` | string | | | | `name` | string | | Name is the new widget's name in the flow; its id is minted from it. | ### BrandingDocumentStyles | Field | Type | Required | Description | | --- | --- | --- | --- | | `instances` | Record> | | | | `tokens` | object | | | ### 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. | --- # Capabilities Source: https://www.pontive.com/docs/api-reference/management/capabilities Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## Turn off Fine-Grained Authorization ```http POST https://api.{region}.pontive.com/v1/capabilities/fga/disable ``` Turn off the instance's Fine-Grained Authorization capability. Refused with capability_in_use (409) while the instance has custom resource types. Operation ID: `DisableFGA` ### Responses - `200` OK: CapabilitiesResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse ## Turn on Fine-Grained Authorization ```http POST https://api.{region}.pontive.com/v1/capabilities/fga/enable ``` Turn on the instance's Fine-Grained Authorization capability: custom resource types and everything built on them. Needs a Pontive user who may manage the instance. Operation ID: `EnableFGA` ### Responses - `200` OK: CapabilitiesResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### CapabilitiesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `capabilities` | Capabilities | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Capabilities | Field | Type | Required | Description | | --- | --- | --- | --- | | `billing` | Capability | | FGA is Fine-Grained Authorization: custom resource types and everything built on them. | | `fga` | Capability | | FGA is Fine-Grained Authorization: custom resource types and everything built on them. | ### 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. | ### Capability FGA is Fine-Grained Authorization: custom resource types and everything built on them. | Field | Type | Required | Description | | --- | --- | --- | --- | | `enabled` | boolean | | | ### 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. | --- # Delegations Source: https://www.pontive.com/docs/api-reference/management/delegations Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 delegations ```http GET https://api.{region}.pontive.com/v1/delegations ``` Delegation grants, filtered by user, agent and organization (D23), each with its organization, scopes and expiry. Needs sys:delegation:read on the instance root. Operation ID: `ListDelegations` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_id` | string | | The delegating user (usr_) | | `agent_id` | string | | The agent delegated to (agt_) | | `organization_id` | string | | The organization the grant is bounded to | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListDelegationsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Delegate to an agent ```http POST https://api.{region}.pontive.com/v1/delegations ``` Authorize an agent to act for a user (pontive-spec 20 C4): in one organization, where both the user is a member and the agent is installed, or with no organization_id at the instance root, which needs a root installation. Creating a grant the (user, agent, organization) already has replaces its scopes and expiry. The agent then exchanges the user's token, or this grant, for a token acting for the user — allowed only what the user and the agent both are. Needs sys:delegation:manage on the instance root. A token acting for its subject is refused (actor_refused): a delegation is an authority grant, the user's own to give. Operation ID: `CreateDelegation` ### Request body (`application/json`, required): CreateDelegationRequest User, agent, organization, scopes and expiry ### Responses - `201` Created: Delegation - `400` delegation_agent_not_installed, delegation_user_not_member, delegation_scope_invalid, delegation_expiry_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` actor_refused: a token acting for its subject cannot delegate: ErrResponse - `404` Not Found: ErrResponse - `409` delegation_agent_inactive, delegation_user_inactive: ErrResponse - `500` Internal Server Error: ErrResponse ## Get a delegation ```http GET https://api.{region}.pontive.com/v1/delegations/{delegation_id} ``` One delegation grant. Needs sys:delegation:read on the instance root. Operation ID: `GetDelegation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `delegation_id` | string | yes | Delegation ID (dlg_) | ### Responses - `200` OK: Delegation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Revoke a delegation ```http DELETE https://api.{region}.pontive.com/v1/delegations/{delegation_id} ``` Delete a delegation grant: the agent's next exchange on it is refused, and a token it already exchanged stops being answered on Pontive's checks and listings at once. Needs sys:delegation:manage on the instance root. Operation ID: `DeleteDelegation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `delegation_id` | string | yes | Delegation ID (dlg_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List an organization's delegations ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/delegations ``` The delegation grants in the organization: which users let which agents act for them there. Needs sys:agent:read on the organization (pontive-spec 20 G2): its owners and admins hold it, an instance administrator through inheritance, and an end user's token with pontive:org:agent:read reaches it for their own organization. Operation ID: `ListOrganizationDelegations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListDelegationsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Revoke a delegation in the organization ```http DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/delegations/{delegation_id} ``` An organization administrator revokes a delegation grant in their organization (pontive-spec 20 G2, C4): the agent's next exchange on it is refused, and a token it already exchanged stops being answered on Pontive's checks and listings at once. 404 for a grant in another organization or in none. Needs sys:agent:install on the organization. Operation ID: `DeleteOrganizationDelegation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `delegation_id` | string | yes | Delegation ID (dlg_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListDelegationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Delegation[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateDelegationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | yes | | | `expires_at` | string | | ExpiresAt, RFC 3339 and in the future, ends the grant; omit it for none. | | `organization_id` | string | | OrganizationID is the organization the agent acts for the user in; omit it for the instance root, which needs a root installation. | | `scopes` | string[] | yes | Scopes are what the agent's exchanged tokens may carry: at most 100, each within the agent's client grants on the instance's APIs. | | `user_id` | string | yes | UserID is the user who delegates (usr_): the grant is theirs (D5). | ### Delegation | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | | | `created_at` | string | | | | `created_by` | Actor | | CreatedBy is who created the grant, or last replaced it. | | `expires_at` | string | | | | `id` | string | | | | `instance_id` | string | | | | `last_used_at` | string | | | | `object` | string | | | | `organization_id` | string | | OrganizationID is the organization the agent may act for the user in; empty for the instance root. | | `scopes` | string[] | | | | `updated_at` | string | | | | `user_id` | string | | UserID is the delegator. | ### 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. | ### Actor CreatedBy is who created the grant, or last replaced it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `name` | string | | | | `type` | 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. | --- # Groups Source: https://www.pontive.com/docs/api-reference/management/groups Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 groups ```http GET https://api.{region}.pontive.com/v1/groups ``` List the instance's groups, filtered by owner (D6, D15, D44): owner_type root lists the instance's own groups, org the organizations', a resource type key that type's resources'; owner_id narrows to one owner's. Neither lists every group. Operation ID: `ListGroups` ### 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_ | | `search` | string | | Matches the name | | `external_id` | string | | An identity provider's id for the group | | `page` | integer | | Page number | | `limit` | integer | | Items per page | | `sort` | string | | Sort field; prefix with - for descending. Allowed: created_at, updated_at, name. Default: -created_at | ### Responses - `200` OK: ListGroupsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## Create a group ```http POST https://api.{region}.pontive.com/v1/groups ``` Create a group, owned by the instance root, an organization or a resource (D5, D6, D44): owner_type is root (the default), org or the owning resource's type key, owner_id its prefixed id (org_, res_; for root the inst_ id or empty). An instance group (root) holds any of the instance's users and is granted roles only on the instance root and resources in no organization; an organization's is a set of its members granted on the organization or its resources; a resource's holds its organization's members and is granted only on the resource and the resources beneath it. Operation ID: `CreateGroup` ### Request body (`application/json`, required): CreateOwnedGroupRequest Group ### Responses - `201` Created: Group - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse ## Get a group ```http GET https://api.{region}.pontive.com/v1/groups/{group_id} ``` Operation ID: `GetGroup` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | ### Responses - `200` OK: Group - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Update a group ```http PATCH https://api.{region}.pontive.com/v1/groups/{group_id} ``` Operation ID: `UpdateGroup` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | ### Request body (`application/json`, required): UpdateGroupRequest Changes ### Responses - `200` OK: Group - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse ## Delete a group ```http DELETE https://api.{region}.pontive.com/v1/groups/{group_id} ``` Delete a group with its members and grants. Its members lose what the group gave them. Operation ID: `DeleteGroup` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## List a group's members ```http GET https://api.{region}.pontive.com/v1/groups/{group_id}/members ``` Operation ID: `ListGroupMembers` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `search` | string | | Matches email and name | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListGroupMembersResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## Add members to a group ```http POST https://api.{region}.pontive.com/v1/groups/{group_id}/members ``` Add users to a group. Each must be a member of the group's organization (user_not_in_organization); one already in the group is left as they are. Operation ID: `CreateGroupMembers` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | ### Request body (`application/json`, required): AddGroupMembersRequest Users ### Responses - `200` OK: AddGroupMembersResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Remove a member from a group ```http DELETE https://api.{region}.pontive.com/v1/groups/{group_id}/members/{user_id} ``` Operation ID: `DeleteGroupMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | | `user_id` | string | yes | User ID | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## List a group's roles ```http GET https://api.{region}.pontive.com/v1/groups/{group_id}/roles ``` List the roles a group holds, per resource Operation ID: `ListGroupGrants` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListGroupGrantsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## Set a group's roles on a resource ```http PUT https://api.{region}.pontive.com/v1/groups/{group_id}/roles ``` Replace the roles a group holds on one resource — its organization, or a resource of it (resource_not_in_organization) — with roles of that resource's type. No roles removes the grant. Operation ID: `ReplaceGroupRoles` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | yes | Group ID | ### Request body (`application/json`, required): SetGroupRolesRequest Grant ### Responses - `200` OK: GroupGrant - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## List the groups holding roles on an organization ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/group-roles ``` The groups holding roles on an organization itself, each with its roles there (api-route-review D43). A group holding roles only on the organization's resources is not listed; the groups the organization owns are GET /groups?owner_type=org&owner_id=…. Operation ID: `ListOrganizationGroupRoles` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListGroupGrantsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## List the groups holding roles on a resource ```http GET https://api.{region}.pontive.com/v1/resources/{resource_id}/group-roles ``` The groups holding roles on a resource, whoever owns them, each with its roles there (api-route-review D43). The groups the resource owns are GET /groups?owner_type=&owner_id=…. Operation ID: `ListResourceGroupRoles` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListGroupGrantsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## List the groups holding roles on the instance root ```http GET https://api.{region}.pontive.com/v1/root/group-roles ``` The groups holding roles on the instance root, each with its roles there (api-route-review D43): the read edge from the other side of GET /groups/{group_id}/roles. The groups the root owns are GET /groups?owner_type=root. Operation ID: `ListRootGroupRoles` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListGroupGrantsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## Schemas ### ListGroupsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Group[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateOwnedGroupRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | | ExternalID is an identity provider's id for the group, unique in its owner. | | `metadata` | Metadata | | Metadata replaces the group's metadata when set. | | `name` | string | yes | | | `owner_id` | string | | OwnerID is the owner's prefixed id: org_ or res_; for root the inst_ id or empty. | | `owner_type` | string | | OwnerType is root (the default), org, or the owning resource's type key, which must be that resource's type. | ### Group | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `external_id` | string | | | | `id` | string | | | | `member_count` | integer | | | | `metadata` | Metadata | | Metadata replaces the group's metadata when set. | | `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: root, org, or the owning resource's type key. | | `updated_at` | string | | | ### UpdateGroupRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | | ExternalID, when set, replaces it; an empty string clears it. | | `metadata` | Metadata | | Metadata replaces the group's metadata when set. | | `name` | string | | | ### ListGroupMembersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | GroupMember[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### AddGroupMembersRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | string[] | yes | Each must be a member of the group's organization; an instance group takes any of the instance's users. | ### AddGroupMembersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `added` | integer | | How many were added; users already in the group are not counted. | ### ListGroupGrantsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | GroupGrant[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### SetGroupRolesRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | ResourceID is org_…, res_…, or for the root the instance id (inst_…) or the alias "root". | | `resource_type` | string | yes | | | `roles` | string[] | | | ### GroupGrant | Field | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | | | | `object` | string | | | | `resource_id` | string | | | | `resource_type` | string | | | | `roles` | 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. | ### Metadata Metadata replaces the group's metadata when set. Type: Record ### GroupMember | Field | Type | Required | Description | | --- | --- | --- | --- | | `group_id` | string | | | | `joined_at` | string | | | | `object` | string | | | | `user` | MemberUser | | | ### 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. | ### MemberUser | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `email_verified` | boolean | | | | `family_name` | string | | | | `given_name` | string | | | | `id` | string | | | | `name` | string | | | | `picture` | string | | | | `status` | string | | | | `username` | string | | | --- # Identity policy Source: https://www.pontive.com/docs/api-reference/management/identity-policy Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 identity policy ```http GET https://api.{region}.pontive.com/v1/authn/identity-policy ``` Get the instance's identity policy (email, phone, and username rules). If none has been configured, the default policy is returned. Operation ID: `GetIdentityPolicy` ### Responses - `200` OK: IdentityPolicy - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Update identity policy ```http PATCH https://api.{region}.pontive.com/v1/authn/identity-policy ``` Patch the instance's identity policy. Omitted sub-policies and fields are left unchanged. Operation ID: `UpdateIdentityPolicy` ### 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): UpdateIdentityPolicyRequest Update payload ### Responses - `200` OK: IdentityPolicy - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `500` Internal Server Error: ErrResponse ## Preview email rules ```http POST https://api.{region}.pontive.com/v1/authn/identity-policy/email/preview ``` Count the active users whose email the given rules would refuse at sign-in, were they enforced there (email.enforce_at_signin), with a count per rule. Changes nothing. Ask before turning enforcement on, or tightening a rule while it is on, to see who would be locked out. Operation ID: `PreviewEmailPolicy` ### Request body (`application/json`, required): PreviewEmailPolicyRequest Candidate email rules ### Responses - `200` OK: EmailPolicyPreview - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### IdentityPolicy | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `email` | EmailPolicy | | | | `object` | string | | | | `phone` | PhonePolicy | | | | `updated_at` | string | | | | `username` | UsernamePolicy | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### UpdateIdentityPolicyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | EmailPolicyUpdate | | | | `phone` | PhonePolicyUpdate | | | | `username` | UsernamePolicyUpdate | | | ### PreviewEmailPolicyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_disposable` | boolean | | | | `allow_plus_addressing` | boolean | | | | `domain_restriction` | DomainRestriction | | | ### EmailPolicyPreview | Field | Type | Required | Description | | --- | --- | --- | --- | | `affected_users` | integer | | AffectedUsers break at least one rule. | | `by_rule` | Record | | ByRule counts the users breaking each rule, by its code (email_domain_not_allowed, email_domain_blocked, email_plus_addressing_not_allowed, email_disposable_not_allowed). A user breaking two rules counts under both. | | `checked_users` | integer | | CheckedUsers are the active users with an email; all were checked. | | `object` | string | | | ### EmailPolicy | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_disposable` | boolean | | | | `allow_plus_addressing` | boolean | | | | `domain_restriction` | DomainRestriction | | | | `enforce_at_signin` | boolean | | EnforceAtSignIn also holds existing users to the rules at sign-in. Off by default. | ### PhonePolicy | Field | Type | Required | Description | | --- | --- | --- | --- | | `country_restriction` | CountryRestriction | | | | `require_verification_for_login` | boolean | | | ### UsernamePolicy | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_changes` | boolean | | | | `allowed_characters` | "alphanumeric" \| "alphanumeric_underscore" | | | | `change_cooldown_days` | integer | | | | `enabled` | boolean | | | | `max_length` | integer | | | | `min_length` | integer | | | | `reserved_usernames` | string[] | | | ### 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. | ### EmailPolicyUpdate | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_disposable` | boolean | | | | `allow_plus_addressing` | boolean | | | | `domain_restriction` | DomainRestriction | | | | `enforce_at_signin` | boolean | | | ### PhonePolicyUpdate | Field | Type | Required | Description | | --- | --- | --- | --- | | `country_restriction` | CountryRestriction | | | | `require_verification_for_login` | boolean | | | ### UsernamePolicyUpdate | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_changes` | boolean | | | | `allowed_characters` | "alphanumeric" \| "alphanumeric_underscore" | | | | `change_cooldown_days` | integer | | | | `clear_reserved_usernames` | boolean | | | | `enabled` | boolean | | | | `max_length` | integer | | | | `min_length` | integer | | | | `reserved_usernames` | string[] | | | ### DomainRestriction | Field | Type | Required | Description | | --- | --- | --- | --- | | `domains` | string[] | | | | `mode` | "none" \| "allow" \| "block" | | | ### CountryRestriction | Field | Type | Required | Description | | --- | --- | --- | --- | | `countries` | string[] | | | | `mode` | "none" \| "allow" \| "block" | | | ### 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. | --- # Localization Source: https://www.pontive.com/docs/api-reference/management/localization Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 localization settings ```http GET https://api.{region}.pontive.com/v1/branding/localization ``` Returns the instance's locale configuration. An instance that has never configured localization gets defaults rather than a 404. `enabled_locales` is what the OIDC discovery document advertises as `ui_locales_supported`. Operation ID: `GetLocalizationSettings` ### Responses - `200` OK: LocalizationSettings - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Update localization settings ```http PATCH https://api.{region}.pontive.com/v1/branding/localization ``` Partial update of the instance's locale configuration. Omitted fields are unchanged. The default locale is implicitly enabled and is never stored in `enabled_locales`. Operation ID: `UpdateLocalizationSettings` ### 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): UpdateLocalizationSettingsRequest Update Localization Settings Request ### Responses - `200` OK: LocalizationSettings - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` instance_unclaimed: the instance is unclaimed; claim this instance to change its localization (pontive-spec 47): ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### LocalizationSettings | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `default_locale` | string | | DefaultLocale is what locale negotiation falls back to, and the locale the widget markup itself is authored in. | | `enabled_locales` | string[] | | EnabledLocales excludes the default, which is implicitly enabled. This is what the OIDC discovery document's `ui_locales_supported` advertises — a public conformance claim, so it describes what the project can actually render rather than a fixed list. | | `object` | string | | | | `updated_at` | string | | | | `updated_by` | string | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### UpdateLocalizationSettingsRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `default_locale` | string | | | | `enabled_locales` | string[] | | A pointer so that an explicit empty array ("disable every extra locale") is distinguishable from omitting the field. | ### 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. | ### 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. | --- # Me Source: https://www.pontive.com/docs/api-reference/management/me Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 current user ```http GET https://{auth_domain}/v1/me ``` Get the currently authenticated user's profile An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:read; the app's own access token is refused 403 (D48). Operation ID: `GetCurrentUser` ### Responses - `200` OK: CurrentUser - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Update current user ```http PATCH https://{auth_domain}/v1/me ``` Update the currently authenticated user's profile (partial update) An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the app's own access token is refused 403 (D48). Operation ID: `UpdateCurrentUser` ### Request body (`application/json`, required): UpdateCurrentUserRequest Update User Request ### Responses - `200` OK: CurrentUser - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete current user ```http DELETE https://{auth_domain}/v1/me ``` Delete the currently authenticated user An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the app's own access token is refused 403 (D48). Operation ID: `DeleteCurrentUser` ### Responses - `204` User deleted successfully - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## List my delegations ```http GET https://{auth_domain}/v1/me/delegations ``` The signed-in user's own delegation grants (D31): which agents they let act for them, in which organization, with which scopes and until when. Filter by agent_id or organization_id. Needs no permission: identity-svc answers a user for their own grants. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:read; the app's own access token is refused 403 (D48). Operation ID: `ListMyDelegations` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | The agent delegated to (agt_) | | `organization_id` | string | | The organization the grant is bounded to | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListDelegationsResponse - `401` Unauthorized: ErrResponse - `500` Internal Server Error: ErrResponse ## Revoke my delegation ```http DELETE https://{auth_domain}/v1/me/delegations/{delegation_id} ``` The signed-in user revokes one of their own delegation grants (D31): the agent's next exchange on it is refused, and a token it already exchanged stops being answered on Pontive's checks and listings at once. Another user's grant is 404, the same as none. A token acting for the user (an agent's) is refused (actor_refused): a delegation is the user's own to take back. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the app's own access token is refused 403 (D48). Operation ID: `DeleteMyDelegation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `delegation_id` | string | yes | Delegation ID (dlg_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` actor_refused: a token acting for the user cannot revoke: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List my memberships ```http GET https://{auth_domain}/v1/me/memberships ``` The signed-in user's own memberships across every container kind — the instance root, organizations and resources (D4, D31) — each left with POST /me/memberships/{container_id}/leave. resource_type narrows them to one kind of container (root, org or a custom type key, D44). Each carries its container's name and, when the caller may read the container, its external_id. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:read; the app's own access token is refused 403 (D48). Operation ID: `ListMyMemberships` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | | Only the memberships on containers of this type: root, org or a custom type key (D44) | | `organization_id` | string | | Only the memberships on this organization's resources, at any depth | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListUserMembershipsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Leave a membership ```http POST https://{auth_domain}/v1/me/memberships/{container_id}/leave ``` Remove the current (authenticated) user's own membership of a container (api-route-review D38): the prefixed id names it — an organization (org_), or a resource (res_) whose type lets members leave. Refused 403 leave_disabled when the organization's settings or the resource's type do not let members leave. An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:me:manage; the app's own access token is refused 403 (D48). Operation ID: `LeaveMembership` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `container_id` | string | yes | The organization (org_) or resource (res_) left | ### Responses - `200` LeaveOrganizationResponse or LeaveResourceResponse: object - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Schemas ### CurrentUser | Field | Type | Required | Description | | --- | --- | --- | --- | | `address` | Address | | | | `birthdate` | string | | | | `created_at` | string | | | | `email` | string | | | | `email_verified` | boolean | | | | `external_id` | string | | ExternalID is your own id for this user, unique per project environment; the access-token claims template reads it as user.external_id. | | `family_name` | string | | | | `gender` | string | | | | `given_name` | string | | | | `id` | string | | | | `instance_id` | string | | | | `legacy_identities` | LegacyIdentity[] | | LegacyIdentities are the user's ids in the systems they were imported from. Read-only. | | `locale` | string | | | | `metadata` | Metadata | | | | `middle_name` | string | | | | `name` | string | | | | `nickname` | string | | | | `object` | string | | | | `password_change_required` | boolean | | | | `password_status` | "none" \| "active" \| "imported" | | PasswordStatus is none, active (a password set in Pontive) or imported (a hash imported from another system, replaced at the user's first sign-in; pontive-spec 46 §4.6). Read-only. | | `phone` | string | | | | `phone_verified` | boolean | | | | `picture` | string | | | | `private_metadata` | Metadata | | | | `profile` | string | | | | `status` | "active" \| "deleted" \| "deactivated" | | | | `updated_at` | string | | | | `username` | string | | | | `website` | string | | | | `zoneinfo` | string | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### UpdateCurrentUserRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `family_name` | string | | | | `given_name` | string | | | | `metadata` | Record | | | | `name` | string | | | | `picture` | string | | | ### ListDelegationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Delegation[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ListUserMembershipsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | UserMembership[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### Address | Field | Type | Required | Description | | --- | --- | --- | --- | | `country` | string | | | | `formatted` | string | | | | `locality` | string | | | | `postal_code` | string | | | | `region` | string | | | | `street_address` | string | | | ### LegacyIdentity | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `migration_source_id` | string | | | | `subject` | string | | | ### Metadata Type: Record ### 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. | ### Delegation | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_id` | string | | | | `created_at` | string | | | | `created_by` | Actor | | CreatedBy is who created the grant, or last replaced it. | | `expires_at` | string | | | | `id` | string | | | | `instance_id` | string | | | | `last_used_at` | string | | | | `object` | string | | | | `organization_id` | string | | OrganizationID is the organization the agent may act for the user in; empty for the instance root. | | `scopes` | string[] | | | | `updated_at` | string | | | | `user_id` | string | | UserID is the delegator. | ### 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. | ### UserMembership | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `instance_id` | string | | | | `joined_at` | string | | | | `last_active_at` | string | | | | `object` | string | | | | `resource_external_id` | string | | ResourceExternalID is the container's external_id, the caller's own id for the organization or resource, when it has one. | | `resource_id` | string | | | | `resource_name` | string | | | | `resource_type` | string | | | | `roles` | RoleRef[] | | | | `updated_at` | string | | | | `user_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. | ### Actor CreatedBy is who created the grant, or last replaced it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `name` | string | | | | `type` | string | | | ### RoleRef | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | string | | | | `name` | string | | | --- # Migration sources Source: https://www.pontive.com/docs/api-reference/management/migration-sources Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 migration sources ```http GET https://api.{region}.pontive.com/v1/authn/migration-sources ``` The instance's migration sources, newest first. Needs sys:migration:read on the instance root, held by the instance's owners and admins only. Operation ID: `ListMigrationSources` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: ListMigrationSourcesResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create migration source ```http POST https://api.{region}.pontive.com/v1/authn/migration-sources ``` Register a system the instance's users are leaving (pontive-spec 46 §3): its name, its source_type (which picks defaults and the guide, and decides nothing on its own), and the parameters its password hashes need. A Firebase project's hashes need hash_config.firebase_scrypt: the signer key (base64, write-only: answered as a four-character preview), the salt separator (base64), rounds and mem_cost (1 to 16), from the Firebase console's password hash parameters. A source owns the legacy identities its imports write, by which a re-sent row matches the user it created. At most 10 per instance. Needs sys:migration:manage on the instance root, held by the instance's owners and admins only and never by a token acting for a user. Operation ID: `CreateMigrationSource` ### Request body (`application/json`, required): CreateMigrationSourceRequest Source ### Responses - `201` Created: MigrationSource - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` actor_refused: a token acting for a user cannot configure a migration source: ErrResponse - `409` migration_source_limit: ErrResponse - `500` Internal Server Error: ErrResponse ## Get migration source ```http GET https://api.{region}.pontive.com/v1/authn/migration-sources/{migration_source_id} ``` The source, its signer key as a preview, and imported_passwords: how many users still sign in with a hash that needs it. Needs sys:migration:read on the instance root. Operation ID: `GetMigrationSource` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `migration_source_id` | string | yes | Migration source ID (msrc_) | ### Responses - `200` OK: MigrationSource - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` migration_source_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update migration source ```http PATCH https://api.{region}.pontive.com/v1/authn/migration-sources/{migration_source_id} ``` Change the name, or replace hash_config whole: an omitted signer_key keeps the stored one, and {"firebase_scrypt": null} removes Firebase's parameters, refused migration_source_in_use while imported hashes still need them. Needs sys:migration:manage on the instance root. Operation ID: `UpdateMigrationSource` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `migration_source_id` | string | yes | Migration source ID (msrc_) | ### Request body (`application/json`, required): UpdateMigrationSourceRequest Changes ### Responses - `200` OK: MigrationSource - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` migration_source_not_found: ErrResponse - `409` migration_source_in_use: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete migration source ```http DELETE https://api.{region}.pontive.com/v1/authn/migration-sources/{migration_source_id} ``` Delete the source with the legacy identities its imports wrote; runs keep their records. Refused migration_source_in_use while imported hashes still need its parameters. Needs sys:migration:manage on the instance root. Operation ID: `DeleteMigrationSource` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `migration_source_id` | string | yes | Migration source ID (msrc_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` migration_source_not_found: ErrResponse - `409` migration_source_in_use: ErrResponse - `500` Internal Server Error: ErrResponse ## Validate migration source ```http POST https://api.{region}.pontive.com/v1/authn/migration-sources/{migration_source_id}/validate ``` Report problems without changing anything: whether the source has the parameters its type needs and, given firebase_scrypt_sample (a known Firebase user's password, password hash and salt), whether its Firebase parameters verify that user. Needs sys:migration:manage on the instance root. Operation ID: `ValidateMigrationSource` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `migration_source_id` | string | yes | Migration source ID (msrc_) | ### Request body (`application/json`): ValidateMigrationSourceRequest Sample ### Responses - `200` OK: MigrationSourceValidation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` migration_source_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListMigrationSourcesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | MigrationSource[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateMigrationSourceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `hash_config` | HashConfig | | | | `name` | string | | | | `source_type` | "auth0" \| "clerk" \| "supabase" \| "lovable_cloud" \| "firebase" \| "cognito" \| "nextauth" \| "better_auth" \| "replit_auth" \| "other" | | | ### MigrationSource | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `hash_config` | HashConfig | | | | `id` | string | | | | `imported_passwords` | integer | | ImportedPasswords counts the users whose imported hash still needs this source: they have not signed in since. | | `name` | string | | | | `object` | string | | | | `source_type` | "auth0" \| "clerk" \| "supabase" \| "lovable_cloud" \| "firebase" \| "cognito" \| "nextauth" \| "better_auth" \| "replit_auth" \| "other" | | | | `updated_at` | string | | | ### UpdateMigrationSourceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `hash_config` | HashConfig | | | | `name` | string | | | ### ValidateMigrationSourceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `firebase_scrypt_sample` | FirebaseScryptSample | | | ### MigrationSourceValidation | Field | Type | Required | Description | | --- | --- | --- | --- | | `checks` | MigrationSourceCheck[] | | | | `object` | 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. | ### HashConfig | Field | Type | Required | Description | | --- | --- | --- | --- | | `firebase_scrypt` | FirebaseScrypt | | FirebaseScrypt is null when the source has none. | ### FirebaseScryptSample | Field | Type | Required | Description | | --- | --- | --- | --- | | `hash` | string | | | | `password` | string | | | | `salt` | string | | | ### MigrationSourceCheck | Field | Type | Required | Description | | --- | --- | --- | --- | | `check` | string | | | | `detail` | string | | | | `status` | "ok" \| "failed" | | | ### 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. | ### FirebaseScrypt FirebaseScrypt is null when the source has none. | Field | Type | Required | Description | | --- | --- | --- | --- | | `mem_cost` | integer | | MemCost is 1 to 16. | | `rounds` | integer | | Rounds is 1 to 16. | | `salt_separator` | string | | SaltSeparator is base64. | | `signer_key` | string | | SignerKey is the base64 signer key. Write-only: never answered. | | `signer_key_preview` | string | | SignerKeyPreview is the signer key's last four characters, answered instead of it. | --- # OAuth providers Source: https://www.pontive.com/docs/api-reference/management/oauth-providers Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 OAuth providers ```http GET https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections ``` List an app's configured OAuth providers merged with the catalog. The pagination block counts connected (stored) providers only; data additionally includes unconnected catalog entries, so the number of items may exceed limit. Operation ID: `ListAuthConnections` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | yes | App ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | "connected" \| "available" \| "all" | | Filter: connected (stored configs only), available (unconnected catalog types only), or all (default) | | `sort` | string | | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, provider. Default: -created_at | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListOAuthProvidersResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get OAuth provider ```http GET https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections/{connection_slug} ``` Get an app's provider by slug. Returns the resolved view; an unconnected catalog provider is returned with connected=false and no config. Operation ID: `GetAuthConnection` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | yes | App ID | | `connection_slug` | string | yes | Provider slug | ### Responses - `200` OK: OAuthProvider - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete OAuth connection ```http DELETE https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections/{connection_slug} ``` Delete an app's OAuth connection by provider slug. This also drops all stored user OAuth credentials for that provider on this app; users must re-connect if it is recreated. Operation ID: `DeleteAuthConnection` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | yes | App ID | | `connection_slug` | string | yes | Provider slug | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Upsert OAuth connection ```http PUT https://api.{region}.pontive.com/v1/apps/{app_id}/auth-connections/{connection_slug} ``` Create or update an app's OAuth connection for the provider slug (unique per app). If no connection exists yet it is created (201); otherwise it is updated (200). Omitted fields are left unchanged on update, and an omitted secret leaves the stored secret intact. Secrets are accepted here but never returned; responses expose only *_set booleans. Operation ID: `ReplaceAuthConnection` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | yes | App ID | | `connection_slug` | string | yes | Provider slug | ### Request body (`application/json`, required): CreateOAuthConnectionRequest OAuth connection payload ### Responses - `200` OK: OAuthConnection - `201` Created: OAuthConnection - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Includes instance_unclaimed: a generic OIDC connection (provider_type oidc) on an unclaimed instance; claim it first (pontive-spec 47): ErrResponse - `500` Internal Server Error: ErrResponse ## List provider catalog ```http GET https://api.{region}.pontive.com/v1/authn/connection-types ``` List the platform's supported OAuth provider types and their metadata (scopes, Pontive Credentials availability, deprecation), independent of any app. Carries no credentials. The list is unpaginated. Operation ID: `ListAuthConnectionTypes` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: ListProviderCatalogResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListOAuthProvidersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | OAuthProviderListItem[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### OAuthProvider | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `callback_urls` | string[] | | CallbackURLs are the redirect_uris this provider's login flow uses — one per auth-server domain the project serves. Register every one in the provider's own console or logins on an unregistered domain fail with redirect_uri_mismatch. They are an auth-server property, identical for every provider and set even before one is connected. | | `config` | GoogleConfigView \| LinkedInConfigView \| MicrosoftConfigView \| EntraConfigView \| OIDCConfigView \| GitHubConfigView \| AppleConfigView | | | | `connect_scopes` | string[] | | ConnectScopes are requested in this app's connect (connected-accounts) flow. | | `connected` | boolean | | | | `created_at` | string | | | | `credential_source` | "own" \| "shared" \| "pontive" | | CredentialSource selects where the client credentials come from: 'own' (in config), 'shared' (shared_credential_id), or 'pontive' (Pontive Credentials). | | `deprecated` | boolean | | | | `multi_instance` | boolean | | | | `name` | string | | | | `object` | string | | | | `pontive_credentials_available` | boolean | | | | `provider` | string | | | | `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" | | | | `required_scopes` | string[] | | | | `scope_descriptions` | Record | | | | `shared_credential_id` | string | | | | `signin_scopes` | string[] | | SigninScopes are the identity scopes requested at sign-in, on top of the provider type's catalog-required scopes. | | `update_user_profile` | boolean | | | | `updated_at` | string | | | | `use_for_signin` | boolean | | UseForSignin reports whether this connection may serve as a sign-in method. | ### CreateOAuthConnectionRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `config` | GoogleConfig \| LinkedInConfig \| MicrosoftConfig \| EntraConfig \| OIDCConfig \| GitHubConfig \| AppleConfig | | | | `connect_scopes` | string[] | | ConnectScopes are requested in this app's connect (connected-accounts) flow. | | `credential_source` | "own" \| "shared" \| "pontive" | | CredentialSource selects where the client credentials come from: 'own' (in config, the default), 'shared' (shared_credential_id), or 'pontive' (Pontive Credentials). Config is required only for 'own'. | | `name` | string | | | | `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" | yes | | | `shared_credential_id` | string | | | | `signin_scopes` | string[] | | SigninScopes are the identity scopes requested at sign-in, on top of the provider type's catalog-required scopes. | | `update_user_profile` | boolean | | | | `use_for_signin` | boolean | | UseForSignin allows this connection to serve as a sign-in method. | ### OAuthConnection | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `config` | GoogleConfigView \| LinkedInConfigView \| MicrosoftConfigView \| EntraConfigView \| OIDCConfigView \| GitHubConfigView \| AppleConfigView | | | | `connect_scopes` | string[] | | ConnectScopes are requested in this app's connect (connected-accounts) flow. | | `created_at` | string | | | | `credential_source` | "own" \| "shared" \| "pontive" | | CredentialSource selects where the client credentials come from: 'own' (in config), 'shared' (shared_credential_id), or 'pontive' (Pontive Credentials). | | `instance_id` | string | | | | `name` | string | | | | `object` | string | | | | `provider` | string | | | | `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" | | | | `shared_credential_id` | string | | | | `signin_scopes` | string[] | | SigninScopes are the identity scopes requested at sign-in, on top of the provider type's catalog-required scopes. | | `update_user_profile` | boolean | | | | `updated_at` | string | | | | `use_for_signin` | boolean | | UseForSignin reports whether this connection may serve as a sign-in method. | ### ListProviderCatalogResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | ProviderCatalogEntry[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### OAuthProviderListItem | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `connect_scopes` | string[] | | | | `connected` | boolean | | | | `created_at` | string | | | | `credential_source` | "own" \| "shared" \| "pontive" | | CredentialSource: 'own' \| 'shared' \| 'pontive'. | | `deprecated` | boolean | | | | `multi_instance` | boolean | | | | `name` | string | | | | `object` | string | | | | `pontive_credentials_available` | boolean | | | | `provider` | string | | | | `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" | | | | `required_scopes` | string[] | | | | `scope_descriptions` | Record | | | | `shared_credential_id` | string | | | | `signin_scopes` | string[] | | | | `update_user_profile` | boolean | | | | `updated_at` | string | | | | `use_for_signin` | 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. | ### 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 | | | | `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 | | | ### 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 | | | | `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 | | | ### ProviderCatalogEntry | Field | Type | Required | Description | | --- | --- | --- | --- | | `deprecated` | boolean | | | | `multi_instance` | boolean | | | | `object` | string | | | | `pontive_credentials_available` | boolean | | | | `provider_type` | "google" \| "github" \| "microsoft" \| "linkedin" \| "apple" \| "oidc" \| "entra" | | | | `required_scopes` | string[] | | | | `scope_descriptions` | Record | | | ### 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 | | | --- # Organizations Source: https://www.pontive.com/docs/api-reference/management/organizations Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 organizations ```http GET https://api.{region}.pontive.com/v1/organizations ``` Retrieve a paginated list of organizations. Filter by status, external_id, and search query. Operation ID: `ListOrganizations` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | | Filter by the organization's own status (active, suspended) | | `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, slug, status. Default: -created_at | | `search` | string | | Search query | | `external_id` | string | | Exact match on the id the caller gave the organization | | `slug` | string | | Exact match on the slug: finds an organization by it (D17) | ### Responses - `200` OK: ListOrganizationsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create organization ```http POST https://api.{region}.pontive.com/v1/organizations ``` Create a new organization. Organizations are the customer-facing tenant, and flat: structure below one is modelled as resources that belong to it. The slug (supplied, or generated from the name) is immutable once created; one another organization in the instance holds is refused with 409 slug_conflict, never suffixed. Operation ID: `CreateOrganization` ### Request body (`application/json`, required): CreateOrganizationRequest Organization creation details ### Responses - `201` Created: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse ## Get organization by external id ```http GET https://api.{region}.pontive.com/v1/organizations/external_id/{external_id} ``` Retrieve the organization the caller gave this external id when creating or updating it: an exact match on the instance-unique external_id. Answers the organization or 404. Percent-encode the value. Operation ID: `GetOrganizationByExternalId` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | yes | The id the caller gave the organization | ### Responses - `200` OK: Organization - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Get organization settings ```http GET https://api.{region}.pontive.com/v1/organizations/settings ``` The instance-wide policy that applies to every organization: whether members may leave, the roles given on joining, and how long an invitation stays open Operation ID: `GetOrganizationSettings` ### Responses - `200` OK: OrganizationSettingsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Update organization settings ```http PATCH https://api.{region}.pontive.com/v1/organizations/settings ``` Change the instance-wide organization policy. Omitted fields are left as they are Operation ID: `UpdateOrganizationSettings` ### 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): UpdateOrganizationSettingsRequest Fields to change ### Responses - `200` OK: OrganizationSettingsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `500` Internal Server Error: ErrResponse ## Get organization ```http GET https://api.{region}.pontive.com/v1/organizations/{organization} ``` Retrieve one organization by its id or its slug. A value in the id form (org_ and 26 base32 characters) is read as the id; anything else as the slug, which needs sys:org:read to resolve. Every route under /organizations/{organization} takes either. Operation ID: `GetOrganization` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Responses - `200` OK: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update organization ```http PATCH https://api.{region}.pontive.com/v1/organizations/{organization} ``` Partially update an organization. Only provided fields are changed. The slug is immutable after creation and cannot be updated. Operation ID: `UpdateOrganization` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`, required): UpdateOrganizationRequest Fields to update ### Responses - `200` OK: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete organization ```http DELETE https://api.{region}.pontive.com/v1/organizations/{organization} ``` Permanently delete an organization together with its memberships, invitations, owned service accounts, instance-scoped roles and organization-scoped credentials (revoked), and the resources that belong to it. There is no restore. Operation ID: `DeleteOrganization` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List assignable roles ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/assignable-roles ``` List the roles a member of the organization can be given, each marked with whether the caller may grant or remove it on a member other than themselves (assignable_by_caller) and whether doing so hands the organization over, which needs sys:org:transfer (requires_transfer). Decided on sys:member:read on the organization, so an organization's own administrators can read it; the roles of the org resource type, and the organization's own. Not paginated. Operation ID: `ListAssignableRoles` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: ListAssignableRolesResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List invitations ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/invitations ``` Get a list of invitations for an organization with pagination and filtering Operation ID: `ListOrganizationInvitations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | Filter by invitation roles | | `invitee_emails` | string[] | | Filter by invitees email | | `invited_by` | string | | Filter by inviter user ID | | `resource_id` | string | | Only the invitations to this resource | | `page` | integer | | Page number | | `limit` | integer | | Items per page | | `search` | string | | Search by invitation email or invitee email | | `sort` | string | | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, expires_at, last_sent_at, status. Default: -created_at | ### Responses - `200` OK: ListInvitationsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Invite members ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/invitations ``` Invite multiple members to an organization, or to one of its resources (resource_id with resource_roles). Invitees to a resource who are not organization members join the organization too. Addresses are matched case-insensitively. An address that is already a member of the target is skipped and listed in skipped rather than failing the request. An address that already holds a pending, unexpired invitation to the target has that invitation reissued with this request's roles, a fresh expiry and a new link, instead of a second one sent. Inviting someone as the organization's owner needs sys:org:transfer, refused 403 owner_transfer_required. 200 when every address was skipped, 201 when any invitation was sent. Operation ID: `CreateOrganizationInvitations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`, required): InviteMembersRequest Invite members payload ### Responses - `200` OK: InvitationResult - `201` Created: InvitationResult - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get invitation ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/invitations/{invitation_id} ``` Get invitation by ID Operation ID: `GetOrganizationInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invitation_id` | string | yes | Invitation ID | | `organization` | string | yes | The organization's id, or its slug | ### Responses - `200` OK: Invitation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Delete invitation ```http DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/invitations/{invitation_id} ``` Withdraw an invitation: it is deleted, and its link stops working. An invitation exists only while it is open — accepting one deletes it too, and an expired one is purged. Operation ID: `DeleteOrganizationInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invitation_id` | string | yes | Invitation ID | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `notify_invitee` | boolean | | Email the invitee that the invitation was withdrawn | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Resend invitation ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/invitations/{invitation_id}/resend ``` Resend an invitation Operation ID: `ResendOrganizationInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invitation_id` | string | yes | Invitation ID | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`, required): ResendInvitationRequest Resend Invitation payload ### Responses - `200` OK: Invitation - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Remove a member limit ```http DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/member-limits/{source} ``` Remove one source's member limit from an organization. The lowest limit left, if any, is then in force. Removing a limit that is not set changes nothing and succeeds. While the instance's billing capability is on, the billing limit is managed by billing: removing it here is refused with 403, an instance admin included. With the capability off, an instance admin may remove it. If the capability cannot be read, a billing write is refused with 503. Operation ID: `DeleteOrganizationMemberLimit` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `source` | "manual" \| "billing" | yes | Who set the limit | ### Responses - `200` OK: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Set a member limit ```http PUT https://api.{region}.pontive.com/v1/organizations/{organization}/member-limits/{source} ``` Set one source's member limit on an organization, 0 or more. source is manual (an instance admin or the client's backend) or billing (Pontive billing). While the instance's billing capability is on, the billing limit is managed by billing: setting it here is refused with 403, an instance admin included, and a manual limit may still be set, since the lowest limit wins. With the capability off, an instance admin may set it. If the capability cannot be read, a billing write is refused with 503. The lowest limit set is in force, as member_limit. A write that would add a member past it is refused with 409 seat_limit_reached. Lowering a limit below the current number of members blocks new members and removes no one. Pontive billing does not call this route: it writes its limit to identity-svc over gRPC with its system credential. Operation ID: `ReplaceOrganizationMemberLimit` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `source` | "manual" \| "billing" | yes | Who sets the limit | ### Request body (`application/json`, required): SetMemberLimitRequest The limit ### Responses - `200` OK: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## List organization members ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/members ``` List members of an organization with pagination and filtering Operation ID: `ListOrganizationMembers` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | string[] | | Filter by user IDs | | `emails` | string[] | | Filter by emails | | `roles` | string[] | | Filter by roles | | `search` | string | | search query | | `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, joined_at, email. Default: -created_at | ### Responses - `200` OK: ListMembersResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Add member to organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/members ``` Add a user as a member of an organization. Adding them as owner needs sys:org:transfer, refused 403 owner_transfer_required. Adding one past the organization's member limit is refused 409 seat_limit_reached, and nothing is written. Operation ID: `CreateOrganizationMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`, required): AddOrganizationMemberRequest Add member payload ### Responses - `201` Created: Member - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse ## Get organization member ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/members/{user_id} ``` Get an organization member by user ID Operation ID: `GetOrganizationMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `user_id` | string | yes | User ID | ### Responses - `200` OK: Member - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update organization member roles ```http PATCH https://api.{region}.pontive.com/v1/organizations/{organization}/members/{user_id} ``` Replace an organization member's roles. Granting or removing owner needs sys:org:transfer, refused 403 owner_transfer_required. A caller from the instance itself (not the Pontive console) may add or remove only roles whose permissions they hold on the organization, or hold sys:root:grant, refused 403 role_ceiling, and cannot change their own roles, refused 403 self_role_change. Roles that changed while the change was being decided are refused 409 member_roles_changed: read the member again and retry. Operation ID: `UpdateOrganizationMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `user_id` | string | yes | User ID | ### Request body (`application/json`, required): UpdateMemberRolesRequest Update member roles payload ### Responses - `200` OK: Member - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse ## Remove member from organization ```http DELETE https://api.{region}.pontive.com/v1/organizations/{organization}/members/{user_id} ``` Remove a user from an organization, which removes every role they hold there. Removing oneself is leaving: when the organization settings do not let members leave (allow_members_to_leave off), it is refused 403 leave_disabled, as leaving it with POST /me/memberships/{container_id}/leave is, before any rule below; removing someone else is not affected. Removing a member who holds owner needs sys:org:transfer, removing oneself included, refused 403 owner_transfer_required. A caller from the instance itself (not the Pontive console) may remove only a member whose roles' permissions they hold on the organization, or hold sys:root:grant, refused 403 role_ceiling. Roles that changed while the removal was being decided are refused 409 member_roles_changed: read the member again and retry. Operation ID: `DeleteOrganizationMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `user_id` | string | yes | User ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse ## Reactivate organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/resume ``` Remove one suspension reason from an organization, and no other. The reason is admin when the body is absent or names none. The organization is active again, with access to the resources parented under it, once it holds no reason; while it holds another it stays suspended. Removing a reason it does not hold changes nothing and succeeds. A reactivate that names no reason removes admin only, never billing. While the instance's billing capability is on, the billing reason is managed by billing: adding or removing it here is refused with 403, an instance admin included, so only billing lifts a billing suspension. With the capability off, an instance admin may add or remove it. If the capability cannot be read, a billing write is refused with 503. Operation ID: `ResumeOrganization` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`): ReactivateOrganizationRequest The reason to remove; admin when omitted ### Responses - `200` OK: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Suspend organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/suspend ``` Add a suspension reason to an organization. It is suspended while it holds any reason, and access to it and to every resource parented under it is denied. The reason is admin when the body is absent or names none. billing is Pontive billing's own reason. closed says the organization's owners closed their account and the client may reopen it: Pontive billing keeps its owner able to pay its invoices and manage its payment method while it is held. While the instance's billing capability is on, the billing reason is managed by billing: adding or removing it here is refused with 403, an instance admin included, so only billing lifts a billing suspension. With the capability off, an instance admin may add or remove it. If the capability cannot be read, a billing write is refused with 503. Adding a reason the organization already holds changes nothing and succeeds. Pontive billing does not call this route: it writes the billing reason to identity-svc over gRPC with its system credential. Operation ID: `SuspendOrganization` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`): SuspendOrganizationRequest The reason to add; admin when omitted ### Responses - `200` OK: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Transfer organization ownership ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/transfer-ownership ``` Transfer ownership of an organization to another user. Operation ID: `TransferOwnership` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Request body (`application/json`, required): TransferOwnershipRequest New owner ### Responses - `200` OK: Organization - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListOrganizationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Organization[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateOrganizationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | | | | `metadata` | Metadata | | | | `name` | string | yes | | | `owners` | string[] | | Owners hold the `owner` role from the start, each made a member with it. At least one is required; an organization always keeps one. | | `slug` | string | | Slug is set once, here, and is immutable afterwards. Generated from the name when omitted. Unique within the instance; released on delete. | ### Organization | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `external_id` | string | | | | `id` | string | | | | `instance_id` | string | | | | `member_count` | integer | | | | `member_limit` | integer | | MemberLimit is the limit in force: the lowest of member_limits, or null when none is set (pontive-spec 09, Member limits). | | `member_limits` | MemberLimits | | MemberLimits are the member limits set on the organization, by source. | | `metadata` | Metadata | | | | `name` | string | | | | `object` | string | | | | `slug` | string | | | | `status` | "active" \| "suspended" | | Status is the organization's status. Suspending it also suspends access to every resource parented under it. | | `suspended_at` | string | | | | `suspension_reasons` | string[] | | SuspensionReasons is why the organization is suspended: admin, billing, closed, or several. It is suspended while this is not empty, and the list is empty while it is active (pontive-spec 09, Suspension reasons). | | `updated_at` | string | | | ### OrganizationSettingsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `settings` | OrganizationSettings | | | ### UpdateOrganizationSettingsRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_members_to_leave` | boolean | | | | `invitation_expiry_days` | integer | | | | `roles_on_join` | string[] | | RolesOnJoin replaces the roles given on joining; omitted leaves them. | ### UpdateOrganizationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | | | | `metadata` | Metadata | | | | `name` | string | | | ### ListAssignableRolesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | AssignableRole[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ListInvitationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Invitation[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### InviteMembersRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | AppID is the application this invitation is for: whose sign-in domain the link points at, whose branding and flows the invitee sees while accepting, and whose initiate_login_uri they land on once they have. It must admit the organization. Optional when exactly one active app of the instance admits it; required when several do. | | `emails` | string[] | yes | | | `message` | string | | | | `resource_id` | string | | ResourceID is a resource of the organization the invitees also join, with ResourceRoles (roles of the resource's type, at least one). An organization member can be invited to one of its resources. | | `resource_roles` | string[] | | | | `roles` | string[] | | Roles are the organization roles. Optional: with none, the invitee joins the organization with the membership settings' roles_on_join (none by default, a membership holding no role). | ### InvitationResult | Field | Type | Required | Description | | --- | --- | --- | --- | | `invitations` | Invitation[] | | Invitations are the invitations sent: new ones, and live ones an address already held to the same target, reissued with this request's roles and a new link (resend_count > 0) — the earlier link stops working. | | `object` | string | | | | `organization_id` | string | | OrganizationID is the organization invited into; absent for an invitation to the instance. | | `skipped` | SkippedInvitee[] | | Skipped are the addresses that got no invitation, and why. Skipping is not an error: a request whose every address was skipped still succeeds. | ### Invitation | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `expires_at` | string | | | | `id` | string | | | | `invited_by` | InvitedBy | | InvitedBy is the user of the instance who sent it. Absent when a service account or a Pontive operator (from the dashboard) sent it. | | `invitee_email` | string | | | | `last_sent_at` | string | | | | `message` | string | | | | `object` | string | | | | `organization_id` | string | | OrganizationID is the organization the invitee joins; absent for an invitation to the instance alone. | | `resend_count` | integer | | | | `resource_id` | string | | ResourceID is the resource of the organization the invitation also grants membership of, with ResourceRoles; absent for an invitation to the organization alone. | | `resource_roles` | RoleRef[] | | | | `resource_type` | string | | | | `roles` | RoleRef[] | | | | `updated_at` | string | | | ### ResendInvitationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `message` | string | | | | `new_expire_at` | string | | | ### SetMemberLimitRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | yes | Limit is the most members the organization may have, 0 or more. | ### ListMembersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Member[] | | List of members | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### AddOrganizationMemberRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | yes | | | `user_id` | string | yes | | ### Member | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `instance_id` | string | | | | `joined_at` | string | | | | `last_active_at` | string | | | | `object` | string | | | | `resource_id` | string | | | | `resource_name` | string | | | | `resource_type` | string | | | | `roles` | RoleRef[] | | | | `updated_at` | string | | | | `user` | MemberUser | | | ### UpdateMemberRolesRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | | ### ReactivateOrganizationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `reason` | "admin" \| "billing" \| "closed" | | Reason is the suspension reason to remove: admin (the default), billing or closed. The organization stays suspended while it holds another. While the instance's billing capability is on, only billing removes billing. | ### SuspendOrganizationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `reason` | "admin" \| "billing" \| "closed" | | Reason is the suspension reason to add: admin (the default), billing or closed. billing is Pontive billing's own: while the instance's billing capability is on, only billing adds it; with it off, an instance admin may too. closed says the organization's owners closed their account and the client may reopen it: Pontive billing keeps its owner able to pay its invoices and manage its payment method meanwhile. | ### TransferOwnershipRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `new_owner_id` | string | | | | `previous_owner_id` | string | | The member giving `owner` up. Defaults to the caller when the caller is a user; required when a service calls on someone's behalf. | | `retain_as` | string[] | | The roles the previous owner keeps; none when omitted. | ### 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 ### MemberLimits MemberLimits are the member limits set on the organization, by source. | Field | Type | Required | Description | | --- | --- | --- | --- | | `billing` | integer | | Billing is set by Pontive billing from the max of a members subscription. While the instance's billing capability is on, only billing sets it. | | `manual` | integer | | Manual is set by an instance admin or the client's backend. | ### OrganizationSettings | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_members_to_leave` | boolean | | AllowMembersToLeave lets a member leave an organization on their own. Off, only someone else removes a member: POST /me/memberships/{container_id}/leave on an organization, and a member removing themselves through DELETE /organizations/{org_id}/members/{user_id}, answer 403 leave_disabled. | | `instance_id` | string | | | | `invitation_expiry_days` | integer | | InvitationExpiryDays is how many days an invitation stays open, 1 to 365. Default 7. | | `object` | string | | | | `roles_on_join` | string[] | | RolesOnJoin are the organization roles a user is given when they join it without being given any: by joining one of its resources, or accepting an invitation that names none. Empty, the default, joins them holding no role. Never owner. | | `updated_at` | string | | | ### AssignableRole | Field | Type | Required | Description | | --- | --- | --- | --- | | `assignable_by_caller` | boolean | | AssignableByCaller: the caller may grant or remove it on a member other than themselves. | | `description` | string | | | | `key` | string | | Key identifies the role on the organization type. | | `name` | string | | | | `object` | string | | | | `organization_scoped` | boolean | | OrganizationScoped: the role is this organization's own, not one of the instance's organization roles. | | `requires_transfer` | boolean | | RequiresTransfer: granting or removing it hands the organization over, which needs sys:org:transfer (the owner role). | ### SkippedInvitee | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `reason` | "already_member" \| "already_registered" | | Reason is already_member: a member of the target already (an invite does not change a member's roles); or, for an invitation to the instance, already_registered: the address already has an account. | ### InvitedBy InvitedBy is the user of the instance who sent it. Absent when a service account or a Pontive operator (from the dashboard) sent it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `name` | string | | | ### RoleRef | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | string | | | | `name` | string | | | ### MemberUser | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `email_verified` | boolean | | | | `family_name` | string | | | | `given_name` | string | | | | `id` | string | | | | `name` | string | | | | `picture` | string | | | | `status` | string | | | | `username` | 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. | --- # Password policy Source: https://www.pontive.com/docs/api-reference/management/password-policy Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 password policy ```http GET https://api.{region}.pontive.com/v1/authn/password-policy ``` Get the instance's password policy. If none has been configured, the default policy is returned. Operation ID: `GetPasswordPolicy` ### Responses - `200` OK: PasswordPolicy - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Update password policy ```http PATCH https://api.{region}.pontive.com/v1/authn/password-policy ``` Patch the instance's password policy. Omitted fields are left unchanged. Operation ID: `UpdatePasswordPolicy` ### 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): UpdatePasswordPolicyRequest Update payload ### Responses - `200` OK: PasswordPolicy - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `500` Internal Server Error: ErrResponse ## Reset password policy ```http DELETE https://api.{region}.pontive.com/v1/authn/password-policy ``` Delete the stored password policy, resetting it to the default. A subsequent GET returns the default policy. Operation ID: `DeletePasswordPolicy` ### 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) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### PasswordPolicy | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `history_size` | integer | | | | `max_age_days` | integer | | | | `min_length` | integer | | | | `object` | string | | | | `require_digits` | boolean | | | | `require_lowercase` | boolean | | | | `require_special_chars` | boolean | | | | `require_uppercase` | boolean | | | | `updated_at` | string | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### UpdatePasswordPolicyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `history_size` | integer | | | | `max_age_days` | integer | | | | `min_length` | integer | | | | `require_digits` | boolean | | | | `require_lowercase` | boolean | | | | `require_special_chars` | boolean | | | | `require_uppercase` | boolean | | | ### 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. | ### 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. | --- # Permissions Source: https://www.pontive.com/docs/api-reference/management/permissions Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 permissions ```http GET https://api.{region}.pontive.com/v1/authz/permissions ``` Get a paginated list of all permissions (system and custom) in the directory. Filter by type (system/custom), resource_type, name (partial match). Operation ID: `ListPermissions` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `type` | string | | Filter by permission type (system, custom) | | `resource_type` | string | | Filter by resource type | | `name` | string | | Filter by permission name (partial match) | | `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, key. Default: -created_at | ### Responses - `200` OK: ListPermissionsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## List a resource type's permissions ```http GET https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/permissions ``` The permissions of one resource type (D18), filtered as GET /authz/permissions is. Operation ID: `ListResourceTypePermissions` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Resource type key | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `type` | string | | Filter by permission type (system, custom) | | `name` | string | | Filter by permission name (partial match) | | `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, key. Default: -created_at | ### Responses - `200` OK: ListPermissionsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create custom permission ```http POST https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/permissions ``` Create a custom permission. Required: key, resource_type. Optional: description, name. Name format: resource:action or resource:sub_resource:action. Operation ID: `CreatePermission` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | resource_type | ### Request body (`application/json`, required): CreatePermissionRequest Create Permission Request ### Responses - `201` Created: Permission - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get permission details ```http GET https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/permissions/{permission_key} ``` Get a permission by name. Returns name, key, description, type, resource_type, created_at, updated_at, used_in_roles. Works for both system and custom permissions. Operation ID: `GetPermission` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `permission_key` | string | yes | Permission Key | | `resource_type` | string | yes | Permission resource type | ### Responses - `200` OK: Permission - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update custom permission ```http PATCH https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/permissions/{permission_key} ``` Update a custom permission. Can update: description, name. Cannot update: key (immutable), resource_type (immutable). System permissions cannot be updated. Operation ID: `UpdatePermission` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `permission_key` | string | yes | Permission Key | | `resource_type` | string | yes | Permission resource type | ### 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`): UpdatePermissionRequest Update Permission Request (description, name) ### Responses - `200` OK: Permission - `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 ## Delete custom permission ```http DELETE https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/permissions/{permission_key} ``` Delete a custom permission. System permissions cannot be deleted. Returns 204 No Content on success. Operation ID: `DeletePermission` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Permission resource type | | `permission_key` | string | yes | Permission Key | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `force` | boolean | | Force delete (bypass confirmation when permission is used in roles) | ### 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) | ### Responses - `204` No Content - `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 ### ListPermissionsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Permission[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreatePermissionRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `key` | string | yes | | | `name` | string | | | ### Permission | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `description` | string | | | | `key` | string | | | | `name` | string | | | | `object` | string | | | | `resource_type` | string | | | | `type` | "system" \| "custom" | | | | `updated_at` | string | | | | `used_in_roles` | RoleRef[] | | | ### UpdatePermissionRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `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. | ### RoleRef | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | string | | | | `name` | 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. | --- # Personal access tokens Source: https://www.pontive.com/docs/api-reference/management/personal-access-tokens Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 personal access tokens ```http GET https://api.{region}.pontive.com/v1/personal-access-tokens ``` List personal access tokens with filtering and pagination. Operation ID: `ListPATs` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_id` | string | | Filter by user id (usr_…) | | `status` | string | | Filter by status (active\|revoked) | | `sort` | string | | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, name, status. Default: -created_at | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListPATsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create personal access token ```http POST https://api.{region}.pontive.com/v1/personal-access-tokens ``` Mint a personal access token bound to a user. The token value is returned only here. Omit organization_id for an all-orgs token. Operation ID: `CreatePAT` ### Request body (`application/json`, required): CreatePATRequest Create PAT payload ### Responses - `201` Created: PATWithToken - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get personal access token ```http GET https://api.{region}.pontive.com/v1/personal-access-tokens/{personal_access_token_id} ``` Get a personal access token by ID. Operation ID: `GetPAT` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `personal_access_token_id` | string | yes | PAT ID | ### Responses - `200` OK: PAT - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update personal access token ```http PATCH https://api.{region}.pontive.com/v1/personal-access-tokens/{personal_access_token_id} ``` Update mutable fields (name, description, metadata). Operation ID: `UpdatePAT` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `personal_access_token_id` | string | yes | PAT ID | ### Request body (`application/json`, required): UpdatePATRequest Update payload ### Responses - `200` OK: PAT - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Revoke personal access token ```http POST https://api.{region}.pontive.com/v1/personal-access-tokens/{personal_access_token_id}/revoke ``` Revoke a personal access token immediately and irreversibly. Operation ID: `RevokePAT` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `personal_access_token_id` | string | yes | PAT ID | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Schemas ### ListPATsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | PAT[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreatePATRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `expires_at` | string | | | | `metadata` | Metadata | | | | `name` | string | yes | | | `organization_id` | string | | | | `user_id` | string | yes | | ### PATWithToken | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `description` | string | | | | `expires_at` | string | | | | `id` | string | | | | `instance_id` | string | | | | `key_preview` | string | | | | `last_used_at` | string | | | | `metadata` | Metadata | | | | `name` | string | | | | `object` | string | | | | `organization_id` | string | | | | `status` | "active" \| "revoked" \| "deleted" \| "expired" | | | | `token` | string | | | | `updated_at` | string | | | | `user_id` | string | | | ### PAT | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `description` | string | | | | `expires_at` | string | | | | `id` | string | | | | `instance_id` | string | | | | `key_preview` | string | | | | `last_used_at` | string | | | | `metadata` | Metadata | | | | `name` | string | | | | `object` | string | | | | `organization_id` | string | | | | `status` | "active" \| "revoked" \| "deleted" \| "expired" | | | | `updated_at` | string | | | | `user_id` | string | | | ### UpdatePATRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `metadata` | Metadata | | | | `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. | ### Metadata Type: Record ### 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. | --- # Reference data Source: https://www.pontive.com/docs/api-reference/management/reference-data Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 countries ```http GET https://api.{region}.pontive.com/v1/countries ``` Every country Pontive accepts, for pickers: the ISO 3166-1 assigned codes and XK, each with its English name and its E.164 calling code (digits only, "49"; empty for the seven uninhabited territories that have none), sorted by name. Platform reference data from pontive-core's country package, the same list every service validates against (billing-svc docs/questions.md, P101). Static: cache it. Operation ID: `ListCountries` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: CountryList - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## Schemas ### CountryList | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Country[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Country | Field | Type | Required | Description | | --- | --- | --- | --- | | `calling_code` | string | | CallingCode is the E.164 country calling code, digits only, for example "49". Countries in the North American Numbering Plan share "1". It is empty for a country that has none. | | `code` | string | | Code is the ISO 3166-1 alpha-2 code, upper case, for example "DE". | | `name` | string | | Name is the English short name, for example "Germany". | ### 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. | ### 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. | --- # 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 ` 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: 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. | --- # Resource types Source: https://www.pontive.com/docs/api-reference/management/resource-types Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 resource types ```http GET https://api.{region}.pontive.com/v1/authz/resource-types ``` List the instance's resource types: the reserved root and org types (org in b2b instances only), and the custom types. Operation ID: `ListResourceTypes` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `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, key. Default: -created_at | ### Responses - `200` OK: ListResourceTypesResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create resource type ```http POST https://api.{region}.pontive.com/v1/authz/resource-types ``` Register a resource type in the instance's registry. Only custom types can be created: root and org are reserved and seeded. Operation ID: `CreateResourceType` ### Request body (`application/json`, required): CreateResourceTypeRequest Create Resource Type Request ### Responses - `201` Created: ResourceType - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get resource type ```http GET https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type} ``` Get a resource type by its key. Operation ID: `GetResourceType` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Resource type key | ### Responses - `200` OK: ResourceType - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update resource type ```http PATCH https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type} ``` Update a resource type. Cannot update: key (immutable). The reserved root and org types accept only name and description. Operation ID: `UpdateResourceType` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Resource type key | ### 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): UpdateResourceTypeRequest Update Resource Type Request ### Responses - `200` OK: ResourceType - `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 ## Delete resource type ```http DELETE https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type} ``` Delete a resource type from the registry by its key. The reserved root and organization types cannot be deleted. Operation ID: `DeleteResourceType` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Resource type key | ### 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) | ### Responses - `204` No Content - `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 ### ListResourceTypesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | ResourceType[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateResourceTypeRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_members_to_leave` | boolean | | The membership policy. Roles on join are set once the type's roles exist. | | `description` | string | | | | `invitation_expiry_days` | integer | | | | `key` | string | yes | | | `name` | string | | | | `parents` | string[] | | The parent type keys: at least one (parents_required). The type's shortest chain of parent types from root or org, self-references aside, is at most 8 levels (max_depth_exceeded) and must exist (cycle_detected): deeper, or with no chain, no resource of the type could ever be registered. | ### ResourceType | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `description` | string | | | | `instance_id` | string | | | | `key` | string | | | | `name` | string | | | | `object` | string | | | | `parents` | string[] | | Parents are the types this type's objects may sit under: at least one on every type but root. Each is one edge, whose relation in the authorization model is the parent's key. | | `policy` | MembershipPolicy | | Policy is a custom type's membership policy; defaults on the reserved types. | | `reserved` | boolean | | Reserved is true for the seeded root and org types: they cannot be deleted, and only their name and description change. | | `updated_at` | string | | | ### UpdateResourceTypeRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_members_to_leave` | boolean | | The membership policy fields; each omitted is left unchanged. | | `description` | string | | | | `invitation_expiry_days` | integer | | 0 clears it to the instance's. | | `name` | string | | | | `parents` | string[] | | Replaces the parent type keys when present; an empty list is refused (parents_required), a type never loses its last parent type. The new set must leave this type, and every type under it, within 8 levels of root or org (max_depth_exceeded) and with a chain of parent types to root (cycle_detected). | | `roles_on_join` | 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. | ### MembershipPolicy Policy is a custom type's membership policy; defaults on the reserved types. | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_members_to_leave` | boolean | | AllowMembersToLeave lets a member remove their own membership. | | `invitation_expiry_days` | integer | | InvitationExpiryDays overrides the instance's invitation expiry; absent is the instance's. | | `roles_on_join` | string[] | | RolesOnJoin are given when someone is added to or invited into one of the type's resources without roles. That resource only. | ### 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. | --- # Resources Source: https://www.pontive.com/docs/api-reference/management/resources Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 resources ```http GET https://api.{region}.pontive.com/v1/resources ``` Retrieve a paginated list of resources. Filter by resource_type, the organization they belong to (or instance_level for those in none), a parent (its direct children), and external_id, or search the name and external id by free text. Operation ID: `ListResources` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | | Filter by resource type | | `organization_id` | string | | Only resources belonging to this organization | | `instance_level` | boolean | | Only resources in no organization: the instance's own. Exclusive with organization_id | | `parent_id` | string | | Only the direct children of this organization or resource, or of the instance root (its instance id, or root) | | `external_id` | string | | Exact match on the id the caller gave the resource | | `search` | string | | Free text matched against the name and the external id, case-insensitively | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListResourcesResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create resource ```http POST https://api.{region}.pontive.com/v1/resources ``` Register an object another system owns, so members, roles and authorization can refer to it. It may belong to an organization (and is then deleted with it), and may sit under one parent — the organization it belongs to, or a resource belonging to it; for one in no organization, another such resource or the instance root (its instance id, or root) — of one of the parent types its resource type declares; roles held on the parent reach it by its type's inheritance rules. The parent is required: no resource is under nothing. Operation ID: `CreateResource` ### Request body (`application/json`, required): CreateResourceRequest Resource creation details ### Responses - `201` Created: Resource - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` The resource type, organization or a parent does not exist: ErrResponse - `409` A resource of this type is already registered with this external_id: ErrResponse - `500` Internal Server Error: ErrResponse ## Get resource ```http GET https://api.{region}.pontive.com/v1/resources/{resource_id} ``` Retrieve a resource by its ID, with its parent. Operation ID: `GetResource` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Responses - `200` OK: Resource - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update resource ```http PATCH https://api.{region}.pontive.com/v1/resources/{resource_id} ``` Change a resource's name or metadata. Its type, external id and organization never change; its parent changes through the parent endpoints. Operation ID: `UpdateResource` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Request body (`application/json`, required): UpdateResourceRequest Fields to change ### Responses - `200` OK: Resource - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete resource ```http DELETE https://api.{region}.pontive.com/v1/resources/{resource_id} ``` Deregister a resource. One that has children is refused with 409 unless cascade=true, which also deregisters its whole subtree. Operation ID: `DeleteResource` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `cascade` | boolean | | Also deregister its whole subtree (required when it has children) | ### Responses - `200` OK: DeleteResourceResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` The resource has children and cascade is not set: ErrResponse - `500` Internal Server Error: ErrResponse ## List resource members ```http GET https://api.{region}.pontive.com/v1/resources/{resource_id}/members ``` List the users holding roles on a resource itself. Users who reach it only by inheritance from a parent are not members and are not listed. Operation ID: `ListResourceMembers` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | string[] | | Filter by user IDs | | `emails` | string[] | | Filter by emails | | `roles` | string[] | | Filter by roles | | `search` | string | | search query | | `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, joined_at, email. Default: -created_at | ### Responses - `200` OK: ListMembersResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Add a member to a resource ```http POST https://api.{region}.pontive.com/v1/resources/{resource_id}/members ``` Add a user to a resource with roles of the resource's type. A user who is not a member of the resource's organization joins it too, with the membership settings' roles_on_join (none by default). A user who would take the organization past its member limit is refused 409 seat_limit_reached, and nothing is written. Operation ID: `CreateResourceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Request body (`application/json`, required): AddResourceMemberRequest Member to add ### Responses - `201` Created: Member - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse ## Get a resource member ```http GET https://api.{region}.pontive.com/v1/resources/{resource_id}/members/{user_id} ``` Get one member of a resource by user ID Operation ID: `GetResourceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `user_id` | string | yes | User ID | ### Responses - `200` OK: Member - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update a resource member's roles ```http PATCH https://api.{region}.pontive.com/v1/resources/{resource_id}/members/{user_id} ``` Replace the roles a member holds on a resource Operation ID: `UpdateResourceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `user_id` | string | yes | User ID | ### Request body (`application/json`, required): UpdateResourceMemberRolesRequest New roles ### Responses - `200` OK: Member - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Remove a member from a resource ```http DELETE https://api.{region}.pontive.com/v1/resources/{resource_id}/members/{user_id} ``` Remove a user from a resource. Their membership of the resource's organization stays. Operation ID: `DeleteResourceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | | `user_id` | string | yes | User ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Move a resource under a parent ```http PUT https://api.{region}.pontive.com/v1/resources/{resource_id}/parent ``` Set the resource's parent, replacing the one it had: a move, with its subtree. The parent is the organization the resource belongs to, or a resource belonging to it; for a resource in no organization, another such resource or the instance root, by its instance id or root — of one of the parent types the resource's type declares. Roles held on the parent then reach the resource. A move that would make the resource its own ancestor is refused with 409, one that would nest it more than 8 levels deep with 400. Setting the parent it already has succeeds. Operation ID: `ReplaceResourceParent` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | Resource ID | ### Request body (`application/json`, required): SetResourceParentRequest The parent ### Responses - `200` OK: Resource - `400` Invalid parent, or the move would exceed the depth limit: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` The move would close a cycle: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListResourcesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Resource[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateResourceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | | | | `metadata` | Metadata | | Metadata replaces the resource's metadata when set. | | `name` | string | | | | `organization_id` | string | | | | `parent` | ResourceParent | | Parent is always set. | | `resource_type` | string | yes | | ### Resource | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `external_id` | string | | | | `id` | string | | | | `metadata` | Metadata | | Metadata replaces the resource's metadata when set. | | `name` | string | | | | `object` | string | | | | `organization_id` | string | | | | `parent` | ResourceParent | | Parent is always set. | | `resource_type` | string | | | | `updated_at` | string | | | ### UpdateResourceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `clear_metadata` | boolean | | ClearMetadata empties the metadata; metadata must then be omitted. | | `metadata` | Metadata | | Metadata replaces the resource's metadata when set. | | `name` | string | | | ### DeleteResourceResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `deregistered_ids` | string[] | | | ### ListMembersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Member[] | | List of members | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### AddResourceMemberRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | yes | | | `user_id` | string | yes | | ### Member | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `instance_id` | string | | | | `joined_at` | string | | | | `last_active_at` | string | | | | `object` | string | | | | `resource_id` | string | | | | `resource_name` | string | | | | `resource_type` | string | | | | `roles` | RoleRef[] | | | | `updated_at` | string | | | | `user` | MemberUser | | | ### UpdateResourceMemberRolesRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | yes | | ### SetResourceParentRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | The parent: org_…, res_…, or the instance root (its instance id, or "root"). | ### 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 Metadata replaces the resource's metadata when set. Type: Record ### ResourceParent Parent is always set. | Field | Type | Required | Description | | --- | --- | --- | --- | | `resource_id` | string | yes | | | `resource_type` | string | | | ### RoleRef | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | string | | | | `name` | string | | | ### MemberUser | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `email_verified` | boolean | | | | `family_name` | string | | | | `given_name` | string | | | | `id` | string | | | | `name` | string | | | | `picture` | string | | | | `status` | string | | | | `username` | 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. | --- # Roles Source: https://www.pontive.com/docs/api-reference/management/roles Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 a resource type's roles ```http GET https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/roles ``` The roles of one resource type (D18), filtered as GET /authz/roles is. With inheritable_from, the roles of that parent type a role on this type could inherit instead: each a valid parent_role_key for a RoleInheritance rule on it. Operation ID: `ListResourceTypeRoles` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Resource type key | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `inheritable_from` | string | | A parent type: list its roles this type's roles may inherit | | `type` | string | | Filter by role type (system, custom) | | `name` | string | | Filter by role name (partial match) | | `resource_id` | string | | Also include this organization instance's own instance-scoped roles | | `include_instance_scoped` | boolean | | Include every instance-scoped role alongside type-scoped ones (ignored when resource_id is set) | | `assignable_only` | boolean | | Only roles that may be assigned directly | | `agent_assignable_only` | boolean | | Only roles an agent may hold | | `permission` | string | | Filter by permission name | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListRolesResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create custom role ```http POST https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/roles ``` Create a custom role. Required: key, resource_type, permissions. Optional: description, name, metadata, resource_id. Setting resource_id (an organization id) makes the role instance-scoped — assignable only on that instance; it is immutable. Role keys are unique within a resource type and cannot collide with system roles. Operation ID: `CreateRole` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | resource_type | ### Request body (`application/json`, required): CreateRoleRequest Create Role Request ### Responses - `201` Created: Role - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get role details ```http GET https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/roles/{role_key} ``` Get a role by key and resource_type. Returns name, description, resource_type, type, permissions, metadata, created_at, updated_at, assignment_count, permission_count. Operation ID: `GetRole` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Role resource type | | `role_key` | string | yes | Role Key | ### Responses - `200` OK: Role - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update custom role ```http PATCH https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/roles/{role_key} ``` Update a custom role. Can update: description, name, permissions, metadata. Cannot update: key (immutable), resource_type (immutable). System roles cannot be updated. Operation ID: `UpdateRole` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Role resource type | | `role_key` | string | yes | Role Key | ### 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`): UpdateRoleRequest Update Role Request ### Responses - `200` OK: Role - `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 ## Delete custom role ```http DELETE https://api.{region}.pontive.com/v1/authz/resource-types/{resource_type}/roles/{role_key} ``` Delete a custom role. System roles cannot be deleted. Returns 204 No Content on success. Operation ID: `DeleteRole` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | yes | Role resource type | | `role_key` | string | yes | Role Key | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `force` | boolean | | Force delete (bypass confirmation when role is in use) | ### 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) | ### Responses - `204` No Content - `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 ## List roles ```http GET https://api.{region}.pontive.com/v1/authz/roles ``` Get a paginated list of roles (system and custom) in the directory. Filter by type (system/custom), resource_type, name (partial match), permission. By default only type-scoped roles are returned. Pass resource_id to also include that organization instance's own instance-scoped roles, or set include_instance_scoped=true to include every instance-scoped role alongside the type-scoped ones (ignored when resource_id is set). Operation ID: `ListRoles` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `type` | string | | Filter by role type (system, custom) | | `name` | string | | Filter by role name (partial match) | | `resource_type` | string | | Filter by resource type | | `resource_id` | string | | Also include this organization instance's own instance-scoped roles | | `include_instance_scoped` | boolean | | Include every instance-scoped role alongside type-scoped ones (ignored when resource_id is set) | | `assignable_only` | boolean | | Only roles that may be assigned directly: drops inherited-only roles. What a role picker asks for | | `agent_assignable_only` | boolean | | Only roles an agent may hold (agent_assignable): what an agent's role picker asks for | | `permission` | string | | Filter by permission name | | `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, key. Default: -created_at | | `search` | string | | Search query | ### Responses - `200` OK: ListRolesResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListRolesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Role[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateRoleRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_assignable` | boolean | | AgentAssignable sets whether an agent may hold the role; omitted is true (pontive-spec 45 §6.2). | | `description` | string | | | | `inheritance` | RoleInheritance[] | | Inheritance is the optional set of inheritance rules, at most one per parent type. Each parent_type must be a declared parent type of resource_type, and each parent role key must exist on it. | | `inherited_only` | boolean | | InheritedOnly makes the role held only through a parent role, never assigned directly. Requires inheritance; not on the root type. | | `key` | string | yes | | | `metadata` | Record | | | | `name` | string | | | | `permissions` | string[] | | | | `resource_id` | string | | ResourceID, when set, creates an instance-scoped role bound to this organization. Optional and immutable; omit for a type-scoped role (the default). | ### Role | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_assignable` | boolean | | AgentAssignable: an agent may hold the role through an installation (pontive-spec 45 §6.2). The seeded org and root owner roles are false; every other role defaults to true. | | `assignment_count` | integer | | | | `created_at` | string | | | | `description` | string | | | | `inheritance` | RoleInheritance[] | | | | `inherited_only` | boolean | | InheritedOnly: the role is held only through a parent role and can never be assigned directly to a member, group, service account or invitation (role_not_assignable). Pickers drop it (assignable_only). | | `key` | string | | | | `metadata` | Record | | | | `name` | string | | | | `object` | string | | | | `permission_count` | integer | | | | `permissions` | string[] | | | | `resource_id` | string | | | | `resource_type` | string | | | | `type` | "system" \| "custom" | | | | `updated_at` | string | | | ### UpdateRoleRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_assignable` | boolean | | AgentAssignable, when provided, sets whether an agent may hold the role. Turning it off is refused while an agent installation holds the role or an agent requests it (409 role_held_by_agents). | | `description` | string | | | | `inheritance` | RoleInheritance[] | | Inheritance follows the same absent-vs-empty convention as permissions: omitted leaves existing rules unchanged; a provided (possibly empty) list replaces them wholesale. | | `inherited_only` | boolean | | InheritedOnly, when provided, turns the flag on or off. Turning it on is refused while anything holds the role directly (role_in_use), on the root type, without inheritance, or on a seeded role. | | `metadata` | Record | | | | `name` | string | | | | `permissions` | 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. | ### RoleInheritance | Field | Type | Required | Description | | --- | --- | --- | --- | | `parent_role_keys` | string[] | | | | `parent_type` | 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. | --- # Root Source: https://www.pontive.com/docs/api-reference/management/root Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 the instance root's members ```http GET https://api.{region}.pontive.com/v1/root/members ``` List the users holding a role on the instance root — its owners and admins, and in the directory Pontive's staff. The root is the request's own instance. Operation ID: `ListRootMembers` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_ids` | string[] | | Filter by user IDs | | `emails` | string[] | | Filter by emails | | `roles` | string[] | | Filter by roles | | `search` | string | | search query | | `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, joined_at, email. Default: -created_at | ### Responses - `200` OK: ListMembersResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Add a root member ```http POST https://api.{region}.pontive.com/v1/root/members ``` Give a user roles on the instance root (api-route-review D4, D38): written from the root, like an organization's or a resource's members. A root role is granted with sys:root:grant. Operation ID: `CreateRootMember` ### Request body (`application/json`, required): AddRootMemberRequest The user and the root roles ### Responses - `201` Created: Member - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse ## Get a root member ```http GET https://api.{region}.pontive.com/v1/root/members/{user_id} ``` One user's roles on the instance root. Operation ID: `GetRootMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_id` | string | yes | User ID | ### Responses - `200` OK: Member - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Update a root member ```http PATCH https://api.{region}.pontive.com/v1/root/members/{user_id} ``` Replace a user's roles on the instance root. Operation ID: `UpdateRootMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_id` | string | yes | User ID | ### Request body (`application/json`, required): UpdateRootMemberRequest The root roles ### Responses - `200` OK: Member - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Remove a root member ```http DELETE https://api.{region}.pontive.com/v1/root/members/{user_id} ``` Take every root role from a user. The instance's last owner cannot be removed. Operation ID: `DeleteRootMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_id` | string | yes | User ID | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse ## Schemas ### ListMembersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Member[] | | List of members | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### AddRootMemberRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | yes | | | `user_id` | string | yes | | ### Member | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `instance_id` | string | | | | `joined_at` | string | | | | `last_active_at` | string | | | | `object` | string | | | | `resource_id` | string | | | | `resource_name` | string | | | | `resource_type` | string | | | | `roles` | RoleRef[] | | | | `updated_at` | string | | | | `user` | MemberUser | | | ### UpdateRootMemberRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | yes | | ### 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. | ### RoleRef | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | string | | | | `name` | string | | | ### MemberUser | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `email_verified` | boolean | | | | `family_name` | string | | | | `given_name` | string | | | | `id` | string | | | | `name` | string | | | | `picture` | string | | | | `status` | string | | | | `username` | 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. | --- # 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 ` 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 | | 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 | | 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 | | 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 ### 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. | --- # 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 ` 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 | | | | `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 | | | | `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 | | | | `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 | | | --- # Third-party clients Source: https://www.pontive.com/docs/api-reference/management/third-party-clients Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 third-party clients setting ```http GET https://api.{region}.pontive.com/v1/apps/settings ``` When third-party OAuth clients — clients identified by a client ID metadata document (CIMD) or registered dynamically (DCR), which the customer did not create — may connect, and the client profile every admitted one is held to. An instance that never changed it reads the defaults: everything off. Operation ID: `GetAppSettings` ### Responses - `200` OK: ThirdPartyClients - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Update third-party clients setting ```http PATCH https://api.{region}.pontive.com/v1/apps/settings ``` Change the admission policy (cimd, dcr, allowlist) or the client profile; an absent field is left as it is. The allowlist and profile.apis, when present, replace the stored list wholesale, and null empties it. An allow-list entry is an exact client_id URL or https://host/*, at most 100; a profile API must be an API of the instance with third_party on, and scopes null covers all of its scopes. The profile's authentication fields (authflow_bindings, signin_config, signup_config, mfa_config, session_config) take the app routes' shapes and are every third-party app's, read when its user signs in: a present one replaces the profile's wholesale, validated as the app routes validate it, and null unsets it so third-party apps keep their own default. Operation ID: `UpdateAppSettings` ### 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): UpdateThirdPartyClientsRequest Update payload ### Responses - `200` OK: ThirdPartyClients - `400` Invalid request, or third_party_clients_invalid: ErrResponse - `401` Unauthorized: ErrResponse - `403` instance_unclaimed: the instance is unclaimed; claim this instance to admit third-party clients (pontive-spec 47): ErrResponse - `412` precondition_failed: the document changed since it was read: ErrResponse - `500` Internal Server Error: ErrResponse ## Get the organization's client policy ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/client-policy ``` Which of the clients the instance admits may act in the organization (pontive-spec 20 G2). mode all admits every client the instance admits but those the block-list names; allowlist admits only the third-party apps the allow-list names. The block-list always wins, and governs agents too. The instance's third-party client setting is the ceiling: third_party_in_organizations false means its client profile gives third-party apps no organization context at all. An organization that never set its policy reads the default, with updated_at null. Needs sys:agent:read on the organization. Operation ID: `GetOrganizationClientPolicy` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Responses - `200` OK: OrganizationClientPolicy - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Set the organization's client policy ```http PATCH https://api.{region}.pontive.com/v1/organizations/{organization}/client-policy ``` Replace the organization's client policy whole (pontive-spec 20 G2). An entry is an app id (app_…), an agent id (agt_…), an exact CIMD client_id URL, or https://host/*, at most 100 per list. A blocked or not-allowed third-party app is refused when the organization is chosen at /authorize (an error page, never a redirect), when consent would be given for it, at code exchange and at refresh; a blocked agent's token exchange in the organization is refused. The organization can only narrow what the instance admits. Needs sys:agent:install on the organization. Operation ID: `UpdateOrganizationClientPolicy` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### 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): SetOrganizationClientPolicyRequest The policy ### Responses - `200` OK: OrganizationClientPolicy - `400` organization_client_policy_invalid: 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 ## List the third-party apps acting for the organization's members ```http GET https://api.{region}.pontive.com/v1/organizations/{organization}/third-party-clients ``` The CIMD and DCR apps a member of the organization has consented to (pontive-spec 20 G2), the most recently consented first: how many members did, the organization's policy on each (allowed, blocked, not_allowed), and whether the instance still admits it. Needs sys:agent:read on the organization. Operation ID: `ListOrganizationThirdPartyClients` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListOrganizationClientsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Allow a third-party app in the organization again ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/third-party-clients/{app_id}/allow ``` Let a CIMD or DCR app act in the organization again (pontive-spec 20 G2): every block-list entry naming it exactly goes, and under allowlist mode its client_id joins the allow-list. 409 organization_client_blocked_by_pattern while an https://host/* entry on the block-list still names it: remove that entry with PUT /client-policy. Needs sys:agent:install on the organization. Operation ID: `AllowOrganizationThirdPartyClient` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `app_id` | string | yes | The third-party app's id (app_…) | ### Responses - `200` OK: OrganizationClientPolicy - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` organization_client_blocked_by_pattern: ErrResponse - `500` Internal Server Error: ErrResponse ## Block a third-party app for the organization ```http POST https://api.{region}.pontive.com/v1/organizations/{organization}/third-party-clients/{app_id}/block ``` Block a CIMD or DCR app for the organization (pontive-spec 20 G2): its client_id — a CIMD app's URL, which outlives the app's cleanup, or a DCR app's id — joins the block-list and leaves the allow-list. Its users are refused in the organization from their next authorization, code exchange or refresh. 404 for an app that is not a third-party app. Needs sys:agent:install on the organization. Operation ID: `BlockOrganizationThirdPartyClient` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `organization` | string | yes | The organization's id, or its slug | | `app_id` | string | yes | The third-party app's id (app_…) | ### Responses - `200` OK: OrganizationClientPolicy - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ThirdPartyClients | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_delegation_enabled` | boolean | | AgentDelegationEnabled is whether an agent may exchange a user's token, or a delegation grant, for a token acting for that user (pontive-spec 20 C2 profile (b)). Off by default. | | `allowlist` | string[] | | Allowlist holds CIMD client_id URLs, exact or https://host/*. At most 100. Applies when cimd is allowlist. | | `cimd` | "off" \| "allowlist" \| "open" | | CIMD is when a client identified by its client ID metadata document may start authorization: never, when its client_id URL matches the allowlist, or always once its document validates. | | `dcr` | "off" \| "on" | | DCR is whether POST /oauth2/register accepts registrations from public clients. | | `object` | string | | | | `profile` | Profile | | | | `updated_at` | string | | UpdatedAt is omitted while the instance has never changed the setting. | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### UpdateThirdPartyClientsRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent_delegation_enabled` | boolean | | AgentDelegationEnabled, when present, turns agent delegation on or off. | | `allowlist` | string[] | | Allowlist, when present, replaces the allow-list. | | `cimd` | "off" \| "allowlist" \| "open" | | | | `dcr` | "off" \| "on" | | | | `profile` | ProfilePatch | | | ### OrganizationClientPolicy | Field | Type | Required | Description | | --- | --- | --- | --- | | `allowlist` | string[] | | Allowlist and Blocklist hold entries: an app id (app_…), an agent id (agt_…), an exact CIMD client_id URL, or https://host/*. At most 100 each. | | `blocklist` | string[] | | | | `mode` | "all" \| "allowlist" | | Mode all admits every client the instance admits but those the block-list names; allowlist admits only the third-party apps the allow-list names (none when it is empty). The block-list always wins. Agents are governed by the block-list only: an installation is already the organization's approval of an agent. | | `object` | string | | | | `organization_id` | string | | | | `third_party_in_organizations` | boolean | | ThirdPartyInOrganizations is the instance's ceiling: false while its client profile gives third-party apps no organization context, so none acts in any organization whatever this policy says. | | `updated_at` | string | | UpdatedAt is null while the organization has never set its policy. | ### SetOrganizationClientPolicyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allowlist` | string[] | | | | `blocklist` | string[] | | | | `mode` | "all" \| "allowlist" | | Mode is all (the default when empty) or allowlist. | ### ListOrganizationClientsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | OrganizationThirdPartyClient[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### Profile | Field | Type | Required | Description | | --- | --- | --- | --- | | `apis` | ProfileAPI[] | | APIs are the registered APIs third-party clients may request, each with third_party on. At most 50. | | `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. | | `mfa_config` | MFAConfig | | | | `offline_access` | boolean | | OfflineAccess is whether offline_access may be granted, with consent. | | `organizations` | "none" \| "all" | | Organizations is whether a third-party client may receive an organization context. | | `refresh_token_ttl` | integer | | RefreshTokenTTL is a third-party client's refresh-token lifetime in seconds, 3600 to 7776000. | | `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 | | | ### 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. | ### ProfilePatch | Field | Type | Required | Description | | --- | --- | --- | --- | | `apis` | ProfileAPI[] | | APIs, when present, replace the profile's APIs. | | `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. | | `mfa_config` | MFAConfig | | | | `offline_access` | boolean | | | | `organizations` | "none" \| "all" | | | | `refresh_token_ttl` | integer | | | | `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 | | | ### OrganizationThirdPartyClient | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `client_id` | string | | ClientID is its client_id on the wire: a CIMD app's URL, a DCR app's id. | | `client_id_url` | string | | ClientIDURL is a CIMD app's client_id URL; empty for a DCR app. | | `instance_admitted` | boolean | | InstanceAdmitted is whether the instance's admission policy admits it: a CIMD app the instance no longer admits is refused whatever the organization says. | | `last_consented_at` | string | | | | `logo_url` | string | | | | `members` | integer | | Members is how many of the organization's members have consented to it. | | `name` | string | | | | `object` | string | | | | `origin` | "cimd" \| "dcr" | | | | `status` | "allowed" \| "blocked" \| "not_allowed" | | Status is the organization's policy on it. | ### 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. | ### ProfileAPI | Field | Type | Required | Description | | --- | --- | --- | --- | | `api_id` | string | | APIID is an api_ id of the instance whose third_party is on. | | `scopes` | string[] | | Scopes null is every scope the API defines, now and later; a list is those of its scope keys only. | ### 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 | | | ### MFAConfig | Field | Type | Required | Description | | --- | --- | --- | --- | | `enabled` | boolean | | | | `enforcement` | string | | | | `grace_period_days` | integer | | | | `methods` | MFAMethods | | | | `remember_device_days` | integer | | | ### 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 | | | ### 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. | ### MFAMethods | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | EmailConfig | | | | `recovery_codes` | RecoveryCodesConfig | | | | `sms` | SMSConfig | | | | `totp` | TOTPConfig | | | ### 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 | | | ### 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 | | | ### 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 | | | ### 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 | | | ### 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 | | | ### 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 | | | --- # Trusted issuers Source: https://www.pontive.com/docs/api-reference/management/trusted-issuers Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 trusted issuers ```http GET https://api.{region}.pontive.com/v1/authn/trusted-issuers ``` Every issuer the instance trusts (at most 50). Needs sys:settings:read on the instance root. Operation ID: `ListTrustedIssuers` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: ListTrustedIssuersResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create trusted issuer ```http POST https://api.{region}.pontive.com/v1/authn/trusted-issuers ``` Trust an external issuer to sign client assertions for this instance's service accounts and agents (workload identity federation, pontive-spec 20 B7): a CI provider's OIDC issuer such as GitHub Actions (https://token.actions.githubusercontent.com) or GitLab, a SPIFFE trust domain's JWT issuer, or a Kubernetes cluster's service account issuer. The issuer is an https URL, matched exactly against an assertion's iss. Without a jwks_uri it is read from the issuer's OpenID discovery document, which must name exactly this issuer. audiences (at most 10) are the aud values an assertion may carry; omitted, this instance's issuer and token endpoint. max_token_lifetime_seconds (default 3600, 60 to 86400) caps how far ahead an assertion's exp may be and how long after its iat. allow_reuse (default false) accepts the same token again until it expires, for workloads that reuse one token (Kubernetes projected tokens, cached SPIFFE JWT-SVIDs); false spends each jti, or a token with no jti whole, once. Trusting an issuer authenticates nobody by itself: a federated credential on a service account or agent does. cross_app_access makes the issuer an organization's enterprise IdP (Cross-App Access, pontive-spec 20 C8): it may then sign ID-JAGs for the organization's members, which an app presents with the urn:ietf:params:oauth:grant-type:jwt-bearer grant for a token to a registered API; the ID-JAG's sub is mapped to a user through the named sign-in connection's external identities (sso_app_id, sso_provider: an OpenID Connect sign-in connection whose discovery document is this issuer's), and the user must be a member of the organization. With cross_app_access, issuer may be omitted: it is the one that connection signs in with. At most 50 per instance. Needs sys:settings:manage on the instance root. Operation ID: `CreateTrustedIssuer` ### Request body (`application/json`, required): CreateTrustedIssuerRequest Issuer ### Responses - `201` Created: TrustedIssuer - `400` trusted_issuer_invalid, trusted_issuer_discovery_failed, trusted_issuer_limit_reached: ErrResponse - `401` Unauthorized: ErrResponse - `403` instance_unclaimed: the instance is unclaimed; claim this instance to trust an external issuer (pontive-spec 47): ErrResponse - `409` trusted_issuer_conflict: the instance already trusts this issuer: ErrResponse - `500` Internal Server Error: ErrResponse ## Get trusted issuer ```http GET https://api.{region}.pontive.com/v1/authn/trusted-issuers/{trusted_issuer_id} ``` Needs sys:settings:read on the instance root. Operation ID: `GetTrustedIssuer` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `trusted_issuer_id` | string | yes | Trusted issuer ID (tis_) | ### Responses - `200` OK: TrustedIssuer - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` trusted_issuer_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update trusted issuer ```http PATCH https://api.{region}.pontive.com/v1/authn/trusted-issuers/{trusted_issuer_id} ``` Change the name, jwks_uri, audiences, enabled, allow_reuse, max_token_lifetime_seconds or cross_app_access; an absent field is left as it is. cross_app_access replaces the organization link (Cross-App Access, pontive-spec 20 C8); {"organization_id":""} removes it. jwks_uri "" reads it again from the issuer's discovery document; audiences, when present, replaces the list ([] means this instance's issuer and token endpoint). enabled false refuses every assertion the issuer signs at once. The issuer URL never changes: trust a new one instead. Needs sys:settings:manage on the instance root. Operation ID: `UpdateTrustedIssuer` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `trusted_issuer_id` | string | yes | Trusted issuer ID (tis_) | ### Request body (`application/json`, required): UpdateTrustedIssuerRequest Changes ### Responses - `200` OK: TrustedIssuer - `400` trusted_issuer_invalid, trusted_issuer_discovery_failed: ErrResponse - `401` Unauthorized: ErrResponse - `403` instance_unclaimed: the instance is unclaimed; claim this instance to trust an external issuer (pontive-spec 47): ErrResponse - `404` trusted_issuer_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete trusted issuer ```http DELETE https://api.{region}.pontive.com/v1/authn/trusted-issuers/{trusted_issuer_id} ``` Stop trusting an issuer. Refused while federated credentials name it: delete them first, or disable the issuer instead. Needs sys:settings:manage on the instance root. Operation ID: `DeleteTrustedIssuer` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `trusted_issuer_id` | string | yes | Trusted issuer ID (tis_) | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` trusted_issuer_not_found: ErrResponse - `409` trusted_issuer_in_use: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListTrustedIssuersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | TrustedIssuer[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateTrustedIssuerRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_reuse` | boolean | | AllowReuse defaults to false: each token (its jti, or the whole token with none) is accepted once. true accepts it again until it expires. | | `audiences` | string[] | | Audiences, at most 10; omitted, this instance's issuer and token endpoint. | | `cross_app_access` | CrossAppAccess | | CrossAppAccess, when present, replaces the organization link; one with an empty organization_id removes it. | | `enabled` | boolean | | Enabled defaults to true. | | `issuer` | string | | Issuer is an https URL with no query or fragment, matched exactly against an assertion's iss. Required, unless cross_app_access names a connection: then omitted, it is the issuer that connection signs in with. | | `jwks_uri` | string | | JWKSURI is optional: omitted, it is read from the issuer's OpenID discovery document ({issuer}/.well-known/openid-configuration). | | `max_token_lifetime_seconds` | integer | | MaxTokenLifetimeSeconds defaults to 3600; 60 to 86400. | | `name` | string | yes | | ### TrustedIssuer | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_reuse` | boolean | | AllowReuse true accepts the same token again until it expires, each time verified in full (Kubernetes projected tokens, cached SPIFFE JWT-SVIDs); false spends its jti, or a token with no jti whole, once. | | `audiences` | string[] | | Audiences are the aud values an assertion may carry; empty means this instance's issuer and token endpoint. | | `created_at` | string | | | | `cross_app_access` | CrossAppAccess | | CrossAppAccess, when present, replaces the organization link; one with an empty organization_id removes it. | | `enabled` | boolean | | | | `id` | string | | | | `instance_id` | string | | | | `issuer` | string | | Issuer is the iss value, matched exactly. | | `jwks_uri` | string | | JWKSURI is where the issuer's signing keys are fetched from. | | `max_token_lifetime_seconds` | integer | | MaxTokenLifetimeSeconds is how far ahead an assertion's exp may be, and how long after its iat: 60 to 86400. | | `name` | string | | | | `object` | string | | | | `updated_at` | string | | | ### UpdateTrustedIssuerRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_reuse` | boolean | | AllowReuse true accepts the same token again until it expires. | | `audiences` | string[] | | Audiences, when present, replaces the list; [] means this instance's issuer and token endpoint. | | `cross_app_access` | CrossAppAccess | | CrossAppAccess, when present, replaces the organization link; one with an empty organization_id removes it. | | `enabled` | boolean | | Enabled false refuses every assertion the issuer signs at once. | | `jwks_uri` | string | | JWKSURI set to "" reads it again from the issuer's discovery document. | | `max_token_lifetime_seconds` | integer | | MaxTokenLifetimeSeconds, 60 to 86400. | | `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. | ### CrossAppAccess CrossAppAccess, when present, replaces the organization link; one with an empty organization_id removes it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `organization_id` | string | | OrganizationID is the organization. On an update, "" removes the link. | | `sso_app_id` | string | | SSOAppID is the app whose auth provider connection the organization's users sign in through. | | `sso_provider` | string | | SSOProvider is that connection's provider slug. | | `tenant` | string | | Tenant is a multi-tenant issuer's tenant identifier for the organization, which an ID-JAG's tenant claim must equal; empty for a single-tenant issuer. | ### 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. | --- # User imports Source: https://www.pontive.com/docs/api-reference/management/user-imports Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## Import organizations ```http POST https://api.{region}.pontive.com/v1/organizations/import ``` Apply, or with dry_run (default true) plan, a batch of at most 100 organizations and 1,000 member entries under an import run, after their users (pontive-spec 46 §5.3). external_id is each row's key. A member names its user by exactly one of user_id, user_external_id or legacy_subject (the run's source), with roles of the org type; one that names no user fails as a warning on the row, not the organization. A new organization needs at least one resolved member with owner (owners_required). An existing one (same external_id) takes new members and, with on_existing update, its name, metadata and changed roles; its owners change by transfer, never by import (owner_requires_transfer). An organization larger than one batch is sent again with its next members. A b2c instance refuses the call (tenancy_mode_b2c). Needs sys:org:create on the instance root, and sys:member:manage on each existing organization the batch changes. Operation ID: `ImportOrganizations` ### Request body (`application/json`, required): ImportOrganizationsRequest Batch ### Responses - `200` OK: UserImportBatch - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` user_import_not_found: ErrResponse - `409` user_import_reverted, tenancy_mode_b2c: ErrResponse - `422` too_many_records: ErrResponse - `500` Internal Server Error: ErrResponse ## List user imports ```http GET https://api.{region}.pontive.com/v1/user-imports ``` The instance's import runs, newest first. Needs sys:user:read on the instance root. Operation ID: `ListUserImports` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | "open" \| "reverting" \| "reverted" | | Only runs in this status | | `migration_source_id` | string | | Only runs from this migration source (msrc_) | | `created_after` | string | | Created at or after this time (RFC 3339) | | `created_before` | string | | Created before this time (RFC 3339) | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: ListUserImportsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create user import ```http POST https://api.{region}.pontive.com/v1/user-imports ``` Start an import run (pontive-spec 46 §5.1): a migration's batches of users and organizations, its counters, a record per applied row, and revert. migration_source_id is optional; without one, rows match existing users by external_id only and carry no legacy_subject or firebase_scrypt hash. options are checked now and fixed: on_existing (skip, default, or update), password_policy_violation (require_change, default, or allow), identity_connections (at most 20; each app must have that connection, of that type), totp_app_ids (at most 20; each app must have TOTP on with an issuer) and emit_events (default true: pontive.user.created for each user the run creates). Needs sys:user:manage on the instance root. Operation ID: `CreateUserImport` ### Request body (`application/json`, required): CreateUserImportRequest Run ### Responses - `201` Created: UserImport - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` migration_source_not_found: ErrResponse - `422` connection_not_found, connection_type_mismatch, totp_not_enabled: ErrResponse - `500` Internal Server Error: ErrResponse ## Get user import ```http GET https://api.{region}.pontive.com/v1/user-imports/{user_import_id} ``` The run with its options and counters. Needs sys:user:read on the instance root. Operation ID: `GetUserImport` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_import_id` | string | yes | User import ID (uimp_) | ### Responses - `200` OK: UserImport - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` user_import_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## List user import records ```http GET https://api.{region}.pontive.com/v1/user-imports/{user_import_id}/records ``` The run's records, one per applied row, in the order applied: what matched the row (key), what happened (outcome) and why a row failed (errors, never a value from the row). Records are kept 90 days after the run's last batch. Needs sys:user:read on the instance root. Operation ID: `ListUserImportRecords` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_import_id` | string | yes | User import ID (uimp_) | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `kind` | "user" \| "organization" | | Only records of this kind | | `outcome` | "created" \| "updated" \| "skipped" \| "failed" | | Only records with this outcome | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: ListUserImportRecordsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` user_import_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Revert user import ```http POST https://api.{region}.pontive.com/v1/user-imports/{user_import_id}/revert ``` Undo, or with dry_run (default true) plan undoing, up to 1,000 of what the run created (pontive-spec 46 §5.5): the organizations it created whose every member is a user it created who has not signed in, then those users, deleted outright so their identifiers are free for a re-import. Users who signed in, organizations with other members and everything the run updated are kept; kept lists them with why. The run takes no more batches; call again while remaining is above 0, and the run is reverted once a call finds nothing left. Needs sys:user:manage on the instance root, and sys:org:delete on each organization it deletes. Operation ID: `RevertUserImport` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user_import_id` | string | yes | User import ID (uimp_) | ### Request body (`application/json`): RevertUserImportRequest Revert ### Responses - `200` OK: UserImportRevert - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` user_import_not_found: ErrResponse - `409` user_import_reverted: ErrResponse - `500` Internal Server Error: ErrResponse ## Import users ```http POST https://api.{region}.pontive.com/v1/users/import ``` Apply, or with dry_run (default true) plan, a batch of at most 100 users under an import run (pontive-spec 46 §5.2). Each row is POST /v1/users's fields plus legacy_subject (the user's id in the run's migration source), created_at (in the past), status (active or deactivated), and one of password (plaintext, hashed now) or password_hash: bcrypt, argon2, scrypt, firebase_scrypt, pbkdf2, django, werkzeug, aspnet_identity, wordpress, ldap or digest (§6.1). Hashes under OWASP's minimum are wrapped in argon2id; every imported hash is replaced by a native one at the user's first sign-in, when the password is also checked against the password policy (a change is required on failure unless the run allows it). totp (base32 secret, SHA1, 6 digits, 30 seconds, with up to 16 recovery codes) is stored for the run's totp_app_ids; external_identities are written to the run's identity_connections of their type (google, github, apple, oidc; microsoft and entra are identity_not_portable). A row matches an existing user by its legacy subject, else external_id, never by email: a match is skipped or, with on_existing update, updated; an email, phone or username held by a user it does not match fails identifier_conflict. Each row stands alone and answers a record: created, updated, skipped or failed with errors, never a value from the row. Nothing is sent to the users. Without user_import_id an applied batch starts a run with the default options. The call answers 200 whatever its rows' outcomes. Needs sys:user:manage on the instance root, and sys:user:credentials when a row carries password, password_hash, totp or external_identities (never a token acting for a user). Operation ID: `ImportUsers` ### Request body (`application/json`, required): ImportUsersRequest Batch ### Responses - `200` OK: UserImportBatch - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` actor_refused: a token acting for a user cannot import credentials: ErrResponse - `404` user_import_not_found: ErrResponse - `409` user_import_reverted: ErrResponse - `422` too_many_records: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ImportOrganizationsRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `dry_run` | boolean | | | | `organizations` | ImportOrganizationRow[] | | | | `user_import_id` | string | | | ### UserImportBatch | Field | Type | Required | Description | | --- | --- | --- | --- | | `batch` | integer | | Batch is the batch's number in the run; absent in a dry run. | | `counts` | BatchCounts | | | | `dry_run` | boolean | | | | `object` | string | | | | `records` | RecordResult[] | | | | `user_import_id` | string | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### ListUserImportsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | UserImport[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### CreateUserImportRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `migration_source_id` | string | | | | `name` | string | | | | `options` | UserImportOptions | | | ### UserImport | Field | Type | Required | Description | | --- | --- | --- | --- | | `counts` | UserImportCounts | | | | `created_at` | string | | | | `id` | string | | | | `last_batch_at` | string | | | | `migration_source_id` | string | | | | `name` | string | | | | `object` | string | | | | `options` | UserImportOptions | | | | `reverted_at` | string | | | | `status` | "open" \| "reverting" \| "reverted" | | | | `updated_at` | string | | | ### ListUserImportRecordsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | UserImportRecord[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### RevertUserImportRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `dry_run` | boolean | | DryRun (default true) answers what would go and deletes nothing. | ### UserImportRevert | Field | Type | Required | Description | | --- | --- | --- | --- | | `dry_run` | boolean | | | | `kept` | RevertKept[] | | | | `object` | string | | | | `organizations_deleted` | integer | | | | `remaining` | integer | | Remaining is what is left for the next call; 0 when the run is reverted. | | `users_deleted` | integer | | | ### ImportUsersRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `dry_run` | boolean | | DryRun (default true) answers the plan and writes nothing. | | `user_import_id` | string | | UserImportID names the run; omitted, an applied batch starts a run with the default options and no source. | | `users` | ImportUserRow[] | | | ### ImportOrganizationRow | Field | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | | | | `members` | ImportMemberRow[] | | | | `metadata` | Record | | | | `name` | string | | | | `slug` | string | | | ### BatchCounts | Field | Type | Required | Description | | --- | --- | --- | --- | | `created` | integer | | | | `failed` | integer | | | | `skipped` | integer | | | | `updated` | integer | | | ### RecordResult | Field | Type | Required | Description | | --- | --- | --- | --- | | `errors` | RowError[] | | | | `index` | integer | | | | `key` | string | | | | `organization_id` | string | | | | `outcome` | "created" \| "updated" \| "skipped" \| "failed" | | | | `user_id` | string | | | | `warnings` | RowError[] | | | ### 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. | ### 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. | ### UserImportOptions | Field | Type | Required | Description | | --- | --- | --- | --- | | `emit_events` | boolean | | EmitEvents (default true) fires pontive.user.created for each user the run creates. | | `identity_connections` | IdentityConnection[] | | IdentityConnections (at most 20) are the app connections imported external identities are written to, per connection type. | | `on_existing` | "skip" \| "update" | | OnExisting is what a row matching an existing user does: skip (default), or update its profile, metadata and verified flags, and its credentials while the user has not set a password since. | | `password_policy_violation` | "require_change" \| "allow" | | PasswordPolicyViolation is what a password failing the password policy leads to: require_change (default) at the next sign-in, or allow. | | `totp_app_ids` | string[] | | TOTPAppIDs (at most 20) are the apps imported TOTP secrets are stored for: each must have TOTP on with an issuer. | | `totp_apps` | TOTPApp[] | | TOTPApps are the apps with their issuers, as resolved. Read-only. | ### UserImportCounts | Field | Type | Required | Description | | --- | --- | --- | --- | | `batches` | integer | | | | `memberships_written` | integer | | | | `organizations_created` | integer | | | | `organizations_failed` | integer | | | | `organizations_updated` | integer | | | | `users_created` | integer | | | | `users_failed` | integer | | | | `users_skipped` | integer | | | | `users_updated` | integer | | | ### UserImportRecord | Field | Type | Required | Description | | --- | --- | --- | --- | | `batch` | integer | | | | `created_at` | string | | | | `errors` | RowError[] | | | | `id` | string | | | | `index` | integer | | | | `key` | string | | | | `kind` | "user" \| "organization" | | | | `object` | string | | | | `organization_id` | string | | | | `outcome` | "created" \| "updated" \| "skipped" \| "failed" | | | | `reverted` | boolean | | | | `user_id` | string | | | | `user_import_id` | string | | | ### RevertKept | Field | Type | Required | Description | | --- | --- | --- | --- | | `organization_id` | string | | | | `reason` | "signed_in" \| "has_other_members" \| "owns_organization" \| "forbidden" \| "error" | | | | `user_id` | string | | | ### ImportUserRow | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `email` | string | | | | `email_verified` | boolean | | | | `external_id` | string | | | | `external_identities` | ImportedExternalIdentity[] | | | | `family_name` | string | | | | `given_name` | string | | | | `legacy_subject` | string | | | | `locale` | string | | | | `metadata` | Record | | | | `middle_name` | string | | | | `name` | string | | | | `nickname` | string | | | | `password` | string | | | | `password_hash` | PasswordHash | | | | `phone` | string | | | | `phone_verified` | boolean | | | | `picture` | string | | | | `private_metadata` | Record | | | | `status` | "active" \| "deactivated" | | | | `totp` | ImportedTOTP | | | | `username` | string | | | | `zoneinfo` | string | | | ### ImportMemberRow | Field | Type | Required | Description | | --- | --- | --- | --- | | `legacy_subject` | string | | | | `roles` | string[] | | | | `user_external_id` | string | | | | `user_id` | string | | | ### RowError | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | | | `field` | string | | | | `message` | 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. | ### IdentityConnection | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `connection_slug` | string | | | | `connection_type` | "google" \| "github" \| "apple" \| "oidc" \| "microsoft" \| "entra" | | | ### TOTPApp | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `issuer` | string | | | ### ImportedExternalIdentity | Field | Type | Required | Description | | --- | --- | --- | --- | | `connection_type` | "google" \| "github" \| "apple" \| "oidc" \| "microsoft" \| "entra" | | | | `email` | string | | | | `provider_user_id` | string | | | ### PasswordHash | Field | Type | Required | Description | | --- | --- | --- | --- | | `hasher` | "bcrypt" \| "argon2" \| "scrypt" \| "firebase_scrypt" \| "pbkdf2" \| "django" \| "werkzeug" \| "aspnet_identity" \| "wordpress" \| "ldap" \| "digest" | | | | `params` | PasswordHashParams | | | | `salt` | string | | | | `value` | string | | | ### ImportedTOTP | Field | Type | Required | Description | | --- | --- | --- | --- | | `algorithm` | string | | Algorithm, Digits and Period, when the exporter states them, must be SHA1, 6 and 30. | | `digits` | integer | | | | `period` | integer | | | | `recovery_codes` | string[] | | RecoveryCodes (at most 16) are stored hashed; each works once. | | `secret` | string | | Secret is base32, 16 to 64 characters. | ### PasswordHashParams | Field | Type | Required | Description | | --- | --- | --- | --- | | `algorithm` | "md5" \| "sha1" \| "sha256" \| "sha512" | | | | `digest` | "sha1" \| "sha256" \| "sha512" | | | | `encoding` | "hex" \| "base64" | | | | `iterations` | integer | | | | `key_length` | integer | | | | `n` | integer | | | | `normalize` | "nfkc" | | | | `p` | integer | | | | `r` | integer | | | | `salt_encoding` | "utf8" \| "hex" \| "base64" | | | | `salt_position` | "none" \| "prefix" \| "suffix" | | | --- # Users Source: https://www.pontive.com/docs/api-reference/management/users Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 invitations to the instance ```http GET https://api.{region}.pontive.com/v1/root/invitations ``` The open invitations to the instance alone (no organization). An expired invitation is not listed. Operation ID: `ListRootInvitations` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invitee_emails` | string[] | | Filter by invitees email | | `invited_by` | string | | Filter by inviter user ID | | `page` | integer | | Page number | | `limit` | integer | | Items per page | | `search` | string | | Search by invitee email | | `sort` | string | | Sort field; prefix with - for descending (e.g. -created_at). Allowed: created_at, updated_at, expires_at, last_sent_at. Default: -created_at | ### Responses - `200` OK: ListInvitationsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## Invite users to the instance ```http POST https://api.{region}.pontive.com/v1/root/invitations ``` Invite people to the instance alone, with no organization: each gets an email whose link lets them create their own account in the app (choosing their own password or sign-in method), and accepting grants nothing else. For people who belong to no organization — in a b2c instance, everyone; in a b2b one, for example the client's own staff. An address that already has an account is skipped (already_registered); one with a pending invitation to the instance has it reissued with a new link. The app must have org_access all. 200 when every address was skipped, 201 when any invitation was sent. Operation ID: `CreateRootInvitations` ### Request body (`application/json`, required): InviteToInstanceRequest Invite payload ### Responses - `200` OK: InvitationResult - `201` Created: InvitationResult - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get an invitation to the instance ```http GET https://api.{region}.pontive.com/v1/root/invitations/{invitation_id} ``` One open invitation to the instance alone (no organization). An organization's invitation is not found here. Operation ID: `GetRootInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invitation_id` | string | yes | Invitation ID | ### Responses - `200` OK: Invitation - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Withdraw an invitation to the instance ```http DELETE https://api.{region}.pontive.com/v1/root/invitations/{invitation_id} ``` Withdraw an invitation to the instance: it is deleted, and its link stops working. Operation ID: `DeleteRootInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invitation_id` | string | yes | Invitation ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `notify_invitee` | boolean | | Email the invitee that the invitation was withdrawn | ### Responses - `204` No Content - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Resend an invitation to the instance ```http POST https://api.{region}.pontive.com/v1/root/invitations/{invitation_id}/resend ``` Send an invitation to the instance again, with a new link; the earlier link stops working. Operation ID: `ResendRootInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `invitation_id` | string | yes | Invitation ID | ### Request body (`application/json`, required): ResendInvitationRequest Resend Invitation payload ### Responses - `200` OK: Invitation - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## List users ```http GET https://api.{region}.pontive.com/v1/users ``` Get a list of users with pagination and filtering Operation ID: `ListUsers` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | | Filter by status | | `email` | string | | Filter by exact email | | `search` | string | | Matches email, name or username, case-insensitively, anywhere in the value | | `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, email, name, username, status. Default: -created_at | | `exclude_organization_id` | string | | Exclude users who are members of this organization (prefixed org_… id) | | `exclude_any_organization` | boolean | | Exclude users who are members of any organization (only unaffiliated users) | | `username` | string | | Exact match on the username: finds a user by it (D17) | | `external_id` | string | | Exact match on the caller's own id for the user: finds a user by it (D17) | | `migration_source_id` | string | | Users with a legacy identity in this migration source (msrc_), pontive-spec 46 | | `legacy_subject` | string | | The user whose id in the system they were imported from is this (exact), in migration_source_id when set | | `password_status` | "none" \| "active" \| "imported" | | Users whose password is none, active, or imported and not yet replaced at a first sign-in | ### Responses - `200` OK: ListUsersResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create user ```http POST https://api.{region}.pontive.com/v1/users ``` Create a new user Operation ID: `CreateUser` ### Request body (`application/json`, required): CreateUserRequest Create User Request ### Responses - `201` Created: User - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Get user by external id ```http GET https://api.{region}.pontive.com/v1/users/external_id/{external_id} ``` Retrieve the user the caller gave this external id: an exact match on the instance-unique external_id. Answers the user or 404. Percent-encode the value. Operation ID: `GetUserByExternalId` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `external_id` | string | yes | The id the caller gave the user | ### Responses - `200` OK: User - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Get user ```http GET https://api.{region}.pontive.com/v1/users/{user} ``` Retrieve one user by their id or their username. A value in the id form (usr_ and 26 base32 characters) is read as the id; anything else as the username. An email is never a path value: find a user by email with GET /users?email=. Every route under /users/{user} takes either. Operation ID: `GetUser` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Responses - `200` OK: User - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update user ```http PATCH https://api.{region}.pontive.com/v1/users/{user} ``` Update an existing user (partial update) Operation ID: `UpdateUser` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Request body (`application/json`, required): UpdateUserRequest Update User Request ### Responses - `200` OK: User - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete user ```http DELETE https://api.{region}.pontive.com/v1/users/{user} ``` Permanently delete a user Operation ID: `DeleteUser` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List a user's authorized apps ```http GET https://api.{region}.pontive.com/v1/users/{user}/authorized-apps ``` The apps a user has granted scopes to through the OAuth consent screen, with the scopes granted. Unpaginated. Operation ID: `ListUserAuthorizedApps` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page, 1 to 100 | ### Responses - `200` OK: ListAuthorizedAppsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Revoke a user's authorized app ```http DELETE https://api.{region}.pontive.com/v1/users/{user}/authorized-apps/{app_id} ``` Withdraw a user's consent to an app: the grant and the user's refresh tokens at that app are deleted, so the app must ask again. The user's session stays. An app the user has not authorized reads as 404. Operation ID: `DeleteUserAuthorizedApp` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | | `app_id` | string | yes | App ID | ### Responses - `204` Consent withdrawn - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Deactivate user ```http POST https://api.{region}.pontive.com/v1/users/{user}/deactivate ``` Deactivate a user Operation ID: `DeactivateUser` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Responses - `200` OK: User - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List a user's groups ```http GET https://api.{region}.pontive.com/v1/users/{user}/groups ``` List the groups a user belongs to Operation ID: `ListUserGroups` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListGroupsResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse ## List memberships for a user ```http GET https://api.{region}.pontive.com/v1/users/{user}/memberships ``` List a user's memberships across every container kind — the instance root, organizations and resources (D4) — read-only; memberships are written on their container. resource_type narrows them to one kind of container by its registry key (root, org or a custom type key, D44). Each carries its container's name and external_id. Operation ID: `ListUserMemberships` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `resource_type` | string | | Only the memberships on containers of this type: root, org or a custom type key (D44) | | `organization_id` | string | | Only the memberships on this organization's resources, at any depth (what removing the user from it also removes) | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListUserMembershipsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Activate user ```http POST https://api.{region}.pontive.com/v1/users/{user}/reactivate ``` Activate a deactivated user Operation ID: `ReactivateUser` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Responses - `200` OK: User - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List user sessions ```http GET https://api.{region}.pontive.com/v1/users/{user}/sessions ``` List the OP sessions belonging to a user — the records that a browser is signed in, independent of any token issued. The response carries no session secret: the id is the public OIDC sid claim. Operation ID: `ListUserSessions` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListUserSessionsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse - `501` Not Implemented: ErrResponse ## Revoke user session ```http POST https://api.{region}.pontive.com/v1/users/{user}/sessions/{session_id}/revoke ``` End one of a user's sessions. Every grant consults the same flag afterwards, so no token has to be found or enumerated. A session belonging to a different user reads as 404. Operation ID: `RevokeUserSession` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `user` | string | yes | The user's id, or their username | | `session_id` | string | yes | Session ID | ### Responses - `204` Session revoked successfully - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListInvitationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Invitation[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### InviteToInstanceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | AppID is the application the invitee creates their account in: whose sign-in domain the link points at, whose branding and flows they see, and whose initiate_login_uri they land on. Its org_access must be all, since the invitee joins no organization. Optional when exactly one active app of the instance has it; required when several do. | | `emails` | string[] | yes | | | `message` | string | | | ### InvitationResult | Field | Type | Required | Description | | --- | --- | --- | --- | | `invitations` | Invitation[] | | Invitations are the invitations sent: new ones, and live ones an address already held to the same target, reissued with this request's roles and a new link (resend_count > 0) — the earlier link stops working. | | `object` | string | | | | `organization_id` | string | | OrganizationID is the organization invited into; absent for an invitation to the instance. | | `skipped` | SkippedInvitee[] | | Skipped are the addresses that got no invitation, and why. Skipping is not an error: a request whose every address was skipped still succeeds. | ### Invitation | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `expires_at` | string | | | | `id` | string | | | | `invited_by` | InvitedBy | | InvitedBy is the user of the instance who sent it. Absent when a service account or a Pontive operator (from the dashboard) sent it. | | `invitee_email` | string | | | | `last_sent_at` | string | | | | `message` | string | | | | `object` | string | | | | `organization_id` | string | | OrganizationID is the organization the invitee joins; absent for an invitation to the instance alone. | | `resend_count` | integer | | | | `resource_id` | string | | ResourceID is the resource of the organization the invitation also grants membership of, with ResourceRoles; absent for an invitation to the organization alone. | | `resource_roles` | RoleRef[] | | | | `resource_type` | string | | | | `roles` | RoleRef[] | | | | `updated_at` | string | | | ### ResendInvitationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `message` | string | | | | `new_expire_at` | string | | | ### ListUsersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | User[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### CreateUserRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `address` | Address | | | | `birthdate` | string | | | | `email` | string | yes | | | `email_verified` | boolean | | | | `external_id` | string | | ExternalID is your own id for this user, unique per project environment. | | `family_name` | string | | | | `gender` | string | | | | `given_name` | string | | | | `locale` | string | | | | `metadata` | Metadata | | | | `middle_name` | string | | | | `name` | string | | | | `nickname` | string | | | | `password` | string | | | | `password_change_required` | boolean | | | | `phone` | string | | | | `phone_verified` | boolean | | | | `picture` | string | | | | `private_metadata` | Metadata | | | | `profile` | string | | | | `readonly_metadata` | Metadata | | | | `username` | string | | | | `website` | string | | | | `zoneinfo` | string | | | ### User | Field | Type | Required | Description | | --- | --- | --- | --- | | `address` | Address | | | | `birthdate` | string | | | | `created_at` | string | | | | `email` | string | | | | `email_verified` | boolean | | | | `external_id` | string | | ExternalID is your own id for this user, unique per project environment; the access-token claims template reads it as user.external_id. | | `family_name` | string | | | | `gender` | string | | | | `given_name` | string | | | | `id` | string | | | | `instance_id` | string | | | | `legacy_identities` | LegacyIdentity[] | | LegacyIdentities are the user's ids in the systems they were imported from. Read-only. | | `locale` | string | | | | `metadata` | Metadata | | | | `middle_name` | string | | | | `name` | string | | | | `nickname` | string | | | | `object` | string | | | | `password_change_required` | boolean | | | | `password_status` | "none" \| "active" \| "imported" | | PasswordStatus is none, active (a password set in Pontive) or imported (a hash imported from another system, replaced at the user's first sign-in; pontive-spec 46 §4.6). Read-only. | | `phone` | string | | | | `phone_verified` | boolean | | | | `picture` | string | | | | `private_metadata` | Metadata | | | | `profile` | string | | | | `status` | "active" \| "deleted" \| "deactivated" | | | | `updated_at` | string | | | | `username` | string | | | | `website` | string | | | | `zoneinfo` | string | | | ### UpdateUserRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `address` | Address | | | | `birthdate` | string | | | | `email` | string | | | | `email_verified` | boolean | | | | `external_id` | string | | ExternalID is your own id for this user, unique per project environment. Set to "" to clear. | | `family_name` | string | | | | `gender` | string | | | | `given_name` | string | | | | `locale` | string | | | | `metadata` | Metadata | | | | `middle_name` | string | | | | `name` | string | | | | `nickname` | string | | | | `password_change_required` | boolean | | | | `phone` | string | | | | `phone_verified` | boolean | | | | `picture` | string | | | | `private_metadata` | Metadata | | | | `profile` | string | | | | `readonly_metadata` | Metadata | | | | `username` | string | | | | `website` | string | | | | `zoneinfo` | string | | | ### ListAuthorizedAppsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | AuthorizedApp[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ListGroupsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Group[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ListUserMembershipsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | UserMembership[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ListUserSessionsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Session[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### 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. | ### SkippedInvitee | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `reason` | "already_member" \| "already_registered" | | Reason is already_member: a member of the target already (an invite does not change a member's roles); or, for an invitation to the instance, already_registered: the address already has an account. | ### InvitedBy InvitedBy is the user of the instance who sent it. Absent when a service account or a Pontive operator (from the dashboard) sent it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `name` | string | | | ### RoleRef | Field | Type | Required | Description | | --- | --- | --- | --- | | `key` | string | | | | `name` | string | | | ### Address | Field | Type | Required | Description | | --- | --- | --- | --- | | `country` | string | | | | `formatted` | string | | | | `locality` | string | | | | `postal_code` | string | | | | `region` | string | | | | `street_address` | string | | | ### Metadata Type: Record ### LegacyIdentity | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `migration_source_id` | string | | | | `subject` | string | | | ### AuthorizedApp | Field | Type | Required | Description | | --- | --- | --- | --- | | `apis` | AuthorizedAPI[] | | APIs are the registered APIs the user granted the app scopes on, each with that API's scopes (pontive-spec 40 §5, 44 §3.4). Scopes above are the app's own grant: its OIDC and pontive: scopes. | | `app_id` | string | | | | `app_name` | string | | | | `created_at` | string | | CreatedAt is when the user first consented; UpdatedAt when the grant last changed. | | `logo_url` | string | | LogoURL is the app's consent-screen logo; empty when it has none. | | `scopes` | string[] | | Scopes are the scopes the user has granted the app. | | `updated_at` | string | | | ### Group | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `external_id` | string | | | | `id` | string | | | | `member_count` | integer | | | | `metadata` | core_group_types.Metadata | | Metadata replaces the group's metadata when set. | | `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: root, org, or the owning resource's type key. | | `updated_at` | string | | | ### UserMembership | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `instance_id` | string | | | | `joined_at` | string | | | | `last_active_at` | string | | | | `object` | string | | | | `resource_external_id` | string | | ResourceExternalID is the container's external_id, the caller's own id for the organization or resource, when it has one. | | `resource_id` | string | | | | `resource_name` | string | | | | `resource_type` | string | | | | `roles` | RoleRef[] | | | | `updated_at` | string | | | | `user_id` | string | | | ### Session | Field | Type | Required | Description | | --- | --- | --- | --- | | `acr` | string | | | | `active` | boolean | | Active is identity-svc's own verdict on whether the session may still authorize anything, so clients do not re-derive "not revoked and not expired" and get it subtly wrong. | | `amr` | string[] | | | | `app_id` | string | | AppID is the app the user signed in through — the session's origin, not a restriction on which apps it can authorize. | | `auth_time` | string | | AuthTime, ACR and AMR are what the user actually did to authenticate. | | `clients` | string[] | | Clients are the apps issued tokens through this session. | | `created_at` | string | | CreatedAt is when the session record was written, and the order the listing comes back in. | | `expires_at` | string | | ExpiresAt is fixed at creation rather than sliding on use, so a stolen cookie cannot be kept alive indefinitely by using it. | | `id` | string | | | | `ip_address` | string | | | | `object` | string | | | | `revoked_at` | string | | RevokedAt is null for a session that was not revoked. Revocation is recorded rather than deleted so the expired-vs-revoked distinction survives for audit. | | `user_agent` | string | | UserAgent and IPAddress are what the browser looked like at sign-in. They exist so a reader can recognize a session — "that one is not mine" — and for nothing else: identity-svc authenticates nothing against them and refuses no session for a mismatch. IPAddress is a single validated address or empty, never the raw X-Forwarded-For chain, so it is safe to render. Both are personal data about an end user. This is an operator-facing surface, so reads of it should be audited even though the endpoint itself is not gated yet. | | `user_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. | ### AuthorizedAPI | Field | Type | Required | Description | | --- | --- | --- | --- | | `api_id` | string | | | | `name` | string | | | | `scopes` | string[] | | | ### core_group_types.Metadata Metadata replaces the group's metadata when set. Type: Record --- # Webhooks Source: https://www.pontive.com/docs/api-reference/management/webhooks Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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 event types ```http GET https://api.{region}.pontive.com/v1/webhooks/event-types ``` List system and custom event types. Operation ID: `ListWebhookEventTypes` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `type` | string | | Filter by kind (system\|custom) | | `scope` | string | | Filter by scope (project\|organization) | | `name` | string | | Partial name match | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListEventTypesResponse - `400` Bad Request: ErrResponse ## Get event type ```http GET https://api.{region}.pontive.com/v1/webhooks/event-types/{event_type_name} ``` Operation ID: `GetWebhookEventType` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_type_name` | string | yes | Event type name (e.g. user.created) | ### Responses - `200` OK: EventType - `404` Not Found: ErrResponse ## List events ```http GET https://api.{region}.pontive.com/v1/webhooks/events ``` Query events for inspection, walked by cursor (api-route-review D41): newest first, next_cursor passed as before to page back (null at the end), or as after to poll for what was created since, oldest first. Operation ID: `ListWebhookEvents` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `type` | string | | Filter by event type | | `organization_id` | string | | Filter by organization (org_…) | | `from` | string | | RFC 3339: created at or after | | `to` | string | | RFC 3339: created before | | `after` | string | | Cursor: events created after it, oldest first (polling) | | `before` | string | | Cursor: older events, newest first | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListEventsResponse - `400` Bad Request: ErrResponse ## Get event ```http GET https://api.{region}.pontive.com/v1/webhooks/events/{event_id} ``` Operation ID: `GetWebhookEvent` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `event_id` | string | yes | Event id (evt_…) | ### Responses - `200` OK: Event - `404` Not Found: ErrResponse ## List webhook subscriptions ```http GET https://api.{region}.pontive.com/v1/webhooks/subscriptions ``` List webhook subscriptions with filtering and pagination. A token acting for a user through an actor (RFC 8693 act) sees each custom header's name with the value "••••••". Operation ID: `ListWebhookSubscriptions` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `scope` | string | | Filter by scope (project\|organization) | | `status` | string | | Filter by status (active\|paused\|failing\|disabled) | | `organization_id` | string | | Filter organization-scope subscriptions by organization (org_…) | | `sort` | string | | Sort field; prefix with - for descending. Allowed: created_at, updated_at, status, url. Default: -created_at | | `page` | integer | | Page number | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListSubscriptionsResponse - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `500` Internal Server Error: ErrResponse ## Create webhook subscription ```http POST https://api.{region}.pontive.com/v1/webhooks/subscriptions ``` Register an endpoint for event delivery. The Standard Webhooks signing secret ("whsec_…") is returned ONLY in this response — store it now. Omit scope (or pass "project") for a client subscription; scope "organization" with organization_id creates an organization self-service subscription. Operation ID: `CreateWebhookSubscription` ### Request body (`application/json`, required): CreateSubscriptionRequest Create subscription payload ### Responses - `201` Created: Subscription - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` instance_unclaimed: the instance is unclaimed; claim this instance to subscribe to webhooks (pontive-spec 47): ErrResponse - `500` Internal Server Error: ErrResponse ## Get webhook subscription ```http GET https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id} ``` A token acting for a user through an actor (RFC 8693 act) sees each custom header's name with the value "••••••". Operation ID: `GetWebhookSubscription` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | ### Responses - `200` OK: Subscription - `404` Not Found: ErrResponse ## Update webhook subscription ```http PATCH https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id} ``` Patch mutable fields (url, description, event_types, headers, metadata). A token acting for a user through an actor (RFC 8693 act) may not set headers (403 actor_refused: custom headers can hold credentials) and sees them masked ("••••••") in the response. Operation ID: `UpdateWebhookSubscription` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | ### Request body (`application/json`, required): UpdateSubscriptionRequest Update payload ### Responses - `200` OK: Subscription - `400` Bad Request: ErrResponse - `403` instance_unclaimed: the instance is unclaimed; claim this instance to subscribe to webhooks (pontive-spec 47): ErrResponse - `404` Not Found: ErrResponse ## Delete webhook subscription ```http DELETE https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id} ``` Operation ID: `DeleteWebhookSubscription` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | ### Responses - `204` No Content - `404` Not Found: ErrResponse ## List deliveries ```http GET https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id}/deliveries ``` List a subscription's delivery attempts (full request/response records), walked by cursor as the events are (api-route-review D41). A token acting for a user through an actor (RFC 8693 act) sees the recorded request and response headers' names with the value "••••••". Operation ID: `ListWebhookDeliveries` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | | Filter by status (pending\|inflight\|success\|failed\|error) | | `event_id` | string | | Filter by event (evt_…) | | `from` | string | | RFC 3339: created at or after | | `to` | string | | RFC 3339: created before | | `after` | string | | Cursor: attempts made after it, oldest first (polling) | | `before` | string | | Cursor: older attempts, newest first | | `limit` | integer | | Items per page | ### Responses - `200` OK: ListDeliveriesResponse - `400` Bad Request: ErrResponse ## Get delivery ```http GET https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id}/deliveries/{delivery_id} ``` A token acting for a user through an actor (RFC 8693 act) sees the recorded request and response headers' names with the value "••••••". Operation ID: `GetWebhookDelivery` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | | `delivery_id` | string | yes | Delivery id (del_…) | ### Responses - `200` OK: Delivery - `404` Not Found: ErrResponse ## Retry delivery ```http POST https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id}/deliveries/{delivery_id}/retry ``` Manually re-attempt a failed or errored delivery: a fresh attempt is scheduled immediately and the prior attempt's retried_by is set to it. Allowed once per attempt — one that already has a successor (automatic rung or earlier manual retry) answers 409. Operation ID: `RetryWebhookDelivery` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | | `delivery_id` | string | yes | Delivery id (del_…) | ### Responses - `202` Accepted: Delivery - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse ## Pause webhook subscription ```http POST https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id}/pause ``` Operation ID: `PauseWebhookSubscription` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | ### Responses - `200` OK: Subscription - `404` Not Found: ErrResponse ## Resume webhook subscription ```http POST https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id}/resume ``` Reactivate a paused, failing, or disabled subscription. Operation ID: `ResumeWebhookSubscription` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | ### Responses - `200` OK: Subscription - `404` Not Found: ErrResponse ## Rotate webhook signing secret ```http POST https://api.{region}.pontive.com/v1/webhooks/subscriptions/{subscription_id}/rotate-secret ``` Mint a new Standard Webhooks signing secret. The previous secret keeps signing beside the new one for expire_previous_in seconds (0 to 604800, default 86400; 0 ends it now): during the overlap each delivery's webhook-signature header carries one signature per secret, so subscribers rotate with zero downtime. The NEW plaintext secret is returned only here. Operation ID: `RotateWebhookSecret` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subscription_id` | string | yes | Subscription id (whs_…) | ### Request body (`application/json`): RotateSecretRequest Rotation options ### Responses - `200` OK: Subscription - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse ## Get webhook usage ```http GET https://api.{region}.pontive.com/v1/webhooks/usage ``` Billing-relevant delivery counters for a period (YYYY-MM; defaults to the current month). Operation ID: `GetWebhookUsage` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `period` | string | | Billing period (YYYY-MM) | ### Responses - `200` OK: Usage - `400` Bad Request: ErrResponse ## Schemas ### ListEventTypesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | EventType[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### EventType | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `description` | string | | | | `name` | string | | | | `object` | string | | | | `payload_schema` | string | | | | `schema_mode` | "strict" \| "lenient" | | | | `scope` | "project" \| "organization" | | | | `type` | "system" \| "custom" | | | | `updated_at` | string | | | ### ListEventsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Event[] | | | | `next_cursor` | string | | | | `object` | string | | | ### Event | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `data` | object | | | | `id` | string | | | | `object` | string | | | | `organization_id` | string | | | | `previous_attributes` | object | | | | `source` | "system" \| "custom" \| "meta" \| "test" | | | | `type` | string | | | ### ListSubscriptionsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Subscription[] | | | | `object` | string | | | | `pagination` | Pagination | | Pagination is the page answered (api-route-review D9). | ### CreateSubscriptionRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_private_ips` | boolean | | | | `description` | string | | | | `event_types` | string[] | yes | | | `headers` | Headers | | | | `metadata` | Metadata | | | | `organization_id` | string | | | | `scope` | "project" \| "organization" | | | | `url` | string | yes | | ### Subscription | Field | Type | Required | Description | | --- | --- | --- | --- | | `allow_private_ips` | boolean | | | | `created_at` | string | | | | `description` | string | | | | `event_types` | string[] | | | | `headers` | Headers | | | | `id` | string | | | | `instance_id` | string | | | | `last_failure` | SubscriptionLastFailure | | | | `metadata` | Metadata | | | | `object` | string | | | | `organization_id` | string | | | | `scope` | "project" \| "organization" | | | | `secret` | string | | Secret is the plaintext Standard Webhooks signing secret ("whsec_…"). Present only in create/rotate-secret responses; never readable again. | | `secret_preview` | string | | | | `stats` | SubscriptionStats | | | | `status` | "active" \| "paused" \| "failing" \| "disabled" | | | | `updated_at` | string | | | | `url` | string | | | ### UpdateSubscriptionRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | | | `event_types` | string[] | | | | `headers` | Headers | | | | `metadata` | Metadata | | | | `url` | string | | | ### ListDeliveriesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Delivery[] | | | | `next_cursor` | string | | | | `object` | string | | | ### Delivery | Field | Type | Required | Description | | --- | --- | --- | --- | | `attempt_number` | integer | | | | `created_at` | string | | | | `delivered_at` | string | | | | `duration_ms` | integer | | | | `error` | string | | | | `event_id` | string | | | | `id` | string | | | | `next_retry_at` | string | | | | `object` | string | | | | `request` | DeliveryRequestInfo | | | | `response` | DeliveryResponseInfo | | | | `response_code` | integer | | | | `retried_by` | string | | RetriedBy is the id of the attempt that superseded this one — the next automatic rung or a manual retry. Absent until a successor exists; an attempt that has one cannot be retried again. | | `status` | "pending" \| "inflight" \| "success" \| "failed" \| "error" | | | | `subscription_id` | string | | | ### RotateSecretRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `expire_previous_in` | integer | | ExpirePreviousIn is how long the previous signing secret keeps signing beside the new one, in seconds: 0 to 604800; absent is 86400, and 0 ends it now. | ### Usage | Field | Type | Required | Description | | --- | --- | --- | --- | | `deliveries_count` | integer | | | | `failed_count` | integer | | | | `object` | string | | | | `period` | string | | | | `retried_count` | 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. | ### Headers Type: Record ### Metadata Type: Record ### SubscriptionLastFailure | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | string | | | | `response_code` | integer | | | | `timestamp` | string | | | ### SubscriptionStats | Field | Type | Required | Description | | --- | --- | --- | --- | | `last_24h` | { delivered: integer; failed: integer } | | | ### DeliveryRequestInfo | Field | Type | Required | Description | | --- | --- | --- | --- | | `headers` | Record | | | | `method` | string | | | | `url` | string | | | ### DeliveryResponseInfo | Field | Type | Required | Description | | --- | --- | --- | --- | | `body_preview` | string | | | | `code` | integer | | | | `headers` | Record | | | ### 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. | --- # 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 ` 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. | --- # AuthZEN Source: https://www.pontive.com/docs/api-reference/authz/authzen Base URL: `https://authz.{region}.pontive.com` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## AuthZEN discovery ```http GET https://authz.{region}.pontive.com/.well-known/authzen-configuration ``` The decision point's metadata (OpenID AuthZEN Authorization API 1.0, §9): its identifier and the endpoints it serves. Public. Operation ID: `GetAuthZENConfiguration` ### Responses - `200` OK: AuthZENConfiguration ## Evaluate access ```http POST https://authz.{region}.pontive.com/access/v1/evaluation ``` AuthZEN Access Evaluation (OpenID AuthZEN Authorization API 1.0, §6): may the subject do the action on the resource. The subject is a user (usr_), a service account (svc_), an agent (agt_), or a token — an access token of this instance as subject.id: a token acting for a user through an agent is answered for the (user, agent) pair, within its organization and while its delegation is live, and the decision's context echoes the verified principal so the caller applies its own scope check. context.actor names an agent acting for a user subject: only what both may do is allowed. A token that does not verify is refused 400 invalid_token. Inherited roles are resolved through the resource graph. Needs sys:authz:check. A check on a custom resource type bills as one authorization check. Callers: a management credential asks about any subject; any other access token of the instance only about itself, subject {"type": "token"} or its own subject by id, and is refused 403 for any other (D24, D48). Operation ID: `EvaluateAccess` ### Request body (`application/json`, required): AuthZENEvaluation subject, action, resource, context ### Responses - `200` OK: AuthZENDecision - `400` invalid_token, actor_invalid, invalid_request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Evaluate access, many questions ```http POST https://authz.{region}.pontive.com/access/v1/evaluations ``` AuthZEN Access Evaluations (OpenID AuthZEN Authorization API 1.0, §7): up to 100 questions, answered in the order asked. The request's own subject, action, resource and context are the defaults each evaluation's own keys override; with no evaluations it is a single evaluation, answered as one. options.evaluations_semantic is execute_all (the default), deny_on_first_deny (stop at the first denial) or permit_on_first_permit (stop at the first permit): the answer then ends with the evaluation that stopped it. Subjects, tokens and context.actor are named as in an evaluation. Needs sys:authz:check. Each check on a custom resource type bills as one authorization check. Callers: a management credential asks about any subject; any other access token of the instance only about itself, subject {"type": "token"} or its own subject by id, and is refused 403 for any other (D24, D48). Operation ID: `EvaluateAccessBatch` ### Request body (`application/json`, required): AuthZENEvaluationsRequest defaults, evaluations and options ### Responses - `200` OK: AuthZENEvaluationsResponse - `400` invalid_token, actor_invalid, invalid_request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Search actions ```http POST https://authz.{region}.pontive.com/access/v1/search/action ``` AuthZEN Action Search (OpenID AuthZEN Authorization API 1.0, §8.6): the actions the subject may take on the resource. For a subject named by id or by an access token, identity-svc checks every permission of the resource's type on the object, as an evaluation is checked, and answers those held in key order; context.actions narrows the answer to the ones asked about, and context.actor names an agent acting for a user subject. For the caller itself — subject {"type": "token"} with no id — context.actions names the catalog permissions (sys::, at most 32) to ask about on the target instance (resource {"type": "root"}): what a client hides or disables by, never the decision. Needs sys:authz:check; the caller's own question needs nothing. Callers: a management credential asks about any subject; any other access token of the instance only about itself, subject {"type": "token"} or its own subject by id, and is refused 403 for any other (D24, D48). Operation ID: `SearchActions` ### Request body (`application/json`, required): AuthZENSearchRequest subject, resource, context ### Responses - `200` OK: AuthZENActionSearchResponse - `400` invalid_token, actor_invalid, invalid_request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Search resources ```http POST https://authz.{region}.pontive.com/access/v1/search/resource ``` AuthZEN Resource Search (OpenID AuthZEN Authorization API 1.0, §8.5): the resources of resource.type the subject may do action.name on, directly or by inheritance, each with its name, organization, parent and the roles held as properties. Subjects, tokens and context.actor are named as in an evaluation; a delegated subject lists what the (user, agent) pair both reach. context takes Pontive's filters: organization_id, parent_id, direct_only, include_ancestors. Pages by page.token and page.limit (1 to 100); page.next_token is "" on the last page. Needs sys:authz:check for a token or an actor; a subject alone needs what reading that principal does (sys:user:read, sys:sa:read or sys:agent:read). Bills as one authorization check. Callers: a management credential asks about any subject; any other access token of the instance only about itself, subject {"type": "token"} or its own subject by id, and is refused 403 for any other (D24, D48). Operation ID: `SearchResources` ### Request body (`application/json`, required): AuthZENSearchRequest subject, action, resource {type}, context, page ### Responses - `200` OK: AuthZENResourceSearchResponse - `400` invalid_token, delegated_permission_required, actor_invalid, invalid_request: ErrResponse - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` The resource type does not exist: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### AuthZENConfiguration | Field | Type | Required | Description | | --- | --- | --- | --- | | `access_evaluation_endpoint` | string | | | | `access_evaluations_endpoint` | string | | | | `policy_decision_point` | string | | | | `search_action_endpoint` | string | | | | `search_resource_endpoint` | string | | | ### AuthZENEvaluation | Field | Type | Required | Description | | --- | --- | --- | --- | | `action` | AuthZENAction | | | | `context` | Record | | Context carries Pontive's extras: actor, an agent (agt_) acting for the user subject, which can only narrow the decision. | | `resource` | AuthZENResource | | | | `subject` | AuthZENSubject | | | ### AuthZENDecision | Field | Type | Required | Description | | --- | --- | --- | --- | | `context` | Record | | Context is, for a token subject, the verified principal (principal: sub, act, aud, scope, client_id, org_id), for the caller's own scope check. | | `decision` | boolean | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### AuthZENEvaluationsRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `action` | AuthZENAction | | | | `context` | Record | | Context carries Pontive's extras: actor, an agent (agt_) acting for the user subject, which can only narrow the decision. | | `evaluations` | AuthZENEvaluation[] | | | | `options` | AuthZENOptions | | | | `resource` | AuthZENResource | | | | `subject` | AuthZENSubject | | | ### AuthZENEvaluationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `evaluations` | AuthZENDecision[] | | | ### AuthZENSearchRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `action` | AuthZENAction | | | | `context` | Record | | Context carries Pontive's extras: actor; for a resource search organization_id, parent_id, direct_only and include_ancestors; for an action search actions, the action names to ask about (required for the caller's own token, at most 32). | | `page` | AuthZENPage | | | | `resource` | AuthZENResource | | | | `subject` | AuthZENSubject | | | ### AuthZENActionSearchResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `results` | AuthZENAction[] | | | ### AuthZENResourceSearchResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `page` | AuthZENPageResult | | | | `results` | AuthZENResource[] | | | ### AuthZENAction | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | | | | `properties` | Record | | | ### AuthZENResource | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `properties` | Record | | | | `type` | string | | | ### AuthZENSubject | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | | | `properties` | Record | | Properties are accepted and not read. | | `type` | "user" \| "service_account" \| "agent" \| "token" | | Type is user, service_account, agent, or token (an access token of this instance as the id). | ### 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. | ### AuthZENOptions | Field | Type | Required | Description | | --- | --- | --- | --- | | `evaluations_semantic` | "execute_all" \| "deny_on_first_deny" \| "permit_on_first_permit" | | EvaluationsSemantic is execute_all (the default), deny_on_first_deny or permit_on_first_permit. | ### AuthZENPage | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | | | `properties` | Record | | | | `token` | string | | | ### AuthZENPageResult | Field | Type | Required | Description | | --- | --- | --- | --- | | `count` | integer | | | | `next_token` | string | | | | `total` | integer | | | ### 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. | --- # Billing entitlements Source: https://www.pontive.com/docs/api-reference/authz/billing-entitlements Base URL: `https://authz.{region}.pontive.com` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/entitlements/check ```http POST https://authz.{region}.pontive.com/v1/entitlements/check ``` billing.entitlement.v1.EntitlementService/CheckEntitlement (39-entitlements-and-controls.md, API Surface; Check, list, consume). No side effects. A denial is a 200 with allowed false and a reason (not_entitled, allowance_exhausted, balance_exhausted, access_restricted), never an error (Error Handling). value is the feature's value: true, a decimal string, or a metered feature's allowance; when the Customer is not entitled to it, false for a boolean feature and null otherwise. limit is a metered feature's state, null for other types. Only external subjects resolve until Phase 4. The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. Operation ID: `CheckEntitlement` · Capability: `billing` ### Responses - `200` An entitlement_check object: { allowed, value, reason, limit }: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/entitlements/consume ```http POST https://authz.{region}.pontive.com/v1/entitlements/consume ``` billing.entitlement.v1.EntitlementService/ConsumeEntitlement (39-entitlements-and-controls.md, API Surface; Check, list, consume). Resolves, decides as a check would and, when allowed, records the usage event, in one transaction. Idempotent on transaction_id, not on X-Idempotency-Key, which is not read: a retry of an allowed consume answers the first decision with replayed true and consumes nothing again; a denied consume records nothing and is decided again on retry (billing-svc docs/questions.md, P9). A denial is a 200 with allowed false and a reason, never an error. properties is a JSON object, kept as sent. The usage event is checked against its event type's schema as ingest checks it: with validation warn, an allowed consume lists warnings, each { code, property, expected }; with reject, one that does not fit is refused with 422 schema_mismatch and records nothing: the error's details list each violation as { field: its property, message: its code and what was expected } (billing-svc docs/questions.md, P99, P111). Operation ID: `ConsumeEntitlement` · Capability: `billing` ### Responses - `200` An entitlement_consumption object: { allowed, value, reason, limit, event_id, replayed, warnings }: Object - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing for the end customer Source: https://www.pontive.com/docs/api-reference/authz/billing-for-the-end-customer Base URL: `https://authz.{region}.pontive.com` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/me/entitlements/check ```http POST https://authz.{region}.pontive.com/v1/me/entitlements/check ``` billing.entitlement.v1.MeEntitlementService/CheckMyEntitlement (39-entitlements-and-controls.md, API Surface). The body is { feature, quantity? }. Under pontive:billing:read (41-embedded-organization-management.md, section 5.1). An instance user's token must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48). The RPC writes nothing and takes no idempotency key, so X-Idempotency-Key is not read. Operation ID: `CheckMyEntitlement` · Capability: `billing` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `subject_type` | string | | user or organization: the subject whose Customer to act for; with subject_id | | `subject_id` | string | | the subject's id, usr_ or org_; with subject_type | ### Responses - `200` An entitlement_check object: allowed, value, reason and limit: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Billing usage Source: https://www.pontive.com/docs/api-reference/ingest/billing-usage Base URL: `https://ingest.{region}.pontive.com` (operations that name another server say so). Authentication: send `Authorization: Bearer ` 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. ## POST /v1/usage/events ```http POST https://ingest.{region}.pontive.com/v1/usage/events ``` billing.metering.v1.UsageService/IngestUsageEvents (33-metering.md, API Surface; Ingestion; Event types and schemas). The body is a JSON array of 1 to 500 events. Only non-accepted results are listed, and accepted events with schema warnings: each result carries warnings (an accepted event under the event type's validation warn) and violations (one rejected with schema_mismatch under reject), each { code, property, expected }. Operation ID: `CreateUsageEvents` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `202` A IngestResult object: Object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## POST /v1/usage/events/void ```http POST https://ingest.{region}.pontive.com/v1/usage/events/void ``` billing.metering.v1.UsageService/VoidUsageEvents (33-metering.md, API Surface). Operation ID: `VoidUsageEvents` · Capability: `billing` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key | ### Responses - `200` The VoidUsageEventsResponse fields: object - `401` Unauthorized: ErrResponse - `403` module_required: the instance's billing capability is off: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `422` Unprocessable Entity: ErrResponse ## Schemas ### Object | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | ID is its prefixed id. | | `object` | string | | Object names the kind: customer, invoice, contract, … | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### 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. | ### 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. | --- # Access Source: https://www.pontive.com/docs/api-reference/platform/access Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## The caller's access to an instance ```http GET https://api.pontive.com/v1/instances/{instance_id}/access ``` The platform permissions the caller holds on the instance, and the roles they hold on it directly Operation ID: `GetInstanceAccess` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Responses - `200` OK: GetAccessResponse - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## The caller's access to a project ```http GET https://api.pontive.com/v1/projects/{project_id}/access ``` The platform permissions the caller holds on the project, and the roles they hold on it directly Operation ID: `GetProjectAccess` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Responses - `200` OK: GetAccessResponse - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## The caller's access to a workspace ```http GET https://api.pontive.com/v1/workspaces/{workspace_id}/access ``` The platform permissions the caller holds on the workspace, and the roles they hold on it directly Operation ID: `GetWorkspaceAccess` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `200` OK: GetAccessResponse - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### GetAccessResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `managed_projects` | string[] | | On a workspace, for a caller who does not manage its members: the ids of its projects whose members they manage (project:members.manage), directly or by inheritance. Absent for whoever manages the workspace's members, who manages every project's. | | `object` | string | | The object type | | `permissions` | string[] | | The platform permission keys the caller holds, through any role — held on the object or inherited from above it | | `roles` | string[] | | The roles the caller holds on the object itself; empty for someone reaching it by inheritance alone | | `staff_role` | string | | The staff role the caller reaches it with, if any enum: pontive_support,pontive_admin,pontive_release | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | --- # Billing Source: https://www.pontive.com/docs/api-reference/platform/billing Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## Get the billing account ```http GET https://api.pontive.com/v1/workspaces/{workspace_id}/billing ``` The workspace's plan and billing interval, the plan a pending downgrade moves it to and when (scheduled_plan, scheduled_plan_at), what it holds (projects, seats, FGA instances, custom domains), what its plan grants, and the Free checklist. Pontive bills workspaces through billing-svc on the Directory instance: plan and interval changes, payment and invoices are billing's, in its portal on the dashboard's Billing page, not here. Any workspace member reads it. Operation ID: `GetWorkspaceBilling` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `200` OK: BillingAccount - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse ## Workspace usage ```http GET https://api.pontive.com/v1/workspaces/{workspace_id}/usage ``` The current calendar month: every meter pooled across the workspace's instances against its plan's allowances and caps, split by project; tracked token counts; each project and instance. Nothing is priced here. Trails real time by up to 15 minutes. Operation ID: `GetWorkspaceUsage` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `200` OK: WorkspaceUsage - `403` Forbidden: ErrResponse ## Schemas ### BillingAccount | Field | Type | Required | Description | | --- | --- | --- | --- | | `billing_interval` | "monthly" \| "annual" | | monthly or annual: the contract's billing frequency on a paid plan. | | `custom_domains` | integer | | | | `entitlements` | WorkspaceEntitlement | | What the workspace's plan grants, as the console shows it. | | `fga_instances` | integer | | Production instances with Fine-Grained Authorization on, and custom auth domains. | | `has_subscription` | boolean | | Whether the workspace is on a paid plan. | | `plan` | string | | The workspace's plan, and when it last changed. It follows the package of the workspace's contract on the directory instance, changed in billing's portal on the Billing page. | | `plan_changed_at` | string (date-time) | | | | `projects` | ProjectCounts | | Projects: the plan's included slots, the live ones, those beyond the slots, the b2b ones, the paused ones. | | `scheduled_plan` | string | | The plan of the contract's pending change: a downgrade waiting for the end of the period or the term. A pending change of billing interval alone is none. Null while none is pending. | | `scheduled_plan_at` | string (date-time) | | When the scheduled plan applies; null with no scheduled plan. | | `scheduled_plan_blockers` | Blocker[] | | The Free checklist (pontive-spec 10, Downgrade to Free): while a downgrade to Free is pending, what the workspace would hold that Free cannot; while a move to Free keeps it paused, what still does. Null otherwise. | | `seats` | SeatCounts | | Seats: the members, and the plan's included seats. A pending invitation holds no seat. | | `workspace_id` | string | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### WorkspaceUsage | Field | Type | Required | Description | | --- | --- | --- | --- | | `billing_interval` | "monthly" \| "annual" | | | | `meters` | Record | | Meters is every meter pooled across the workspace's instances, production and non-production alike, against the plan's allowances. | | `period` | Period | | | | `plan` | "free" | | | | `projects` | ProjectLine[] | | | | `reported_at` | string | | | | `tracked` | Record | | Tracked holds measured-only counters: tokens issued, by kind. | | `workspace_id` | string | | | ### WorkspaceEntitlement What the workspace's plan grants, as the console shows it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `audit_log_retention_hours` | integer | | How long the audit log's standard entries and the request log are kept, in hours. | | `included_projects` | integer | | Projects and seats the plan includes. | | `included_seats` | integer | | | | `max_non_prod_instances` | integer | | Bounds each project's non-production instances; null is unlimited. | | `modules_available` | string[] | | | | `modules_non_production` | string[] | | | | `name` | string | | | | `plan` | string | | | | `request_log_retention_hours` | integer | | | | `usage` | Record | | | ### ProjectCounts Projects: the plan's included slots, the live ones, those beyond the slots, the b2b ones, the paused ones. | Field | Type | Required | Description | | --- | --- | --- | --- | | `additional` | integer | | | | `b2b` | integer | | | | `included` | integer | | | | `live` | integer | | | | `paused` | integer | | | ### Blocker | Field | Type | Required | Description | | --- | --- | --- | --- | | `count` | integer | | | | `kind` | "seats" \| "fga_instances" \| "custom_domains" | | | ### SeatCounts Seats: the members, and the plan's included seats. A pending invitation holds no seat. | Field | Type | Required | Description | | --- | --- | --- | --- | | `current` | integer | | | | `included` | integer | | | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### MeterUsage | Field | Type | Required | Description | | --- | --- | --- | --- | | `by_project` | Record | | | | `cap` | integer | | | | `included` | integer | | | | `usage` | integer | | | ### Period | Field | Type | Required | Description | | --- | --- | --- | --- | | `end` | string | | | | `source` | string | | Source is "calendar" (the UTC calendar month) or "contract" (the usage period of the workspace's contract on the directory instance, SourceContract). | | `start` | string | | | ### ProjectLine | Field | Type | Required | Description | | --- | --- | --- | --- | | `included` | boolean | | | | `instances` | InstanceLine[] | | | | `name` | string | | | | `project_id` | string | | | | `status` | string | | | | `tenancy_mode` | string | | | ### MeterPrice | Field | Type | Required | Description | | --- | --- | --- | --- | | `cap` | integer | | A hard limit (quota_exceeded); null where there is none. | | `included` | integer | | The allowance before the meter bills; null where it is not billed. | | `per` | integer | | The unit the meter bills in beyond the allowance. | ### InstanceLine | Field | Type | Required | Description | | --- | --- | --- | --- | | `custom_domains` | integer | | | | `environment` | string | | | | `fga` | boolean | | | | `instance_id` | string | | | | `meters` | Record | | | | `name` | string | | | | `reported_at` | string | | | --- # Domains Source: https://www.pontive.com/docs/api-reference/platform/domains Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List domains ```http GET https://api.pontive.com/v1/domains ``` Get a list of domains for an instance Operation ID: `ListDomains` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | | `search` | string | | Search | | `type` | "auth_server" | | Type | ### Responses - `200` OK: ListDomainsResponse - `400` Bad Request: ErrResponse - `500` Internal Server Error: ErrResponse ## Create domain ```http POST https://api.pontive.com/v1/domains ``` Register a hostname against an instance. The domain starts pending and carries the DNS challenge that must be published before it can be activated. Operation ID: `CreateDomain` ### Request body (`application/json`, required): CreateDomainRequest Domain to create ### Responses - `201` Created: CreateDomainResponse - `400` Bad Request: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete domain ```http DELETE https://api.pontive.com/v1/domains/{domain_id} ``` Remove a domain. Refused while any app or service account is still bound to it. Operation ID: `DeleteDomain` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `domain_id` | string | yes | Domain ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Verify domain ```http POST https://api.pontive.com/v1/domains/{domain_id}/verify ``` Check the DNS TXT challenge for a domain and record the outcome. Does not activate the domain; activation is a separate call and is refused until verification has succeeded. Operation ID: `VerifyDomain` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `domain_id` | string | yes | Domain ID | ### Responses - `200` OK: VerifyDomainResponse - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListDomainsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Domain[] | | The list of domains | | `object` | string | | The object type | | `pagination` | Pagination | | The pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateDomainRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `domain` | string | yes | The hostname, e.g. auth.acme.com | | `instance_id` | string | yes | The ID of the instance to add the domain to | ### CreateDomainResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `domain` | Domain | | The created domain. It starts pending, carrying the challenge that must be published before it can be activated. | | `object` | string | | The object type | ### VerifyDomainResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `domain` | Domain | | The created domain. It starts pending, carrying the challenge that must be published before it can be activated. | | `object` | string | | The object type | ### Domain The created domain. It starts pending, carrying the challenge that must be published before it can be activated. | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string (date-time) | | The time when the domain was created | | `domain` | string | | The name of the domain | | `id` | string | | The ID of the domain | | `instance_id` | string | | The ID of the instance the domain is associated with | | `ssl` | DomainSSL | | The SSL information for the domain | | `status` | string | | The status of the domain | | `type` | "auth_server" | | The type of the domain. Always "auth_server". | | `updated_at` | string (date-time) | | The time when the domain was last updated | | `usage` | DomainUsage | | The usage information for the domain | | `verification` | DomainVerification | | The verification information for the domain | ### Pagination The pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | The number of items per page | | `page` | integer | | The page number | | `total` | integer | | The total number of items | | `total_pages` | integer | | The number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### DomainSSL The SSL information for the domain | Field | Type | Required | Description | | --- | --- | --- | --- | | `auto_renew` | boolean | | Whether the SSL certificate is auto-renewed | | `expires_at` | string (date-time) | | The time when the SSL certificate expires; null before it is issued | | `issued_at` | string (date-time) | | The time when the SSL certificate was issued; null before it is | | `issuer` | string | | The issuer of the SSL certificate | ### DomainUsage The usage information for the domain | Field | Type | Required | Description | | --- | --- | --- | --- | | `apps_count` | integer | | The number of apps using the domain | | `service_accounts_count` | integer | | The number of service accounts using the domain | ### DomainVerification The verification information for the domain | Field | Type | Required | Description | | --- | --- | --- | --- | | `challenge` | string | | The value that must appear as a TXT record at Target. Without this the customer can see which record to create but not what to put in it, so it is required for the verification flow to be completable at all. | | `last_check_at` | string (date-time) | | The time when the domain was last checked; null before the first check | | `last_check_error` | string | | The error message from the last check | | `method` | string | | The method used to verify the domain: "dns_txt" for a customer hostname, "platform" for one the platform itself owns | | `target` | string | | The DNS record name the proof is published at, e.g. _pontive-challenge.auth.acme.com | | `verified_at` | string (date-time) | | The time when the domain was verified; null until it is | --- # Instances Source: https://www.pontive.com/docs/api-reference/platform/instances Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List instances ```http GET https://api.pontive.com/v1/instances ``` List the instances of a project or a workspace. One of project_id or workspace_id is required, but for Pontive's staff, who list every instance. A token acting for a Pontive user through an actor (the Pontive MCP server) lists the instances the user's own roles reach, never a staff role's: those of the project or workspace named, else of every workspace the user belongs to. Operation ID: `ListInstances` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | | Filter by project ID | | `workspace_id` | string | | Filter by workspace ID | | `environment` | "production" \| "non_production" | | Filter by environment | | `status` | "active" \| "paused" \| "deleted" | | Filter by the instance's own status | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | ### Responses - `200` OK: ListInstancesResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `500` Internal Server Error: ErrResponse ## Create instance ```http POST https://api.pontive.com/v1/instances ``` Create an instance in a project. name and slug are required for non_production and must be omitted for production, which is always Production/production and limited to one per project. Operation ID: `CreateInstance` ### Request body (`application/json`, required): CreateInstanceRequest Create Instance Request ### Responses - `201` Created: Instance - `400` invalid_environment, invalid_slug, slug_reserved, slug_too_long, instance_name_not_settable: ErrResponse - `403` Forbidden: ErrResponse - `404` project_not_found: ErrResponse - `409` slug_conflict, prod_instance_exists, prod_instance_limit_exceeded, non_prod_instance_limit_exceeded: ErrResponse - `500` Internal Server Error: ErrResponse ## Get instance ```http GET https://api.pontive.com/v1/instances/{instance_id} ``` Get instance details by ID Operation ID: `GetInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Responses - `200` OK: Instance - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` instance_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update instance ```http PATCH https://api.pontive.com/v1/instances/{instance_id} ``` Update an instance. name is writable on non_production instances only; renaming the production instance returns instance_name_not_settable. Operation ID: `UpdateInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Request body (`application/json`, required): UpdateInstanceRequest Update Instance Request ### Responses - `200` OK: Instance - `400` instance_name_not_settable: ErrResponse - `403` Forbidden: ErrResponse - `404` instance_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete instance ```http DELETE https://api.pontive.com/v1/instances/{instance_id} ``` Soft-delete an instance, recoverable for 30 days: it carries purge_scheduled_at, deleted_at plus 30 days, and is purged after it. Requires {"confirm_delete": true}; without it the API returns 400 confirmation_required. A project keeps at least one active instance: deleting its last one returns 409 last_active_instance. A token acting for a Pontive user (the Pontive MCP server) deletes a non_production instance only; the production one is refused with 403 actor_refused, to be deleted in the dashboard. Operation ID: `DeleteInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Request body (`application/json`, required): DeleteInstanceRequest Delete confirmation ### Responses - `204` Instance deleted successfully - `400` confirmation_required: ErrResponse - `403` Forbidden: ErrResponse - `404` instance_not_found: ErrResponse - `409` last_active_instance: ErrResponse - `500` Internal Server Error: ErrResponse ## Pause instance ```http POST https://api.pontive.com/v1/instances/{instance_id}/pause ``` Pause an instance. A project keeps at least one active instance: pausing its last one returns 409 last_active_instance. Operation ID: `PauseInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Responses - `200` OK: Instance - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` instance_not_found: ErrResponse - `409` last_active_instance: ErrResponse - `500` Internal Server Error: ErrResponse ## Purge instance ```http POST https://api.pontive.com/v1/instances/{instance_id}/purge ``` Permanently delete a deleted instance and all its data now, rather than at its purge_scheduled_at, and retire its host label. Cannot be undone. Operation ID: `PurgeInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Responses - `204` Instance purged successfully - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` instance_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Restore instance ```http POST https://api.pontive.com/v1/instances/{instance_id}/restore ``` Restore a soft-deleted instance within 30 days of its deletion, until its purge_scheduled_at (409 restore_window_closed after, when it is purged). Operation ID: `RestoreInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Responses - `200` OK: Instance - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` instance_not_found: ErrResponse - `409` restore_window_closed: ErrResponse - `500` Internal Server Error: ErrResponse ## Resume instance ```http POST https://api.pontive.com/v1/instances/{instance_id}/resume ``` Resume a paused instance Operation ID: `ResumeInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Responses - `200` OK: Instance - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` instance_not_found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListInstancesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Instance[] | | List of instances | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateInstanceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | The description of the instance (0-500 chars) | | `environment` | "production" \| "non_production" | yes | The environment of the instance. A project holds at most one production instance. | | `metadata` | Metadata | | The new metadata | | `name` | string | | The name of the instance (1-100 chars). Required for non_production; must be omitted for production (instance_name_not_settable). | | `project_id` | string | yes | The ID of the project to create the instance in | | `slug` | string | | The slug of the instance (2-20 chars). Required for non_production; must be omitted for production (instance_name_not_settable). | ### Instance | Field | Type | Required | Description | | --- | --- | --- | --- | | `auth_server_domains` | string[] | | All active auth-server domains, canonical first | | `capabilities` | Capabilities | | The per-instance capability switches | | `created_at` | string (date-time) | | The time when the instance was created | | `deleted_at` | string (date-time) | | The time when the instance was deleted, if applicable | | `description` | string | | The description of the instance | | `domain` | string | | The primary (canonical) auth domain | | `effective_status` | "active" \| "paused" \| "deleted" | | The effective status: the project's status overrides the instance's own while the project is not active | | `environment` | "production" \| "non_production" | | The environment of the instance, fixed at creation | | `id` | string | | The unique identifier of the instance | | `metadata` | Metadata | | The new metadata | | `name` | string | | The name of the instance. Always "Production" for the production instance. | | `object` | string | | The object type | | `paused_at` | string (date-time) | | The time when the instance was paused, if applicable | | `project_id` | string | | The ID of the project the instance belongs to | | `purge_scheduled_at` | string (date-time) | | When a deleted instance's restore window ends, deleted_at plus 30 days: it can be restored until then, and is purged after (route review D30). Null unless the instance's own status is is deleted. An instance of a deleted project goes with it, at the project's purge_scheduled_at. | | `region` | "us" \| "eu" \| "au" | | The region, inherited from the project | | `shard_id` | string | | The ID of the shard the instance is deployed on | | `slug` | string | | The slug of the instance. Always "production" for the production instance. Immutable. | | `status` | "active" \| "paused" \| "deleted" | | The instance's own status | | `tenancy_mode` | "b2b" \| "b2c" | | The read-only tenancy mode, inherited from the project | | `updated_at` | string (date-time) | | The time when the instance was last updated | | `workspace_id` | string | | The ID of the workspace that owns the project | ### UpdateInstanceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | The new description | | `metadata` | Metadata | | The new metadata | | `name` | string | | The new name. non_production only; renaming the production instance returns instance_name_not_settable. | ### DeleteInstanceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `confirm_delete` | boolean | | Must be true; without it the API returns 400 confirmation_required. | ### Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Number of records per page | | `page` | integer | | Current page number | | `total` | integer | | Total number of records | | `total_pages` | integer | | Total number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### Metadata The new metadata Type: Record ### Capabilities The per-instance capability switches | Field | Type | Required | Description | | --- | --- | --- | --- | | `billing` | Capability | | Fine-Grained Authorization: custom resource types and everything built on them. | | `fga` | Capability | | Fine-Grained Authorization: custom resource types and everything built on them. | ### Capability Fine-Grained Authorization: custom resource types and everything built on them. | Field | Type | Required | Description | | --- | --- | --- | --- | | `enabled` | boolean | | Whether the capability is enabled | --- # Invitations Source: https://www.pontive.com/docs/api-reference/platform/invitations Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List a project's invitations ```http GET https://api.pontive.com/v1/projects/{project_id}/invitations ``` List the invitations to the project Operation ID: `ListProjectInvitations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `search` | string | | Search term matched against the invitee email | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | ### Responses - `200` OK: ListInvitationsResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Invite to a project ```http POST https://api.pontive.com/v1/projects/{project_id}/invitations ``` Invite people to the project by email. Invitees who are not workspace members join the workspace too, with no role there. Operation ID: `CreateProjectInvitations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Request body (`application/json`, required): InviteProjectMembersRequest Invite Project Members Request ### Responses - `201` Created: InviteMembersResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete a project invitation ```http DELETE https://api.pontive.com/v1/projects/{project_id}/invitations/{invitation_id} ``` Withdraw one of the project's invitations: it is deleted, and its link stops working. Operation ID: `DeleteProjectInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | | `invitation_id` | string | yes | Invitation ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `notify_invitee` | boolean | | Notify the invitee that the invitation was withdrawn | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Resend a project invitation ```http POST https://api.pontive.com/v1/projects/{project_id}/invitations/{invitation_id}/resend ``` Send one of the project's outstanding invitations again Operation ID: `ResendProjectInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | | `invitation_id` | string | yes | Invitation ID | ### Request body (`application/json`): ProjectInvitationRequest Resend Project Invitation Request ### Responses - `200` OK: GetInvitationResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List workspace invitations ```http GET https://api.pontive.com/v1/workspaces/{workspace_id}/invitations ``` Get a list of the workspace's invitations Operation ID: `ListWorkspaceInvitations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `search` | string | | Search term matched against the invitee email | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | ### Responses - `200` OK: ListInvitationsResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Invite members ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/invitations ``` Invite people to the workspace by email Operation ID: `CreateWorkspaceInvitations` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Request body (`application/json`, required): InviteMembersRequest Invite Members Request ### Responses - `201` Created: InviteMembersResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete an invitation ```http DELETE https://api.pontive.com/v1/workspaces/{workspace_id}/invitations/{invitation_id} ``` Withdraw an invitation: it is deleted, and its link stops working. An invitation exists only while it is open — accepting one deletes it too, and an expired one is purged. Operation ID: `DeleteWorkspaceInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | | `invitation_id` | string | yes | Invitation ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `notify_invitee` | boolean | | Notify the invitee that the invitation was withdrawn | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Resend an invitation ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/invitations/{invitation_id}/resend ``` Send an outstanding invitation again Operation ID: `ResendWorkspaceInvitation` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | | `invitation_id` | string | yes | Invitation ID | ### Request body (`application/json`): ResendInvitationRequest Resend Invitation Request ### Responses - `200` OK: GetInvitationResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListInvitationsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Invitation[] | | List of invitations | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### InviteProjectMembersRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `emails` | string[] | | The email addresses to invite required: true | | `message` | string | | An optional message included in the invitation email | | `roles` | string[] | | The roles the invitees will hold on the project once they accept. They join the project's workspace too, with no role there. required: true enum: admin,developer,viewer | ### InviteMembersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Invitation[] | | The invitations sent: new ones, and live ones an address already held, reissued with this request's roles and a new link (resend_count > 0) | | `object` | string | | The object type | | `skipped` | SkippedInvitee[] | | The addresses that got no invitation, and why. Skipping is not an error: a request whose every address was skipped still succeeds. | ### ProjectInvitationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `message` | string | | An optional message replacing the original (resend) | ### GetInvitationResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string (date-time) | | The time when the invitation was created | | `expires_at` | string (date-time) | | The time when the invitation expires | | `id` | string | | The unique identifier of the invitation | | `invited_by` | string | | The user who sent the invitation | | `invitee_email` | string | | The email address the invitation was sent to | | `last_sent_at` | string (date-time) | | The time when the invitation was last sent | | `message` | string | | The message included with the invitation | | `object` | string | | The object type | | `project` | InvitationProject | | For an invitation to a project, the project; absent on one to the workspace alone. | | `project_roles` | string[] | | For an invitation to a project, the roles the invitee will hold on it. The invitee joins the workspace too, with no role there unless Roles names one. enum: admin,developer,viewer | | `resend_count` | integer | | How many times the invitation has been resent | | `roles` | string[] | | The roles the invitee will hold on the workspace once they accept enum: admin,billing,developer | ### InviteMembersRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `emails` | string[] | | The email addresses to invite required: true | | `message` | string | | An optional message included in the invitation email | | `roles` | string[] | | The roles the invitees will hold once they accept. `owner` cannot be granted by invitation — ownership moves through transfer-ownership. enum: admin,billing,developer | ### ResendInvitationRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `message` | string | | An optional message replacing the original | ### Invitation | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string (date-time) | | The time when the invitation was created | | `expires_at` | string (date-time) | | The time when the invitation expires | | `id` | string | | The unique identifier of the invitation | | `invited_by` | string | | The user who sent the invitation | | `invitee_email` | string | | The email address the invitation was sent to | | `last_sent_at` | string (date-time) | | The time when the invitation was last sent | | `message` | string | | The message included with the invitation | | `object` | string | | The object type | | `project` | InvitationProject | | For an invitation to a project, the project; absent on one to the workspace alone. | | `project_roles` | string[] | | For an invitation to a project, the roles the invitee will hold on it. The invitee joins the workspace too, with no role there unless Roles names one. enum: admin,developer,viewer | | `resend_count` | integer | | How many times the invitation has been resent | | `roles` | string[] | | The roles the invitee will hold on the workspace once they accept enum: admin,billing,developer | ### Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Number of records per page | | `page` | integer | | Current page number | | `total` | integer | | Total number of records | | `total_pages` | integer | | Total number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### SkippedInvitee | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `reason` | "already_member" | | already_member: a member already. An invite does not change a member's roles. | ### InvitationProject For an invitation to a project, the project; absent on one to the workspace alone. | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | | The ID of the project | | `name` | string | | The name of the project | --- # Members Source: https://www.pontive.com/docs/api-reference/platform/members Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List an instance's members ```http GET https://api.pontive.com/v1/instances/{instance_id}/members ``` List the users holding roles on the instance itself. Everyone else reaches it through its project and workspace. Operation ID: `ListInstanceMembers` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `search` | string | | Search term matched against name and email | | `roles` | string[] | | Filter by role | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | ### Responses - `200` OK: ListMembersResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Add an instance member ```http POST https://api.pontive.com/v1/instances/{instance_id}/members ``` Grant roles on the instance to a member of its workspace (admin, developer, support or viewer). This is how a workspace member is given production access. Operation ID: `CreateInstanceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Request body (`application/json`, required): AddInstanceMemberRequest Add Instance Member Request ### Responses - `201` Created: GetMemberResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Change an instance member's roles ```http PATCH https://api.pontive.com/v1/instances/{instance_id}/members/{user_id} ``` Replace the roles a member holds on the instance Operation ID: `UpdateInstanceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | | `user_id` | string | yes | User ID | ### Request body (`application/json`, required): UpdateInstanceMemberRolesRequest Update Instance Member Roles Request ### Responses - `200` OK: GetMemberResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Remove an instance member ```http DELETE https://api.pontive.com/v1/instances/{instance_id}/members/{user_id} ``` Remove a member from the instance. They stay a member of the workspace, and of the project if they were one. Operation ID: `DeleteInstanceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | | `user_id` | string | yes | User ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List a project's members ```http GET https://api.pontive.com/v1/projects/{project_id}/members ``` List the users holding roles on the project itself. Workspace members reach every project through the workspace and are listed there. Operation ID: `ListProjectMembers` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `search` | string | | Search term matched against name and email | | `roles` | string[] | | Filter by role | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | ### Responses - `200` OK: ListMembersResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Add a project member ```http POST https://api.pontive.com/v1/projects/{project_id}/members ``` Grant roles on the project to a member of its workspace. Someone who is not a workspace member is invited instead. Operation ID: `CreateProjectMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Request body (`application/json`, required): AddProjectMemberRequest Add Project Member Request ### Responses - `201` Created: GetMemberResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Change a project member's roles ```http PATCH https://api.pontive.com/v1/projects/{project_id}/members/{user_id} ``` Replace the roles a member holds on the project (admin, developer or viewer) Operation ID: `UpdateProjectMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | | `user_id` | string | yes | User ID | ### Request body (`application/json`, required): UpdateProjectMemberRolesRequest Update Project Member Roles Request ### Responses - `200` OK: GetMemberResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Remove a project member ```http DELETE https://api.pontive.com/v1/projects/{project_id}/members/{user_id} ``` Remove a member from the project. They stay a member of the workspace. Operation ID: `DeleteProjectMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | | `user_id` | string | yes | User ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List workspace members ```http GET https://api.pontive.com/v1/workspaces/{workspace_id}/members ``` Get a list of the workspace's members Operation ID: `ListWorkspaceMembers` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `search` | string | | Search term matched against name and email | | `roles` | string[] | | Filter by role | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | ### Responses - `200` OK: ListMembersResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update a member's roles ```http PATCH https://api.pontive.com/v1/workspaces/{workspace_id}/members/{user_id} ``` Replace the roles a member holds in the workspace. Granting owner, or changing an owner's roles, is an owner's; a token acting for a Pontive user (the Pontive MCP server) is refused it with 403 actor_refused, as ownership is the dashboard's. Operation ID: `UpdateWorkspaceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | | `user_id` | string | yes | User ID | ### Request body (`application/json`, required): UpdateMemberRolesRequest Update Member Roles Request ### Responses - `200` OK: GetMemberResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Remove a member ```http DELETE https://api.pontive.com/v1/workspaces/{workspace_id}/members/{user_id} ``` Remove a member from the workspace. Removing an owner is an owner's; a token acting for a Pontive user (the Pontive MCP server) is refused it with 403 actor_refused, as ownership is the dashboard's. Operation ID: `DeleteWorkspaceMember` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | | `user_id` | string | yes | User ID | ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## List a member's grants ```http GET https://api.pontive.com/v1/workspaces/{workspace_id}/members/{user_id}/grants ``` The roles a workspace member holds on the workspace's projects and instances directly, on top of what their workspace role reaches by inheritance. Operation ID: `ListWorkspaceMemberGrants` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | | `user_id` | string | yes | User ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | ### Responses - `200` OK: ListGrantsResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Transfer workspace ownership ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/transfer-ownership ``` Hand the workspace to another member, who must already belong to it Operation ID: `TransferWorkspaceOwnership` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Request body (`application/json`, required): TransferOwnershipRequest Transfer Ownership Request ### Responses - `204` No Content - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListMembersResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Member[] | | List of members | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### AddInstanceMemberRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | The roles to hold on the instance required: true enum: admin,developer,support,viewer | | `user_id` | string | | The user to add. They must already be a member of the instance's workspace; anyone else is invited to the workspace or project first. required: true | ### GetMemberResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | The email address of the member | | `email_verified` | boolean | | Whether the member's email address has been verified | | `family_name` | string | | The family name of the member | | `given_name` | string | | The given name of the member | | `joined_at` | string (date-time) | | The time when the member joined the workspace | | `last_active_at` | string (date-time) | | The time when the member was last active | | `name` | string | | The display name of the member | | `object` | string | | The object type | | `picture` | string | | The profile picture of the member | | `roles` | string[] | | The roles the member holds on the workspace, project or instance the list is of. A workspace member holds owner, admin, billing or developer — or none, for someone added to one of its projects or instances alone. A project member holds admin, developer or viewer; an instance member admin, developer, support or viewer. | | `status` | string | | The status of the member's account | | `user_id` | string | | The unique identifier of the user | ### UpdateInstanceMemberRolesRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | The roles to hold on the instance, replacing the member's current ones required: true enum: admin,developer,support,viewer | ### AddProjectMemberRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | The roles to hold on the project required: true enum: admin,developer,viewer | | `user_id` | string | | The user to add. They must already be a member of the project's workspace; anyone else is invited instead. required: true | ### UpdateProjectMemberRolesRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | The roles to hold on the project, replacing the member's current ones required: true enum: admin,developer,viewer | ### UpdateMemberRolesRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `roles` | string[] | | The roles to grant, replacing the member's current ones. An empty list leaves them a member holding no role: belonging to the workspace for the sake of what they hold on its projects and instances. required: true enum: owner,admin,billing,developer | ### ListGrantsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Grant[] | | The grants, projects first, then instances, each by name | | `object` | string | | The object type | | `pagination` | core_paging.Pagination | | Pagination information | ### TransferOwnershipRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `new_owner_id` | string | | The member who becomes the new owner. They must already be a member. required: true | | `retain_as` | string[] | | The roles the caller keeps once they are no longer an owner. Defaults to admin; an empty list leaves them a member with no role. | ### Member | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | The email address of the member | | `email_verified` | boolean | | Whether the member's email address has been verified | | `family_name` | string | | The family name of the member | | `given_name` | string | | The given name of the member | | `joined_at` | string (date-time) | | The time when the member joined the workspace | | `last_active_at` | string (date-time) | | The time when the member was last active | | `name` | string | | The display name of the member | | `object` | string | | The object type | | `picture` | string | | The profile picture of the member | | `roles` | string[] | | The roles the member holds on the workspace, project or instance the list is of. A workspace member holds owner, admin, billing or developer — or none, for someone added to one of its projects or instances alone. A project member holds admin, developer or viewer; an instance member admin, developer, support or viewer. | | `status` | string | | The status of the member's account | | `user_id` | string | | The unique identifier of the user | ### Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Number of records per page | | `page` | integer | | Current page number | | `total` | integer | | Total number of records | | `total_pages` | integer | | Total number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### Grant | Field | Type | Required | Description | | --- | --- | --- | --- | | `environment` | string | | The instance's environment enum: production,non_production | | `instance_id` | string | | The instance granted on, for a grant on an instance | | `instance_name` | string | | The instance's name | | `joined_at` | string (date-time) | | When the grant was made | | `object` | string | | The object type | | `project_id` | string | | The project: the one granted on, or the instance's | | `project_name` | string | | The project's name | | `resource_type` | string | | What the grant is on enum: project,instance | | `roles` | string[] | | The roles held there | ### core_paging.Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | The page size | | `page` | integer | | The page number, from 1 | | `total` | integer | | The number of items in the whole list | | `total_pages` | integer | | The number of pages | --- # Plans Source: https://www.pontive.com/docs/api-reference/platform/plans Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List plans ```http GET https://api.pontive.com/v1/plans ``` The public plan catalog, cheapest first — the offered plans, each with its base fee at both intervals, included projects and seats, allowances, caps, rates and modules — and the fixed charges (additional project, b2b uplift, FGA instance, custom domain, seat, paused project) at both intervals. Amounts are cents, read from Stripe. A retired plan is not listed; the workspaces on it keep it. Operation ID: `ListPlans` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | ### Responses - `200` OK: ListPlansResponse - `400` Bad Request: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListPlansResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Plan[] | | | | `object` | string | | The object type: list | | `pagination` | Pagination | | Pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### Plan | Field | Type | Required | Description | | --- | --- | --- | --- | | `audit_log_retention_hours` | integer | | How long the workspace's instances keep their audit log's standard entries and their request log, in hours. | | `base` | Base | | | | `description` | string | | | | `highlights` | string[] | | What the pricing table says about the plan beyond its numbers, written as what the plan adds to the one below it. | | `id` | string | | | | `included_projects` | integer | | Projects and seats the base fee covers. | | `included_seats` | integer | | | | `max_non_prod_instances` | integer | | Bounds each project's non-production instances; null is unlimited. | | `modules_available` | string[] | | Modules enable-able in any instance of the workspace. | | `modules_non_production` | string[] | | Modules enable-able in non-production instances only. | | `name` | string | | | | `offered` | boolean | | Whether a workspace may move to the plan. A retired plan keeps serving the workspaces on it. | | `rank` | integer | | Orders plans by price; a move to a lower rank is a downgrade. | | `request_log_retention_hours` | integer | | | | `usage` | Record | | Each meter's allowance or cap, by meter key, pooled across the workspace's instances. A meter absent is measured and shown, never gated. | ### Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | The page size | | `page` | integer | | The page number, from 1 | | `total` | integer | | The number of items in the whole list | | `total_pages` | integer | | The number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### Base | Field | Type | Required | Description | | --- | --- | --- | --- | | `paid` | boolean | | | ### MeterPrice | Field | Type | Required | Description | | --- | --- | --- | --- | | `cap` | integer | | A hard limit (quota_exceeded); null where there is none. | | `included` | integer | | The allowance before the meter bills; null where it is not billed. | | `per` | integer | | The unit the meter bills in beyond the allowance. | --- # Projects Source: https://www.pontive.com/docs/api-reference/platform/projects Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List projects ```http GET https://api.pontive.com/v1/projects ``` Get a list of projects for a workspace Operation ID: `ListProjects` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | | Workspace ID | | `status` | "active" \| "paused" \| "deleted" | | Filter by status | | `region` | "us" \| "eu" \| "au" | | Filter by region | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | | `search` | string | | Search term (name depending on implementation) | ### Responses - `200` OK: ListProjectsResponse - `400` Bad Request: ErrResponse - `500` Internal Server Error: ErrResponse ## Create project ```http POST https://api.pontive.com/v1/projects ``` Create a new project in a workspace. The project is created with one non_production instance (Development, slug dev), returned in instances. Operation ID: `CreateProject` ### Request body (`application/json`, required): CreateProjectRequest Create Project Request ### Responses - `201` Created: Project - `400` invalid_slug, invalid_region, validation_error: ErrResponse - `403` Forbidden: ErrResponse - `409` slug_conflict, project_limit_exceeded: ErrResponse - `500` Internal Server Error: ErrResponse ## Get project ```http GET https://api.pontive.com/v1/projects/{project_id} ``` Get project details by ID or slug Operation ID: `GetProject` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Responses - `200` OK: Project - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update project ```http PATCH https://api.pontive.com/v1/projects/{project_id} ``` Update an existing project Operation ID: `UpdateProject` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Request body (`application/json`, required): UpdateProjectRequest Update Project Request ### Responses - `200` OK: Project - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete project ```http DELETE https://api.pontive.com/v1/projects/{project_id} ``` Soft-delete a project and every instance in it, recoverable for 30 days: it carries purge_scheduled_at, deleted_at plus 30 days, and is purged with its instances after it. Requires {"confirm_delete": true}; without it the API returns 400 confirmation_required. Operation ID: `DeleteProject` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Request body (`application/json`, required): DeleteProjectRequest Delete confirmation ### Responses - `204` Project deleted successfully - `400` confirmation_required: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Pause project ```http POST https://api.pontive.com/v1/projects/{project_id}/pause ``` Pause a project Operation ID: `PauseProject` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Responses - `200` OK: Project - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Purge project ```http POST https://api.pontive.com/v1/projects/{project_id}/purge ``` Permanently delete a deleted project and its instances now, rather than at its purge_scheduled_at, and retire its slug and host labels. Cannot be undone. Operation ID: `PurgeProject` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Responses - `204` Project purged successfully - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Restore project ```http POST https://api.pontive.com/v1/projects/{project_id}/restore ``` Restore a deleted project within 30 days of its deletion, until its purge_scheduled_at (409 restore_window_closed after, when it is purged). Operation ID: `RestoreProject` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Responses - `200` OK: Project - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `409` restore_window_closed: ErrResponse - `500` Internal Server Error: ErrResponse ## Resume project ```http POST https://api.pontive.com/v1/projects/{project_id}/resume ``` Resume a paused project Operation ID: `ResumeProject` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `project_id` | string | yes | Project ID | ### Responses - `200` OK: Project - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListProjectsResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Project[] | | List of projects | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateProjectRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | The description of the project (0-500 chars) | | `metadata` | Metadata | | The new metadata for the project | | `name` | string | yes | The name of the project (1-100 chars) | | `region` | "us" \| "eu" \| "au" | | The region where the project is deployed | | `tenancy_mode` | "b2b" \| "b2c" | yes | The tenancy mode of the project: b2b (organizations) or b2c. Required and immutable once the project is created. | | `workspace_id` | string | yes | The ID of the workspace the project is created in | ### Project | Field | Type | Required | Description | | --- | --- | --- | --- | | `charges` | ProjectCharges | | What the project started billing per month, on the project a create returns and nowhere else: nothing on Free or in one of the plan's included slots; else the additional-project fee and, on a b2b project, the uplift (pontive-spec 10). Absent where the installation bills nothing. | | `compliance_tags` | ComplianceTags | | Compliance tags of the project | | `created_at` | string (date-time) | | The time when the project was created | | `deleted_at` | string (date-time) | | The time when the project was deleted, if applicable | | `description` | string | | The description of the project | | `id` | string | | The unique identifier of the project | | `instances` | InstanceSummary[] | | Read-only summary of the project's instances, oldest first | | `metadata` | Metadata | | The new metadata for the project | | `name` | string | | The name of the project | | `object` | string | | The object type | | `paused_at` | string (date-time) | | The time when the project was paused, if applicable | | `purge_scheduled_at` | string (date-time) | | When a deleted project's restore window ends, deleted_at plus 30 days: it can be restored until then, and is purged after (route review D30). Null unless the project is deleted. | | `region` | "us" \| "eu" \| "au" | | The region where the project and all its instances are deployed | | `slug` | string | | The slug of the project. Client-supplied, permanent, globally unique and never reused. | | `status` | "active" \| "paused" \| "deleted" | | The current status of the project | | `tenancy_mode` | "b2b" \| "b2c" | | The project's tenancy mode, chosen at creation and immutable. Every instance inherits it. | | `updated_at` | string (date-time) | | The time when the project was last updated | | `workspace_id` | string | | The ID of the workspace that owns this project | ### UpdateProjectRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | The new description for the project | | `metadata` | Metadata | | The new metadata for the project | | `name` | string | | The new name for the project minLength: 1 maxLength: 255 | ### DeleteProjectRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `confirm_delete` | boolean | | Must be true; without it the API returns 400 confirmation_required. Deleting a project soft-deletes every instance in it. | ### Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Number of records per page | | `page` | integer | | Current page number | | `total` | integer | | Total number of records | | `total_pages` | integer | | Total number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### Metadata The new metadata for the project Type: Record ### ProjectCharges What the project started billing per month, on the project a create returns and nowhere else: nothing on Free or in one of the plan's included slots; else the additional-project fee and, on a b2b project, the uplift (pontive-spec 10). Absent where the installation bills nothing. | Field | Type | Required | Description | | --- | --- | --- | --- | | `included` | boolean | | Whether the project took one of the plan's included slots. | ### ComplianceTags Compliance tags of the project | Field | Type | Required | Description | | --- | --- | --- | --- | | `GDPR` | boolean | | | | `HIPAA` | boolean | | | ### InstanceSummary | Field | Type | Required | Description | | --- | --- | --- | --- | | `environment` | "production" \| "non_production" | | The environment of the instance | | `id` | string | | The unique identifier of the instance | | `name` | string | | The name of the instance | | `slug` | string | | The slug of the instance | | `status` | "active" \| "paused" \| "deleted" | | The effective status of the instance | --- # Secret Keys Source: https://www.pontive.com/docs/api-reference/platform/secret-keys Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List secret keys ```http GET https://api.pontive.com/v1/instances/{instance_id}/secret-keys ``` List the instance's secret keys. Revoked keys stay listed for 30 days. Needs instance:read. Operation ID: `ListSecretKeys` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | ### Responses - `200` OK: ListSecretKeysResponse - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Create a secret key ```http POST https://api.pontive.com/v1/instances/{instance_id}/secret-keys ``` Create a secret key for the instance's management API. The answer carries its value once; it is never shown again. Needs instance:secret_keys.manage. An instance holds at most 10 active keys (secret_key_limit_reached); a deleted instance takes none (instance_deleted). Operation ID: `CreateSecretKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Request body (`application/json`, required): CreateSecretKeyRequest Create Secret Key Request ### Responses - `201` Created: SecretKey - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Get a secret key ```http GET https://api.pontive.com/v1/instances/{instance_id}/secret-keys/{secret_key_id} ``` One of the instance's secret keys. Needs instance:read. Operation ID: `GetSecretKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | | `secret_key_id` | string | yes | Secret key ID | ### Responses - `200` OK: SecretKey - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Update a secret key ```http PATCH https://api.pontive.com/v1/instances/{instance_id}/secret-keys/{secret_key_id} ``` Change a secret key's name, description or role. A role change takes effect within 30 seconds. Needs instance:secret_keys.manage. Operation ID: `UpdateSecretKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | | `secret_key_id` | string | yes | Secret key ID | ### Request body (`application/json`, required): UpdateSecretKeyRequest Update Secret Key Request ### Responses - `200` OK: SecretKey - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Revoke a secret key ```http POST https://api.pontive.com/v1/instances/{instance_id}/secret-keys/{secret_key_id}/revoke ``` End a secret key and any still-valid previous value at once. Final: a revoked key cannot be reactivated. Needs instance:secret_keys.manage. Operation ID: `RevokeSecretKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | | `secret_key_id` | string | yes | Secret key ID | ### Responses - `200` OK: SecretKey - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Rotate a secret key ```http POST https://api.pontive.com/v1/instances/{instance_id}/secret-keys/{secret_key_id}/rotate ``` Replace a secret key's value, keeping the key. The answer carries the new value once. The current value keeps working for expire_previous_in seconds (0 to 604800, default 86400). Needs instance:secret_keys.manage. Operation ID: `RotateSecretKey` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | | `secret_key_id` | string | yes | Secret key ID | ### Request body (`application/json`): RotateSecretKeyRequest Rotate Secret Key Request ### Responses - `200` OK: SecretKey - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` Conflict: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Schemas ### ListSecretKeysResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | SecretKey[] | | The keys | | `object` | string | | Always "list" | | `pagination` | Pagination | | Pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateSecretKeyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | What the key is for (0–500 characters); null or absent for none | | `expires_at` | string | | When the key stops working; null for never. Must be in the future. | | `name` | string | | Names the caller, e.g. billing-worker (1–100 characters) required: true | | `role` | "admin" \| "developer" \| "support" \| "viewer" | | The key's authority on its instance required: true enum: admin,developer,support,viewer | ### SecretKey | Field | Type | Required | Description | | --- | --- | --- | --- | | `created_at` | string | | | | `created_by` | SecretKeyCreator | | Who created it | | `description` | string | | What the key is for | | `environment` | "production" \| "non_production" | | The instance's environment | | `expires_at` | string | | When the key stops working; null for never | | `id` | string | | The key's id; safe to log | | `instance_id` | string | | The only instance the key works on | | `last_used_at` | string | | Updated at most once a minute | | `leak` | SecretKeyLeak | | Set while a leaked value still works | | `name` | string | | Names the caller | | `object` | string | | Always "secret_key" | | `preview` | string | | The value, masked | | `previous_expires_at` | string | | When the rolled-out value stops working | | `previous_preview` | string | | The rolled-out value's preview while it still works | | `region` | string | | The project's region | | `revoked_at` | string | | | | `role` | "admin" \| "developer" \| "support" \| "viewer" | | The key's authority on its instance | | `status` | "active" \| "revoked" \| "expired" | | active, revoked or expired | | `updated_at` | string | | | | `value` | string | | The full value: on create and roll answers only. It is never shown again. | ### UpdateSecretKeyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | A new description; null clears it, and leaving it out keeps it | | `name` | string | | A new name (1–100 characters) | | `role` | "admin" \| "developer" \| "support" \| "viewer" | | A new role enum: admin,developer,support,viewer | ### RotateSecretKeyRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `expire_previous_in` | integer | | How long the current value keeps working, in seconds: 0 (ends it now) to 604800 (7 days). Defaults to 86400 (24 hours). | ### Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Number of records per page | | `page` | integer | | Current page number | | `total` | integer | | Total number of records | | `total_pages` | integer | | Total number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### SecretKeyCreator Who created it | Field | Type | Required | Description | | --- | --- | --- | --- | | `email` | string | | | | `id` | string | | | | `name` | string | | | ### SecretKeyLeak Set while a leaked value still works | Field | Type | Required | Description | | --- | --- | --- | --- | | `detected_at` | string | | When it was found | | `evidence` | Record | | Where it was found: {"url": …} for GitHub, {"origin": …} for a browser | | `source` | "github_secret_scanning" \| "browser_use" | | github_secret_scanning or browser_use | | `value_preview` | string | | Which value leaked: the current one's or the previous one's preview | --- # Unclaimed instances Source: https://www.pontive.com/docs/api-reference/platform/unclaimed-instances Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## Create an unclaimed development instance ```http POST https://api.pontive.com/v1/unclaimed-instances ``` Create a development instance with no account: a project in Pontive's holding workspace with its Development instance, a developer secret key named keyless and an app, everything an app needs to run on the developer's machine. Public and unauthenticated: it takes no credential, and one sent is ignored. The instance is deleted with its users 7 days after it is created (expires_at) unless it is claimed into a workspace first (POST /unclaimed-instances/{instance_id}/claim-links). At most 3 per IP address (IPv6 /64) per rolling 24 hours and a ceiling per ASN (429 unclaimed_instance_limit with Retry-After); 503 unclaimed_instances_unavailable with Retry-After when the service is switched off or a global cap is reached; 403 caller_blocked for a blocked address or network. With X-Idempotency-Key, a retry within 24 hours from the same address answers the same instance, counted once, with fresh secrets: the earlier claim token, key value and client secret stop working. The region is the body's, else the one nearest the caller, echoed back. Redirect URIs are loopback only (422 redirect_uri_not_loopback); a URI without a port matches any port. With encryption_key (a public EC P-256 or OKP X25519 JWK; 422 invalid_encryption_key otherwise) the secrets come back as a compact JWE in encrypted_secrets (ECDH-ES, A256GCM, kid the key's RFC 7638 thumbprint) of {client_secret, secret_key, claim_token}, never in the clear. The secrets are answered once; never log them. The response carries Sunset and Link rel=sunset. Operation ID: `CreateUnclaimedInstance` ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Idempotency-Key` | string | | Idempotency key: a retry within 24 hours from the same address answers the same instance | ### Request body (`application/json`): CreateUnclaimedInstanceRequest The instance; every field is optional ### Responses - `201` Created: CreatedUnclaimedInstance - `400` Bad Request: ErrResponse - `403` caller_blocked: ErrResponse - `413` Request Entity Too Large: ErrResponse - `422` field_invalid_format, redirect_uri_not_loopback, invalid_region, invalid_encryption_key: ErrResponse - `429` unclaimed_instance_limit (rate_limit_error), with Retry-After: ErrResponse - `500` Internal Server Error: ErrResponse - `503` unclaimed_instances_unavailable, with Retry-After: ErrResponse ## Get an unclaimed instance ```http GET https://api.pontive.com/v1/unclaimed-instances/{instance_id} ``` Read an unclaimed instance: with its claim token in X-Pontive-Claim-Token, its status for polling (720 reads per instance per hour); or with a Pontive user's session and a claim link's code in X-Pontive-Claim-Code, for the dashboard's claim page, with the caller's workspaces where they may create a project, each with whether the instance fits (eligible, or reason: project_limit_exceeded, workspace_suspended, workspace_paused, workspace_cancelled) and what the claim would start there (charges, as a project create answers them); 20 session reads and claims per user per hour. Reading does not use up the code. Once claimed, the claim token keeps reading status claimed with claimed_at and nothing else of the instance. 404 unclaimed_instance_not_found for an unknown or expired instance or a wrong token, alike; 404 claim_link_invalid for an unknown, expired or used code. Operation ID: `GetUnclaimedInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Pontive-Claim-Token` | string | | The claim token | | `X-Pontive-Claim-Code` | string | | A claim link's code, with a Pontive user's session | ### Responses - `200` OK: UnclaimedInstance - `401` Unauthorized: ErrResponse - `403` Forbidden: ErrResponse - `404` unclaimed_instance_not_found, claim_link_invalid: ErrResponse - `429` rate_limit_error, with Retry-After: ErrResponse - `500` Internal Server Error: ErrResponse ## Claim an unclaimed instance ```http POST https://api.pontive.com/v1/unclaimed-instances/{instance_id}/claim ``` Claim an unclaimed instance into one of the caller's workspaces, with a Pontive user's session and a claim link's code in X-Pontive-Claim-Code: its project moves into the workspace intact (ids, issuer, users, apps, keys and settings unchanged), its expiry is cleared and every claim link of it dies. Needs project:create on the workspace, as a project create does (403 otherwise). name renames the project. Answers the project, now in the workspace, with what it started charging. 404 claim_link_invalid for an unknown, expired or used code; 409 instance_claimed; 409 project_limit_exceeded when the workspace's plan holds no more projects; 403 workspace_suspended, workspace_paused or workspace_cancelled. With X-Idempotency-Key, the answer is kept for 24 hours: a retry with the same key and body is answered it again without claiming, and the same key with another body is 422 idempotency_key_reused. 20 session reads and claims per user per hour. Operation ID: `ClaimUnclaimedInstance` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Pontive-Claim-Code` | string | yes | The claim link's code | | `X-Idempotency-Key` | string | | Idempotency key | ### Request body (`application/json`, required): ClaimUnclaimedInstanceRequest The workspace, and a new name ### Responses - `200` OK: ClaimedProject - `400` Bad Request: ErrResponse - `401` Unauthorized: ErrResponse - `403` permission_denied, workspace_suspended, workspace_paused, workspace_cancelled: ErrResponse - `404` claim_link_invalid, unclaimed_instance_not_found: ErrResponse - `409` instance_claimed, project_limit_exceeded: ErrResponse - `422` field_invalid_format, idempotency_key_reused: ErrResponse - `429` rate_limit_error, with Retry-After: ErrResponse - `500` Internal Server Error: ErrResponse ## Create a claim link ```http POST https://api.pontive.com/v1/unclaimed-instances/{instance_id}/claim-links ``` Mint a claim link with the claim token in X-Pontive-Claim-Token: https://app.pontive.com/claim/{instance_id}#code={code}, the code in the fragment, single use, valid for one hour. Give the person the link, never the token. Minting does not end older links; the first one used ends every other. 30 per instance and 60 per IP address per hour. 404 unclaimed_instance_not_found for an unknown or expired instance or a wrong token; 409 instance_claimed once claimed. Operation ID: `CreateClaimLink` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `instance_id` | string | yes | Instance ID | ### Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `X-Pontive-Claim-Token` | string | yes | The claim token | ### Responses - `201` Created: ClaimLink - `404` unclaimed_instance_not_found: ErrResponse - `409` instance_claimed: ErrResponse - `429` rate_limit_error, with Retry-After: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### CreateUnclaimedInstanceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `app` | UnclaimedInstanceApp | | The app made with the instance. | | `client` | UnclaimedInstanceClient | | The tool, its version and, when detected, the agent: metrics and abuse signals only, never trusted for limits. | | `encryption_key` | object | | A public JWK, EC P-256 or OKP X25519: the secrets are then answered sealed to it in encrypted_secrets, never in the clear. | | `name` | string | | The project's name, "Untitled app" by default; the claimer may rename it. | | `region` | "us" \| "eu" \| "au" | | A region this installation serves; by default the one nearest the caller, echoed in the response. Immutable. | | `tenancy_mode` | "b2b" \| "b2c" | | b2c by default. Immutable. | ### CreatedUnclaimedInstance | Field | Type | Required | Description | | --- | --- | --- | --- | | `app_id` | string | | | | `claim_token` | string | | The instance's ownership until it is claimed, answered once; absent with encryption_key. Never put it in a URL or a log. | | `client_secret` | string | | A web app's client secret; absent for spa and native, and with encryption_key. | | `encrypted_secrets` | string | | With encryption_key: a compact JWE (ECDH-ES, A256GCM, kid the key's RFC 7638 thumbprint) of {client_secret, secret_key, claim_token}. | | `environment` | string | | | | `expires_at` | string (date-time) | | When Pontive deletes it, with its users, unless it is claimed first. | | `instance_id` | string | | | | `issuer` | string | | The instance's issuer, its auth domain's origin. | | `limits_url` | string | | | | `name` | string | | | | `object` | string | | | | `project_id` | string | | | | `region` | "us" \| "eu" \| "au" | | | | `secret_key` | string | | The developer secret key named keyless; absent with encryption_key. | | `secret_key_id` | string | | | | `tenancy_mode` | "b2b" \| "b2c" | | | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### UnclaimedInstance | Field | Type | Required | Description | | --- | --- | --- | --- | | `claimed_at` | string (date-time) | | Null until claimed. | | `created_at` | string (date-time) | | | | `expires_at` | string (date-time) | | | | `instance_id` | string | | | | `issuer` | string | | | | `name` | string | | | | `object` | string | | | | `project_id` | string | | | | `region` | "us" \| "eu" \| "au" | | | | `status` | "unclaimed" \| "claimed" | | | | `tenancy_mode` | "b2b" \| "b2c" | | | | `workspaces` | ClaimWorkspace[] | | With a Pontive user's session and a link's code: the caller's workspaces where they may create a project, each with whether the instance fits and what a claim would start charging there. | ### ClaimUnclaimedInstanceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | | Renames the project; omitted keeps its name. | | `workspace_id` | string | | The workspace the project moves into: the caller must be able to create a project there. | ### ClaimedProject | Field | Type | Required | Description | | --- | --- | --- | --- | | `charges` | ProjectCharges | | What the project started billing per month, on the project a create returns and nowhere else: nothing on Free or in one of the plan's included slots; else the additional-project fee and, on a b2b project, the uplift (pontive-spec 10). Absent where the installation bills nothing. | | `compliance_tags` | ComplianceTags | | Compliance tags of the project | | `created_at` | string (date-time) | | The time when the project was created | | `deleted_at` | string (date-time) | | The time when the project was deleted, if applicable | | `description` | string | | The description of the project | | `id` | string | | The unique identifier of the project | | `instances` | InstanceSummary[] | | Read-only summary of the project's instances, oldest first | | `metadata` | Metadata | | The new metadata for the project | | `name` | string | | The name of the project | | `object` | string | | The object type | | `paused_at` | string (date-time) | | The time when the project was paused, if applicable | | `purge_scheduled_at` | string (date-time) | | When a deleted project's restore window ends, deleted_at plus 30 days: it can be restored until then, and is purged after (route review D30). Null unless the project is deleted. | | `region` | "us" \| "eu" \| "au" | | The region where the project and all its instances are deployed | | `slug` | string | | The slug of the project. Client-supplied, permanent, globally unique and never reused. | | `status` | "active" \| "paused" \| "deleted" | | The current status of the project | | `tenancy_mode` | "b2b" \| "b2c" | | The project's tenancy mode, chosen at creation and immutable. Every instance inherits it. | | `updated_at` | string (date-time) | | The time when the project was last updated | | `workspace_id` | string | | The ID of the workspace that owns this project | ### ClaimLink | Field | Type | Required | Description | | --- | --- | --- | --- | | `expires_at` | string (date-time) | | | | `object` | string | | | | `url` | string | | The dashboard's claim page, the code in the fragment. | ### UnclaimedInstanceApp The app made with the instance. | Field | Type | Required | Description | | --- | --- | --- | --- | | `redirect_uris` | string[] | | Loopback only (localhost, 127.0.0.1, [::1]). Without a port, any port matches on a non-production instance. Default http://localhost/api/auth/callback and http://127.0.0.1/api/auth/callback. | | `type` | "web" \| "spa" \| "native" | | web (default): an oauth confidential client with a client secret, for server sessions; spa: a public oauth client with PKCE; native: a public native client. | ### UnclaimedInstanceClient The tool, its version and, when detected, the agent: metrics and abuse signals only, never trusted for limits. | Field | Type | Required | Description | | --- | --- | --- | --- | | `agent` | string | | | | `name` | string | | | | `version` | string | | | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### ClaimWorkspace | Field | Type | Required | Description | | --- | --- | --- | --- | | `charges` | ProjectCharges | | What the project started billing per month, on the project a create returns and nowhere else: nothing on Free or in one of the plan's included slots; else the additional-project fee and, on a b2b project, the uplift (pontive-spec 10). Absent where the installation bills nothing. | | `eligible` | boolean | | | | `name` | string | | | | `plan` | string | | The workspace's plan id; empty when it cannot be read. | | `reason` | string | | When not eligible, the error code a claim into it would answer: project_limit_exceeded, workspace_suspended, workspace_paused, workspace_cancelled. | | `workspace_id` | string | | | ### ProjectCharges What the project started billing per month, on the project a create returns and nowhere else: nothing on Free or in one of the plan's included slots; else the additional-project fee and, on a b2b project, the uplift (pontive-spec 10). Absent where the installation bills nothing. | Field | Type | Required | Description | | --- | --- | --- | --- | | `included` | boolean | | Whether the project took one of the plan's included slots. | ### ComplianceTags Compliance tags of the project | Field | Type | Required | Description | | --- | --- | --- | --- | | `GDPR` | boolean | | | | `HIPAA` | boolean | | | ### InstanceSummary | Field | Type | Required | Description | | --- | --- | --- | --- | | `environment` | "production" \| "non_production" | | The environment of the instance | | `id` | string | | The unique identifier of the instance | | `name` | string | | The name of the instance | | `slug` | string | | The slug of the instance | | `status` | "active" \| "paused" \| "deleted" | | The effective status of the instance | ### Metadata The new metadata for the project Type: Record --- # Workspaces Source: https://www.pontive.com/docs/api-reference/platform/workspaces Base URL: `https://api.pontive.com/v1` (operations that name another server say so). ## List workspaces ```http GET https://api.pontive.com/v1/workspaces ``` The caller's workspaces. A deleted workspace is gone to its members: it is listed, with status deleted, to Pontive's staff alone, who restore it; status=deleted lists only those. Operation ID: `ListWorkspaces` ### Query parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `status` | "active" \| "pastdue" \| "suspended" \| "cancelled" \| "deleted" | | Filter by status | | `plan` | "free" \| "pro" \| "enterprise" | | Filter by plan | | `page` | integer | | Page number | | `limit` | integer | | Page size (default 25, at most 100) | | `sort` | string | | Sort order | | `search` | string | | Search term (slug,description,name depending on implementation) | ### Responses - `200` OK: ListWorkspacesResponse - `400` Bad Request: ErrResponse - `500` Internal Server Error: ErrResponse ## Create workspace ```http POST https://api.pontive.com/v1/workspaces ``` Create a new workspace Operation ID: `CreateWorkspace` ### Request body (`application/json`, required): CreateWorkspaceRequest Create Workspace Request ### Responses - `201` Created: Workspace - `400` Bad Request: ErrResponse - `500` Internal Server Error: ErrResponse ## Get workspace ```http GET https://api.pontive.com/v1/workspaces/{workspace_id} ``` One workspace. A deleted one answers 404 to its members and is returned, with status deleted and deleted_at, to Pontive's staff. Operation ID: `GetWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `200` OK: Workspace - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Update workspace ```http PATCH https://api.pontive.com/v1/workspaces/{workspace_id} ``` Update an existing workspace. The name, description and metadata need workspace:manage; the billing contact needs workspace:billing.manage, and a request carrying only the billing contact needs nothing else, so a billing member sets where the invoices go. A token acting for a Pontive user (the Pontive MCP server) is refused the billing contact with 403 actor_refused: it is set in the dashboard. Operation ID: `UpdateWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Request body (`application/json`, required): UpdateWorkspaceRequest Update Workspace Request ### Responses - `200` OK: Workspace - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Delete workspace ```http DELETE https://api.pontive.com/v1/workspaces/{workspace_id} ``` The recoverable delete: the workspace's status becomes deleted, it disappears for its members, and Pontive's admins can restore it for 60 days (POST …/restore), until its purge_scheduled_at, when it is purged with everything it holds; POST …/purge deletes it for good now. Its contract on Pontive's billing ends with the current period, and that period's usage bills on its final invoice. A workspace is deleted last: with no live projects (409 workspace_has_projects) and nothing owed (402 outstanding_balance). Operation ID: `DeleteWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `204` Workspace deleted successfully - `400` Bad Request: ErrResponse - `402` outstanding_balance: ErrResponse - `404` Not Found: ErrResponse - `409` workspace_has_projects: ErrResponse - `500` Internal Server Error: ErrResponse ## Cancel workspace ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/cancel ``` Close the account: the workspace is cancelled now and read-only, and deleted 30 days later, at its deletion_scheduled_at, unless its owner restores it before. Its contract on Pontive's billing ends with the current period, and that period's usage bills on its final invoice. Needs confirm: true (400 confirmation_required); reason and feedback are for Pontive's analytics. Its owner only (403 for anyone else, its admins included). Operation ID: `CancelWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Request body (`application/json`, required): CancelWorkspaceRequest Confirmation, and why ### Responses - `200` OK: Workspace - `400` confirmation_required: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Purge workspace ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/purge ``` Delete a deleted workspace for good, now, rather than at the end of its restore window: its organization and everything under it go, and nothing restores it (GDPR erasure). The workspace must be deleted first (DELETE). Only the workspace's owner and Pontive's admins purge; anyone else, a workspace admin included, is refused with 403, as is a token acting for a user. Operation ID: `PurgeWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `204` Workspace purged successfully - `400` Bad Request: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Restore workspace ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/restore ``` Undo a cancellation within 30 days, or a delete within 60 days (409 restore_window_closed after, at deletion_scheduled_at and purge_scheduled_at): the workspace is active again. A cancelled workspace is restored by its owner or Pontive's admins; a deleted one by Pontive's admins only (403 for anyone else). While its contract is still ending, at most until the period's end, the restore revokes the contract's cancellation: a workspace on a paid plan then bills again, so it needs a payment method on its Customer that can be charged, read from Pontive's billing at the time of the restore (402 payment_method_required with none or an expired card; 503 when billing cannot be reached); one on Free needs none. Once the contract has ended, the workspace restarts on a new contract on Free, with no card needed, and its owner upgrades from there. A suspended workspace is resumed instead. Operation ID: `RestoreWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `200` OK: Workspace - `400` Bad Request: ErrResponse - `402` payment_method_required: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `409` restore_window_closed: ErrResponse - `500` Internal Server Error: ErrResponse - `503` Service Unavailable: ErrResponse ## Resume workspace ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/resume ``` Suspend's pair: a suspended workspace goes back to the status its payment is in — past_due while it still is, active once paid. One suspended for an unpaid invoice stays suspended (402 outstanding_balance): paying lifts it. Needs workspace:delete. Operation ID: `ResumeWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `200` OK: Workspace - `400` Bad Request: ErrResponse - `402` Payment Required: ErrResponse - `403` Forbidden: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Suspend workspace ```http POST https://api.pontive.com/v1/workspaces/{workspace_id}/suspend ``` Suspend a past-due workspace: its console takes no writes but billing's until it is resumed or paid. Needs workspace:delete. Operation ID: `SuspendWorkspace` ### Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `workspace_id` | string | yes | Workspace ID | ### Responses - `200` OK: Workspace - `400` Bad Request: ErrResponse - `404` Not Found: ErrResponse - `500` Internal Server Error: ErrResponse ## Schemas ### ListWorkspacesResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | Workspace[] | | List of workspaces | | `object` | string | | The object type | | `pagination` | Pagination | | Pagination information | ### ErrResponse | Field | Type | Required | Description | | --- | --- | --- | --- | | `error` | ErrBody | | | ### CreateWorkspaceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `description` | string | | The description of the workspace | | `name` | string | | The name of the workspace required: true minLength: 1 maxLength: 255 | ### Workspace | Field | Type | Required | Description | | --- | --- | --- | --- | | `billing_contact` | BillingContact | | Replaces the billing contact, where invoices and receipts are emailed. Its email is required. Needs workspace:billing.manage; sent on its own it needs nothing else, so a billing member sets it. | | `cancelled_at` | string (date-time) | | When the workspace was cancelled (pontive-spec 01, Cancellation flow). Set while it is cancelled. | | `created_at` | string (date-time) | | The time when the workspace was created | | `deleted_at` | string (date-time) | | The time when the workspace was deleted | | `deletion_scheduled_at` | string (date-time) | | When a cancelled workspace is deleted unless it is restored first, cancelled_at plus 30 days: its owner restores it until then. Set only on a cancelled workspace. | | `description` | string | | The description of the workspace | | `id` | string | | The unique identifier of the workspace | | `metadata` | Metadata | | The new metadata for the workspace | | `name` | string | | The name of the workspace | | `object` | string | | The object type | | `purge_scheduled_at` | string (date-time) | | When a deleted workspace's restore window ends, deleted_at plus 60 days: it can be restored until then (route review D30). Set only on a deleted workspace. | | `slug` | string | | The slug of the workspace | | `status` | string | | The current status of the workspace enum: active,pastdue,suspended,cancelled,deleted | | `system` | "holding" | | System marks a workspace Pontive keeps for itself, shown to Pontive's staff only: holding, the installation's one holding workspace, which owns the unclaimed development instances until they are claimed (pontive-spec 47 §4.2). Absent for every customer workspace. | | `updated_at` | string (date-time) | | The time when the workspace was last updated | ### UpdateWorkspaceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `billing_contact` | BillingContact | | Replaces the billing contact, where invoices and receipts are emailed. Its email is required. Needs workspace:billing.manage; sent on its own it needs nothing else, so a billing member sets it. | | `description` | string | | The new description for the workspace | | `metadata` | Metadata | | The new metadata for the workspace | | `name` | string | | The new name for the workspace minLength: 1 maxLength: 255 | ### CancelWorkspaceRequest | Field | Type | Required | Description | | --- | --- | --- | --- | | `confirm` | boolean | | Must be true: closing the account is confirmed (400 confirmation_required otherwise). | | `feedback` | string | | Free-form feedback, for Pontive's analytics. maxLength: 2000 | | `reason` | "no_longer_needed" \| "too_expensive" \| "missing_features" \| "switching_providers" \| "other" \| "no_longer_needed" \| "too_expensive" \| "missing_features" \| "switching_providers" \| "other" | | Why the account is closed, for Pontive's analytics. | ### Pagination Pagination information | Field | Type | Required | Description | | --- | --- | --- | --- | | `limit` | integer | | Number of records per page | | `page` | integer | | Current page number | | `total` | integer | | Total number of records | | `total_pages` | integer | | Total number of pages | ### ErrBody | Field | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | | Code is a stable machine-readable identifier for this error: the domain code where one exists (e.g. slug_conflict, instance_not_found, confirmation_required), else the spec's generic code (invalid_request, permission_denied, not_found, conflict, internal_error). | | `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` | string | | Type is the error's category, from its HTTP status: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. | ### BillingContact Replaces the billing contact, where invoices and receipts are emailed. Its email is required. Needs workspace:billing.manage; sent on its own it needs nothing else, so a billing member sets it. | Field | Type | Required | Description | | --- | --- | --- | --- | | `address` | string | | The address of the billing contact | | `city` | string | | The city of the billing contact | | `company_name` | string | | The company name of the billing contact | | `country` | string | | The country of the billing contact | | `email` | string | | The email of the billing contact | | `name` | string | | The name of the billing contact | | `phone` | string | | The phone of the billing contact | | `state` | string | | The state of the billing contact | | `tax_id` | string | | The tax ID of the billing contact | | `tax_rate` | string | | The tax rate of the billing contact | | `zip` | string | | The zip code of the billing contact | ### Metadata The new metadata for the workspace Type: Record ---