Skip to main content
OAuth 2.1 authorization-code grants for Korve’s CLI and MCP clients. Access tokens are short-lived, refresh tokens rotate, and every grant is organization-, audience-, scope-, user-, and role-bound.

agentAuth.createAuthorizationRequest

Begin a first-party OAuth authorization-code flow with PKCE.
  • Auth: None — public endpoint.
  • Risk: write · sensitive (elevated blast radius)

Request body

Example

Responses

Response body (201)

agentAuth.getAuthorizationRequest

Inspect a pending first-party authorization request before approving or denying it.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: read

Example

Responses

Response body (200)

agentAuth.denyAuthorizationRequest

Deny a pending authorization request and return only its previously bound loopback redirect and state.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: write · sensitive (elevated blast radius)

Request body

A object value.

Example

Responses

Response body (200)

agentAuth.approveAuthorizationRequest

Approve a pending authorization request as the signed-in user. The grant can never exceed the approving user’s organization role.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: write · sensitive (elevated blast radius)

Request body

A object value.

Example

Responses

Response body (200)

agentAuth.createDeviceAuthorization

Begin a device authorization flow for a browserless or sandboxed client. A human approves the short pairing code on the dashboard while the client polls the token endpoint.
  • Auth: None — public endpoint.
  • Risk: write · sensitive (elevated blast radius)

Request body

Example

Responses

Response body (201)

agentAuth.getDeviceAuthorization

Inspect a pending device authorization by its user code before approving or denying it.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: read

Path parameters

Example

Responses

Response body (200)

agentAuth.approveDeviceAuthorization

Approve a pending device authorization as the signed-in user. The grant can never exceed the approving user’s organization role; the polling client redeems it for tokens.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: write · sensitive (elevated blast radius)

Path parameters

Request body

A object value.

Example

Responses

Response body (200)

agentAuth.denyDeviceAuthorization

Deny a pending device authorization. The polling client stops with an error.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: write · sensitive (elevated blast radius)

Path parameters

Request body

A object value.

Example

Responses

Response body (200)

agentAuth.exchangeToken

Exchange an authorization code with its PKCE verifier, poll an approved device authorization, or rotate a refresh token. Refresh-token reuse revokes the entire grant.
  • Auth: None — public endpoint.
  • Risk: write · sensitive (elevated blast radius)

Request body

Example

Responses

Response body (200)

agentAuth.revokeToken

Revoke the complete grant family identified by a refresh token. Unknown tokens return the same response to avoid an oracle.
  • Auth: None — public endpoint.
  • Risk: write · sensitive (elevated blast radius)

Request body

Example

Responses

Response body (200)

agentAuth.listGrants

List the signed-in user’s grants; admins may inspect all grants in the organization.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: read

Example

Responses

Response body (200)

An array of objects with these fields:

agentAuth.revokeGrant

Revoke a grant and all of its access and refresh tokens. Members may revoke their own grants; admins may revoke any grant in the organization.
  • Auth: Dashboard session only — organization API keys are rejected.
  • Minimum role: member
  • Risk: write · sensitive (elevated blast radius)

Example

Responses

Response body (200)