Skip to main content

How it works

The API uses a Bearer token. The token is your ReyGrid API key, sent in the Authorization header of every authenticated request. Every endpoint except GET /ping requires authentication.

Validate a key

GET /validate confirms a key works and returns usage.total and usage.quotaLimit. See the reference.

Authentication errors

A missing or invalid key returns 401 with the flat AuthErrorResponse shape:
401 bodies are not wrapped like other errors ({ "success": false, "error": { … } }). Check the HTTP status first, then parse accordingly. See Errors.

Security considerations

  • Keep keys on the server. Don’t ship them in browser or mobile code.
  • Load keys from environment variables or a secrets manager. Don’t commit them.
  • Avoid logging the Authorization header.
  • Always use HTTPS. The base URL is https://reygrid.com/api/v1.
  • If you build per-user experiences, authenticate users in your backend and call ReyGrid from there. See Persistent conversations.
The OpenAPI specification documents only the Bearer API key. It does not describe key creation, rotation, or scopes.