Getting started

Authentication

Every call is authenticated with an API key sent in a request header.

Send your API key in the x-api-key header on every request. Keys are issued per workspace from the Synquery app, and each key can be scoped to what it is allowed to do.

Base URL and format

  • Base URL: https://api.synquery.com/v0

  • JSON in and JSON out, with Content-Type: application/json

  • Timestamps in ISO 8601, UTC

Key scopes

A workspace can hold several keys. Each key is scoped to read, write and/or billing. A call outside a key's scope returns 403 forbidden_scope.

Keeping keys safe

  • Rotate or revoke keys in the Synquery app at any time.

  • Keys never appear in responses or logs.

  • Every request, key use and key change is recorded in your workspace's audit log, which you can export.

  • Call the API from your server, never from a browser or mobile app, so the key stays private.

Headers

x-api-keystringRequired#
Your workspace API key. A missing, invalid or revoked key returns 401 unauthorized.
Content-TypestringDepends#
application/json on calls with a body.
Idempotency-KeystringOptional#
Recommended on POST /questions. See Idempotency.

Next

Questions and presets →

Authenticated requestbash
curl https://api.synquery.com/v0/usage \
  -H "x-api-key: YOUR_KEY"
Missing or invalid key · 401json
{
  "error": {
    "code": "unauthorized",
    "message": "Missing, invalid or revoked API key"
  }
}