API Reference

Authentication API

Endpoints for managing tokens, sessions, and API key operations.

Create Token

Exchange API credentials for a short-lived access token.

POST /v1/auth/token
curl -X POST https://api.interna.dev/v1/auth/token \
  -H "Authorization: Bearer sk_live_..." \
  -d '{"scopes":["read:users"],"expires_in":"1h"}'

Revoke Token

Immediately invalidate an access token.

POST /v1/auth/revoke
curl -X POST https://api.interna.dev/v1/auth/revoke \
  -H "Authorization: Bearer sk_live_..." \
  -d '{"token":"tok_abc123"}'

Verify Token

Check whether a token is valid and retrieve its metadata.

GET /v1/auth/verify
curl https://api.interna.dev/v1/auth/verify \
  -H "Authorization: Bearer tok_abc123"