Skip to content
thefaqappthefaqapp
Browse docs

API reference

Every v1 endpoint. URL, method, body, response shape, error codes.

Updated 2026-05-19

curl https://api.thefaq.app/api/v1/health

Every endpoint sits under /api/v1/{organizationSlug}/.... Authentication is by Authorization: Bearer <api-key> on every request except /api/v1/health.

Conventions

Request: JSON for write bodies, query params for filters. Content-Type required on writes.

Response envelope:

{
  "data": { /* the actual payload */ },
  "meta": {
    "pagination": { "page": 1, "limit": 20, "total": 57, "pages": 3 }
  }
}

Error envelope:

{
  "error": {
    "code": "not_found",
    "message": "Question not found"
  }
}

Status codes: 200 OK, 201 Created, 400 (validation), 401 (auth), 403 (scope), 404 (not found), 409 (conflict), 429 (rate limit), 500 (us).

Authentication

API keys are scoped (read / write / admin). Send as a bearer token:

curl https://api.thefaq.app/api/v1/acme/questions \
  -H "Authorization: Bearer $FAQAPP_API_KEY"

Rate limits are per-key per-minute, derived from the organization’s plan tier. The response includes X-RateLimit-Remaining and X-RateLimit-Reset.

Resources

Health

curl https://api.thefaq.app/api/v1/health

Returns 200 with { "data": { "ok": true, "time": "<ISO-8601>" } } when the Worker + Hyperdrive + Neon path is healthy. 503 otherwise. Every response carries an X-Request-Id header, and a 500 body repeats it as error.requestId. Quote it when you contact support.