Admin create FAQ
FAQs
Admin create FAQ
Add a FAQ entry shown on the mobile app FAQ screen.
POST
Admin create FAQ
Overview
Creates a FAQ entry. SetisPublished: true to make it immediately visible on the public GET /faqs endpoint, or false to keep it as a draft.
Authentication
Bearer <accessToken> with scope: 'admin' required (requireAdmin).
Role-gated to SUPER and MODERATOR. FINANCE is read-only on the FAQs surface.
Request body
| Field | Type | Required | Constraints | Example |
|---|---|---|---|---|
question | string | yes | 1..300 chars, trimmed. | How does Swappr work? |
answer | string | yes | 1..5000 chars, trimmed. | You create a profile… |
order | integer | yes | ≥ 0. Lower numbers appear first. | 1 |
isPublished | boolean | yes | true shows it on the app; false is a draft. | true |
Response — 201 Created
Returns the created FAQ row (id, question, answer, order, isPublished, createdAt, updatedAt).
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | Missing/blank field, or out-of-range order. |
| 401 | UNAUTHENTICATED | Missing, malformed, expired, or non-admin-scope token. |
| 403 | FORBIDDEN | Admin authenticated but role is FINANCE (read-only). |
Side effects
- Inserts a row into the
faqscollection. - Writes a
faq.createdadmin audit-log row.