Developer API

Authentication

The API uses Grik account identity for key management and scoped developer API keys for production integrations.

User tokens

Use device login for browserless clients, local Ricochet tooling, and account-owned key management.

POST/auth/device/code

Create a device code, user code, verification URL, expiry, and polling interval.

Auth: NoneScope: -Audience: Developers
POST/auth/device/token

Exchange an approved device code for access and refresh tokens.

Auth: NoneScope: -Audience: Developers
POST/auth/refresh

Rotate a refresh token and receive a fresh access token.

Auth: NoneScope: -Audience: Developers
GET/users/me

Return the authenticated user profile used for billing and ownership.

Auth: Bearer tokenScope: -Audience: Developers

Developer API keys

Create and manage bearer API keys. Scopes below apply to API keys; user access tokens are authenticated separately.

POST/auth/api-keys

Issue an organization API key such as grik_live_... for server-side integrations.

Auth: User tokenScope: -Audience: Developers
GET/auth/api-keys

List active and revoked API keys without exposing the raw secret.

Auth: User tokenScope: -Audience: Developers
PATCH/auth/api-keys/:id

Update key metadata, scopes, environment, status, or spend controls without revealing the raw secret.

Auth: User tokenScope: -Audience: Developers
DELETE/auth/api-keys/:id

Revoke an API key by id. Revoked keys fail authentication immediately.

Auth: User tokenScope: -Audience: Developers