Skip to content

Questions API

Create, read, update, delete, schedule, and revise questions. The core resource.

Updated 2026-05-19

The questions resource is the core. Every other resource (categories, translations, revisions) hangs off it.

List

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

Query params: limit (1–100, default 20), cursor, category (slug), status (draft|published|scheduled|archived), q (text search).

Response:

{
  "data": [
    {
      "id": "q_8X3F",
      "slug": "how-to-rotate-keys",
      "title": "How do I rotate an API key?",
      "answer": "Create a new key, swap it in your env, then revoke the old one.",
      "status": "published",
      "categoryId": "c_billing",
      "publishedAt": "2026-05-12T14:23:00Z",
      "scheduledPublishAt": null,
      "createdAt": "2026-05-10T10:00:00Z",
      "updatedAt": "2026-05-12T14:23:00Z"
    }
  ],
  "meta": { "pagination": { "limit": 20, "cursor": null, "hasMore": false } }
}

Get by id or slug

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

Accepts either id (q_8X3F) or slug (how-to-rotate-keys).

Create

curl -X POST https://api.thefaq.app/api/v1/acme/questions \
  -H "Authorization: Bearer $FAQAPP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "How do I rotate an API key?",
    "answer": "Create a new key, swap it in your env, then revoke the old one.",
    "categoryId": "c_billing",
    "status": "published"
  }'

Returns the created question with server-generated id and slug. Idempotent if you pass X-Idempotency-Key.

Required scope: write.

Update

curl -X PATCH https://api.thefaq.app/api/v1/acme/questions/q_8X3F \
  -H "Authorization: Bearer $FAQAPP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "answer": "Updated answer." }'

Every update creates a revision. The most recent 50 are retained per question.

Schedule publish

Set status: "draft" and scheduledPublishAt: "2026-06-01T12:00:00Z". A 5-minute cron promotes scheduled questions whose time has passed.

Delete

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

Returns 204 No Content. Soft delete; question is purged from the database after 30 days.

Error codes

  • question_not_found (404): id or slug doesn’t exist in this org
  • validation_failed (400): required field missing or wrong type
  • category_not_found (400): categoryId doesn’t exist in this org
  • plan_limit_reached (402): your org hit its question cap; upgrade or delete
  • slug_conflict (409): manual slug already taken in this org