PassportCraft Whoami API
The Whoami API from PassportCraft — 1 operation(s) for whoami.
The Whoami API from PassportCraft — 1 operation(s) for whoami.
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/passportcraft-com:passportcraft-com-whoami-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: PassportCraft Whoami API
version: '2026-08-01'
description: 'Create and publish Digital Product Passports. A credential reaches only the organizations it holds a grant for. The two category endpoints describe the product itself rather than a tenant, and answer without a credential.
Forward compatibility. This document describes what /v1 sends today, and we add to it without warning — every object schema is deliberately open. To stay compatible:
- Ignore response fields you do not recognise, rather than rejecting the response.
- Treat an unrecognised enum value as a default case, not an error.
- Treat identifiers as opaque strings; never parse or pattern-match them.
- Do not depend on the ORDER of fields in a JSON object, or on the exact wording of a human-readable error message. Branch on the machine-readable error code instead.
- Retry on 429, and on any other refusal that carries a Retry-After header, waiting for the time it names. It is not only a 429 header: a 409 resource_busy, a 503 storage_unavailable and a 503 entitlement_unavailable carry one too, because retrying is their remedy.
- Retry a 5xx with a NEW Idempotency-Key. A key that recorded a server error replays that error for the retention window — deliberately, because the failure may have been a lost response to a write that SUCCEEDED, and reusing the key is what stops one failed write becoming two.
- Retry a refused conditional write with a NEW Idempotency-Key. A precondition_failed is recorded against the key that received it and replays for the retention window, so re-reading the passport and retrying under the SAME key returns the original refusal — with the version numbers the FIRST attempt saw. The recording is deliberate: it is what makes a retry after a lost response safe. This applies to the 412 only. A 400 for a malformed header is refused before any key is claimed and is never recorded, so correct the header and retry under the SAME key: your original result is still there.
- Watch for the Deprecation and Sunset response headers, and for the Link: rel="successor-version" they carry. That is how the removal of an endpoint is announced, and it arrives long before the endpoint stops answering.
Treat every identifier as an opaque string of at most 255 characters. Do not parse them, do not validate their format, and do not assume they are UUIDs — the format may change without notice.
Deprecation. An endpoint scheduled for removal answers with `Deprecation` (RFC 9745) and `Sunset` (RFC 8594) headers, and a `Link: rel="successor-version"` pointing at its replacement. Watch for them.
The full compatibility contract, including the enumerated list of changes that would require a new major version, is published at https://passportcraft.com/docs/api/compatibility.'
servers:
- url: https://passportcraft.com/api/v1
security:
- bearerAuth: []
tags:
- name: Whoami
paths:
/whoami:
get:
operationId: getWhoami
summary: Describe the calling credential
security:
- bearerAuth: []
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/Credential'
'400':
description: 'The request could not be understood. Codes: invalid_request, mode_mismatch.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: 'Missing or invalid credential. Codes: invalid_key, key_expired, key_revoked, key_rotated.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'413':
description: 'The request body is larger than this endpoint accepts. Codes: payload_too_large.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: 'Rate limited, or the destructive-transition cap was reached. Codes: rate_limited.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: 'Internal error. Codes: configuration_error, internal_error.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Whoami
components:
schemas:
Error:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
error:
type: object
properties:
code:
type: string
enum:
- invalid_key
- key_revoked
- key_expired
- key_rotated
- mode_mismatch
- insufficient_scope
- organization_not_found_or_not_granted
- resource_not_found
- wildcard_not_supported
- validation_failed
- invalid_request
- method_not_allowed
- payload_too_large
- body_too_deep
- unsupported_media_type
- idempotency_conflict
- already_exists
- gtin_in_use
- variant_limit_reached
- variant_review_required
- variant_review_changed
- precondition_failed
- resource_busy
- cursor_invalid
- no_subscription
- plan_required
- payment_overdue
- gtin_required
- wrong_status
- not_trashed
- publish_limit_reached
- unit_limit_reached
- document_missing
- document_feeds_extraction
- document_feeds_reading
- invalid_input
- invalid_observed_on
- invalid_source
- invalid_field
- invalid_note
- invalid_value
- invalid_document_id
- unit_status_required
- unit_status_transition_forbidden
- unit_status_history_conflict
- unit_reading_document_unavailable
- delegation_required
- attestation_required
- test_mode_refused
- example_passport_not_fileable
- human_approval_required
- connector_writes_drafts_only
- proposal_requires_assistant
- no_changes
- unit_status_not_allowed
- portal_unavailable
- storage_unavailable
- entitlement_unavailable
- scope_exceeds_key
- france_mandate_required
- grantor_not_seated
- key_not_grantable
- grant_conflict
- live_key_playground_only
- rate_limited
- internal_error
- configuration_error
message:
type: string
documentation_url:
type: string
request_id:
type: string
details:
type: object
propertyNames:
type: string
additionalProperties: {}
required:
- code
- message
- documentation_url
- request_id
additionalProperties: {}
required:
- error
additionalProperties: {}
Credential:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
object:
type: string
const: credential
key_id:
type: string
livemode:
type: boolean
owner_organization_id:
type: string
maxLength: 255
expires_at:
anyOf:
- type: string
- type: 'null'
last_used_at:
anyOf:
- type: string
- type: 'null'
organizations:
type: array
items:
type: object
properties:
organization_id:
type: string
maxLength: 255
scopes:
type: array
items:
type: string
granted_at:
type: string
required:
- organization_id
- scopes
- granted_at
additionalProperties: {}
required:
- object
- key_id
- livemode
- owner_organization_id
- expires_at
- last_used_at
- organizations
additionalProperties: {}
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A secret key, `pc_sk_live_…` or `pc_sk_test_…`. The mode is bound into the credential itself, so a test key cannot reach live passports.