Identity and sign-in
Who a credential belongs to, the CLI's device sign-in and handoff links.
On this page
Concepts: Agents and MCP
Endpoint summaries come from the OpenAPI document.
GET/v1/me
Identity behind the credential: team key (team, role, permissions) or project key (its project)
- Operation (MCP tool)
getMe- Authentication
- API key (pfa_…)OAuth token (pfo_…)Project key (pfc_…)
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/auth/device
Start a device sign-in (RFC 8628); the user approves at verificationUri
- Operation (MCP tool)
startDeviceAuthorization- Authentication
- No credentials
Request body
application/jsonobjectOptional
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/auth/device/token
Exchange an approved device code for a CLI API key (once). 400 authorization_pending | slow_down | access_denied | expired_token
- Operation (MCP tool)
pollDeviceAuthorization- Authentication
- No credentials
Request body
application/jsonobjectRequired
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/auth/handoff
Exchange a one-time handoff link (pfh_…) for an agent key limited to one project
- Operation (MCP tool)
exchangeHandoff- Authentication
- No credentials
Request body
application/jsonobjectRequired
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/auth/logout
Revoke the calling API key
- Operation (MCP tool)
logout- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.