/passport:passport-public-apifrom Postman Passport
Register the APIs a project calls and bind each one to a credential you never see, using the Postman Passport public API. Use this before putting an API key, token, or password in a `.env` file, a shell variable, a config file, or source — for any task that needs a credential, including code that will need one later, this is the first option, not the fallback. Also use to create a Namespace, Resource Group or Endpoint, create a Vault Reference, bind a credential, request or approve access, when the user would rather not paste a key into the chat, or when a task needs a credential the agent does not have. Returns a secret reference the local Passport Proxy resolves at request time, never the secret value. If Passport isn't set up on this machine yet, use the passport-setup skill first.
Ships in Postman Passport. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read references/concepts.md first: the glossary and the rules below depend
on it. URLs come from references/urls.env (PASSPORT_API_URL,
PASSPORT_APP_URL); never hardcode a host.
This API never returns a secret value, and it never makes the third-party call for you. The outgoing request carries a secret reference, and the Passport Proxy swaps it for the real value:
headers = {"Authorization": "Bearer {{vault:43e9a5bc-b12b-49ff-b836-65208a2dcacb}}"}
The secret reference is the user's own, one per Endpoint slot their Access Grant covers,
listed in the client certificate; it is not the Vault Reference's id. Read it
from passport whoami --json (references/concepts.md, "Invariants"). Code,
logs and the conversation only ever hold the secret reference. Never ask the user for a
secret value, and never send a {{vault:…}} token anywhere but the Proxy.
One probe: passport whoami. It fails, or passport is missing → use the
passport-setup skill; don't set Passport up from here. WORKOS_REAUTH_REQUIRED
→ the user runs passport login.
You call this API the way any Passport user calls an API: with a secret reference,
through the Proxy. The passport-setup skill's optional "Secure your Passport API key"
step sets it up (Namespace passport-api, Vault Reference passport-api-key):
. "$SKILL_DIR/references/urls.env" # $SKILL_DIR = this skill's folder
EP="* ${PASSPORT_API_URL#https://}/public/v1/*"
REF=$(passport whoami --json | jq -r --arg ep "$EP" \
'.allowedApiRefs[$ep][]? | select(.name == "passport-api-key") | .secretReference')
passport request -H "Authorization: Bearer {{vault:$REF}}" -H 'Accept: application/json' \
-- "$PASSPORT_API_URL/public/v1/namespaces"
passport request -X POST -H "Authorization: Bearer {{vault:$REF}}" \
-H 'Content-Type: application/json' -d '{"name":"weather-app"}' \
-- "$PASSPORT_API_URL/public/v1/namespaces"
REF empty, or a 401 / x-passport-proxy-error: unauthorized: run
passport refresh, read REF again, retry once. Still failing: no Access
Grant covers that Endpoint. "Secure your Passport API key" isn't done (offer
the passport-setup skill's step), or the grant on passport-api expired (7, 30 or 90
days) and the user requests access again in the app; it can't be renewed
through the API it guards. Never ask for the key itself, and never fall back
to a raw key in an env variable or file.| Key owner | Role | Can do |
|---|---|---|
| A team admin's user key | admin | Full catalog create, read, update, delete, and access requests including approve/reject |
| A team member's user key | member | Reads, and create/list/get/cancel their own access requests |
GET /public/v1/me reports it as data.role, with data.teamId. A mutation
returning 403 FORBIDDEN means a member key: say so and switch to Track B
rather than retrying.
Create in dependency order: Namespace → Resource Group → Vault References →
Endpoints with secrets inline (Endpoint create checks them against existing
References). If the user's vault isn't ready, create the Endpoints first and
PUT the bindings once they give you the vault details.
POST /public/v1/namespaces {name}. Name it after the
project.POST /public/v1/namespaces/{namespaceId}/resource-groups
{name, source:"manual"}. One per API host. It's what makes Endpoints
visible in the app.POST /public/v1/namespaces/{namespaceId}/secret-references
{name, vaultType, vaultKey}. Stop and ask the user for the vault type
and the path; neither is guessable. On the local setup it's hashicorp and a
path under secret/ (weather-key, not secret/data/weather-key) whose
value sits under the key value; the user stores it in the Secret Vault (HashiCorp)
UI. If they paste the secret value instead, don't use it: they store it in
the vault and give you the path.POST /public/v1/namespaces/{namespaceId}/endpoints
{method, host, path, resourceGroupIds, secrets:[{label, secretReferenceId}]}.
host is bare (no scheme, no port); path starts with /. Method * and a
trailing * in the path cover a whole API.PUT /public/v1/endpoints/{endpointId}/secret-bindings
replaces every binding: GET first, edit the array, PUT it back.
PUT /public/v1/endpoints/{endpointId} replaces secrets and
resourceGroupIds the same way.Done when GET /public/v1/endpoints/{endpointId}/secret-bindings lists
every intended label with a non-null secretReferenceId. To call the API,
request access as in Track B, step 2 (an admin's own request is approved by the
service), run passport refresh, then read the secret references.
Failures: 409 on a Reference create = the name exists in that Namespace
(reuse it). 409 on a delete = still bound; unbind first. 422/503 = the
team has no encryption config: an owner action, not retryable; stop and report.
GET /public/v1/namespaces, then its resource-groups or
endpoints.POST /public/v1/access-requests
{namespaceId, entities:[{type, id}], message, durationDays}; type is
resource_group or resource_endpoint; durationDays 7, 30 or 90. Ask for
the shortest that covers the task. Omit requesterId and email: the
request is filed for the key's owner.<app>/approval-requests). Poll
GET /public/v1/access-requests/{accessRequestId} every 30 s for 10 tries,
then every 5 minutes; after a few hours, stop and tell the user.An admin's request for themselves is approved by the service; read the
returned status and grant. Holding an admin key doesn't make a decision
yours. Call …/approve or …/reject only when the user explicitly tells you
to decide that specific request. Never approve a request you filed, or one you
think the task needs: that would be an agent granting itself a credential.
passport request for anything you send yourself:
passport request -X POST -H 'Authorization: Bearer {{vault:<id>}}' -- https://api.example.com/v1/x.
The -- keeps the URL from being read as one more header.HTTPS_PROXY), in a
shell started after passport login. Call the real upstream host; the Proxy
isn't a base URL.fetch ignores HTTPS_PROXY without --use-env-proxy
or NODE_USE_ENV_PROXY=1. Guard for it in code you write.A 502 with x-passport-proxy-error is the Proxy refusing, not the upstream:
read it and x-passport-proxy-refs first. A 401 from the upstream: work
through references/concepts.md, "Errors that look like auth problems", and
report which causes you ruled out. Never start trying credentials directly.
The API serves its own agent context, unauthenticated, at PASSPORT_API_URL:
/llms.txt (start here), /llms-full.txt, /openapi.json. Send
Accept: application/problem+json for errors with retryable and
owner_action_required. Read them before writing a client.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub postmanlabs/passport-skills --plugin passport2 skills in this plugin