pmth_*. These complement short-lived JWTs: instead of repeating a device login or a full OAuth flow, your integration exchanges a stored API key for a short-lived JWT on demand.
Two types of API keys exist:
| Type | Prefix | Scope | Created via |
|---|---|---|---|
| M2M client secret | pmth_cs_… | App-level (all users) | App credentials endpoint |
| Per-user API key | pmth_ak_… | Scoped to one externalUserId | POST .../users/{id}/keys |
| App-level API key | pmth_ak_… | Tied to an app subscription | POST .../keys |
Per-user API keys
Issue long-lived API keys to specific end-users. These are suitable for CLI tools and service accounts where the user authenticates once and stores the key.Create a key
pmth_* secret is returned once only at creation time. Store it securely.
List keys
pmth_* value is never returned after creation.
Revoke a key
401.
App-level API keys
App-level keys are tied to a subscription and suitable for app-wide machine access without a specific user context.pmth_ak_… format.
Exchange API key → short-lived JWT
Exchange apmth_* API key for a short-lived user JWT using Bearer auth:
Exchange API key → signer session
Skip the separate signer session exchange by using the SDK helper, which calls the API key token endpoint and then performs the RFC 8693 exchange in one step:Validate an API key (subscription-backed)
To validate a Bearerpmth_* key and check the associated plan and capabilities, use the internal validation endpoint. This is used by integrations that need to gate access before processing a request:
{ valid: true, planId: "...", capabilities: [...] } on success.
Security guidance
- Store API keys in a secret manager, not in source code or environment files committed to version control.
- The
pmth_*secret is returned once at creation. If lost, revoke the key and create a new one. - Prefer short-lived JWTs (5-minute TTL) on the signing hot path; exchange the stored API key on demand rather than using it directly as a Bearer token for signing.
- Revoke keys immediately when a user is deactivated or an integration is disconnected.
- Use per-user keys (not the M2M client secret
pmth_cs_…) for end-user-facing integrations so revocation is scoped to one user.
Related guides
- User management — provisioning users before issuing keys
- Token exchange — RFC 8693 signer session exchange
- Signer routing — using the signer session at the DMZ
- Builder SDK —
exchangeApiKeyForUserAccessToken,exchangeApiKeyForSignerSession