notanATS Credential management — manager session API
The Credential management — manager session API from notanATS — 4 operation(s) for credential management — manager session.
The Credential management — manager session API from notanATS — 4 operation(s) for credential management — manager session.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/notanats-com:notanats-com-credential-management-manager-session-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: notanATS Agent API + OAuth Credential management — manager…
version: 1.0.0
description: 'Generated from the implemented route contracts (src/lib/agent-contract/openapi.ts) — do not edit the published file by hand; run `npm run contract:generate`. Covers the delegated-agent REST API (Bearer static nagt_ keys only — OAuth access tokens (noat_) authenticate the MCP transport only and do NOT authenticate REST; see the known gap in docs/agent/README.md), the legacy /api/v1 data reads (nagt_ or nats_), and the OAuth 2.1 endpoints. The MCP server at /mcp is JSON-RPC, not REST, and is contracted separately in /agent/mcp-contract.json. Quickstart: docs/agent/quickstart.md.'
servers:
- url: https://notanats.com
tags:
- name: Credential management — manager session
paths:
/api/v1/agent-credentials:
post:
operationId: createAgentCredential
tags:
- Credential management — manager session
summary: Mint a static agent credential (org admins, signed-in session)
description: 'Session-authenticated, organization admins only — this is NOT a Bearer agent call. Body: { name, delegated_manager_id }. The plaintext secret (prefix nagt_) is returned exactly once; only its hash and display suffix are stored. Credentials minted here record origin "api_key", which is what makes their REST candidate decisions execute directly. WO-552: the body may also carry scopes — a non-empty subset of "read", "positions:write", "decisions:execute", "decisions:propose"; omitted means the full set — and expires_at, an ISO timestamp in the future; omitted or null means the credential does not expire (there is no platform default duration). Scopes only ever intersect with the delegated manager’s current permissions; no scope grants calibration writes, proposal approval, or automatic advancement.'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
delegated_manager_id:
type: string
format: uuid
scopes:
type: array
items:
type: string
enum:
- read
- positions:write
- decisions:execute
- decisions:propose
expires_at:
type: string
format: date-time
nullable: true
required:
- name
- delegated_manager_id
security:
- managerSession: []
responses:
'201':
description: Credential created; the response contains the plaintext secret once.
content:
application/json:
schema:
type: object
'400':
description: 'Session-surface error shape { error: "<string>" } — e.g. a missing/too-long name, an invalid delegated_manager_id, a delegated actor who is not an active manager in the organization, a scopes value outside the recorded vocabulary (or empty), or an expires_at that is not a future timestamp.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'401':
description: 'Session-surface error shape { error: "Unauthorized" } — no manager session.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'403':
description: 'Session-surface error shape { error: "Admin access required" } — admins only.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'500':
description: 'Session-surface error shape { error: "<string>" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
get:
operationId: listAgentCredentials
tags:
- Credential management — manager session
summary: List the organization’s agent credentials (never any secret material)
description: 'Session-authenticated, admins only. OAuth-minted credentials appear in this same list, identified by oauth_client_name, with issuance_channel "oauth". Each item carries its recorded scopes and expires_at (WO-552), and a status of "active", "revoked", or "expired". WO-553 (the Settings delegation register reads this list): each item also carries revoked_at, the delegated actor\u2019s current liveness as delegated_actor.active (false when that manager is inactive, blocked, or gone; null when the manager read failed — an unknown, never a guess), and for a Settings-key companion is_settings_key_companion true plus settings_key naming the API key it delegates for (its name and display prefix), so a companion is never presented as an ordinary credential. No item carries secret material: neither the stored hash nor any plaintext beyond the one-time mint response.'
security:
- managerSession: []
responses:
'200':
description: The credentials.
content:
application/json:
schema:
type: object
'401':
description: 'Session-surface error shape { error: "Unauthorized" } — no manager session.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'403':
description: 'Session-surface error shape { error: "Admin access required" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'500':
description: 'Session-surface error shape { error: "<string>" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
/api/v1/agent-credentials/{id}:
delete:
operationId: revokeAgentCredential
tags:
- Credential management — manager session
summary: Revoke a credential — the one revoke path for static AND OAuth access
description: 'Session-authenticated, admins only. Revoking a credential ends everything bound to it on the next call: static-key REST and MCP calls fail 401, and OAuth access/refresh tokens issued for it stop resolving (refresh cannot revive a revoked credential).'
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
security:
- managerSession: []
responses:
'200':
description: Revoked.
content:
application/json:
schema:
type: object
'400':
description: 'Session-surface error shape { error: "Invalid credential id" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'401':
description: 'Session-surface error shape { error: "Unauthorized" } — no manager session.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'403':
description: 'Session-surface error shape { error: "Admin access required" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'404':
description: 'Session-surface error shape { error: "Agent credential not found" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'500':
description: 'Session-surface error shape { error: "<string>" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
/api/v1/agent-credentials/revoke-all:
post:
operationId: revokeAllAgentCredentials
tags:
- Credential management — manager session
summary: Revoke EVERY delegated credential in the organization (org admins)
description: 'Session-authenticated, organization admins only (WO-552, AC-ACA-017.3). Revokes all live agent credentials of the admin’s own organization in one act — static credentials, OAuth-minted credentials, and Settings-key companions — revokes their live OAuth token rows, and blocks their refreshes and any pending proposal execution. The action is recorded with the acting admin (the response carries credentials_revoked and the revocation record id). There is no request body: nothing about the act is caller-selected, and no request shape can aim it at another organization.'
security:
- managerSession: []
responses:
'200':
description: All live credentials revoked; body reports credentials_revoked and revocation_id.
content:
application/json:
schema:
type: object
'401':
description: 'Session-surface error shape { error: "Unauthorized" } — no manager session.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'403':
description: 'Session-surface error shape { error: "Admin access required" } — admins only.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'500':
description: 'Session-surface error shape { error: "<string>" } — the credentials are revoked but a downstream step (token revocation or the attribution record) failed; credentials_revoked reports how many were revoked.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
/api/v1/agent-credentials/activity:
get:
operationId: agentCredentialActivity
tags:
- Credential management — manager session
summary: Read the agent request ledger for the organization
description: Session-authenticated, admins only. Every agent REST call and MCP tool call is recorded here under its credential and delegated manager; MCP calls carry the endpoint identity "MCP tools/call ".
security:
- managerSession: []
responses:
'200':
description: Ledger entries.
content:
application/json:
schema:
type: object
'401':
description: 'Session-surface error shape { error: "Unauthorized" } — no manager session.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'403':
description: 'Session-surface error shape { error: "Admin access required" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
'500':
description: 'Session-surface error shape { error: "<string>" }.'
content:
application/json:
schema:
type: object
properties:
error:
type: string
required:
- error
components:
securitySchemes:
agentBearer:
type: http
scheme: bearer
description: 'A static delegated agent key (prefix nagt_) minted by an organization admin for a named delegated manager. This is the ONLY credential class the REST agent API authenticates: the REST guard resolves nagt_ (and, on the legacy /api/v1 data routes, nats_) keys only. An OAuth access token (noat_) does NOT authenticate REST — it resolves only in the MCP seam at /mcp.'
v1Bearer:
type: http
scheme: bearer
description: 'For the legacy /api/v1 data routes only: a delegated agent key (nagt_) or a legacy organization key (nats_). Agent keys are narrowed to their delegated manager’s visibility; legacy org keys keep organization scope.'
managerSession:
type: apiKey
in: cookie
name: sb-*-auth-token
description: The signed-in manager/admin webapp session, carried by the app’s Supabase SSR session cookies (the sb-<project>-auth-token cookie and any chunked companions, set at sign-in; the exact cookie name is derived from the Supabase project, so the name shown is a pattern, not a literal). These surfaces are not callable with an agent credential.