API Reference
Last updated 4 min read
Report issueAPI Reference#
Auto-generated from the live OpenAPI spec at
docs-api.gritiva.com/openapi.json. Last regenerated 2026-05-14. The full machine-readable spec lists 66 endpoints across 6 groups.
Authentication#
Most endpoints require a Bearer token in the Authorization header:
BASH curl -H "Authorization: Bearer $TOKEN" https://docs-api.gritiva.com/api/docs/tree
Get a token via the panel (Settings → API tokens) or POST /auth/login with {"identifier": "...", "password": "..."}.
Conventions#
- Versioning — endpoints under
/api/are stable. - Pagination — cursor-based where applicable. Response includes
next_cursor. - Errors — JSON body with
detailfield; HTTP status reflects the error class. - Timestamps — RFC 3339 UTC always (e.g.
2026-05-14T20:32:51Z). - Rate limits — 600 req/min per token, 60 req/min per IP. Returned in
X-RateLimit-*headers. - 🔒 marker indicates the endpoint requires authentication.
Endpoints#
auth#
5 endpoints
POST/auth/login— LoginGET/auth/me🔒 — Get MePOST/auth/register— RegisterPOST/auth/send-code— Send Verification CodePOST/auth/verify-code— Verify Code Endpoint
admin#
29 endpoints
GET/admin/roles🔒 — List Roles EndpointGET/admin/roles/names🔒 — List Role Names EndpointGET/api/admin/categories/🔒 — List all categories (flat)POST/api/admin/categories/🔒 — Create categoryPOST/api/admin/categories/reorder🔒 — Bulk reorder siblings under a parentGET/api/admin/categories/tree🔒 — Get category treeDELETE/api/admin/categories/{category_id}🔒 — Delete categoryGET/api/admin/categories/{category_id}🔒 — Get category by idPUT/api/admin/categories/{category_id}🔒 — Update categoryPOST/api/admin/categories/{category_id}/move🔒 — Move category among its siblings (up/down)PATCH/api/admin/categories/{category_id}/parent🔒 — Change a category's parentPOST/api/admin/celery/beat/start— Api Start BeatDELETE/api/admin/celery/proc/{proc_id}— Api Delete ProcGET/api/admin/celery/proc/{proc_id}/log— Api Proc LogGET/api/admin/celery/proc/{proc_id}/log/tail— Api Proc Log TailPOST/api/admin/celery/proc/{proc_id}/restart— Api Restart ProcPOST/api/admin/celery/proc/{proc_id}/stop— Api Stop ProcGET/api/admin/celery/procs— Get ProcsPOST/api/admin/celery/refresh— Api RefreshPOST/api/admin/celery/worker/start— Api Start WorkerGET/api/admin/docs/🔒 — List all documents (no ACL filter)POST/api/admin/docs/🔒 — Create a new documentGET/api/admin/docs/buckets/counts🔒 — Counts per bucket (empty/queued/processing/approved/failed)GET/api/admin/docs/buckets/{bucket}🔒 — List documents by bucket with search & paginationDELETE/api/admin/docs/{doc_id}🔒 — Delete a documentGET/api/admin/docs/{doc_id}🔒 — Get a document by id (full payload)PUT/api/admin/docs/{doc_id}🔒 — Update a documentPOST/api/admin/docs/{doc_id}/pin🔒 — Pin a documentPOST/api/admin/docs/{doc_id}/unpin🔒 — Unpin a document
docs#
18 endpoints
GET/api/docs— List Public DocsGET/api/docs/— List public documentsPOST/api/docs/🔒 — Create a new documentPUT/api/docs/iterations/{iteration_id}/draft— Set Iteration DraftGET/api/docs/private🔒 — List documents accessible to current userGET/api/docs/search🔒 — Search documents (ACL-aware)GET/api/docs/suggest🔒 — Suggest titles (ACL-aware)GET/api/docs/suggest/full🔒 — Structured suggestions with slug (ACL-aware)GET/api/docs/tree— Sidebar tree for guests (public only)GET/api/docs/tree/me🔒 — Sidebar tree for current user (ACL-aware)DELETE/api/docs/{doc_id}🔒 — Delete a documentPUT/api/docs/{doc_id}🔒 — Update a documentPOST/api/docs/{doc_id}/pin🔒 — Pin a documentPOST/api/docs/{doc_id}/unpin🔒 — Unpin a documentGET/api/docs/{document_id}/blocks— Get BlocksPUT/api/docs/{document_id}/blocks— Put BlocksGET/api/docs/{slug}🔒 — Get document by slug (ACL-aware)GET/docs/dashboard— Get Dashboard Data
pipeline#
12 endpoints
GET/api/pipeline/docs/backlog— BacklogPOST/api/pipeline/docs/enqueue— EnqueuePOST/api/pipeline/docs/enqueue_many— Enqueue ManyGET/api/pipeline/docs/iterations/{iteration_id}/actions— List ActionsPOST/api/pipeline/docs/iterations/{iteration_id}/actions/{action_id}/answer— Answer ActionPOST/api/pipeline/docs/iterations/{iteration_id}/actions/{action_id}/resolve— Resolve ActionPOST/api/pipeline/docs/iterations/{iteration_id}/approve— ApprovePOST/api/pipeline/docs/iterations/{iteration_id}/questions/{question_id}/answer— Answer QuestionPOST/api/pipeline/docs/iterations/{iteration_id}/redraft— RedraftGET/api/pipeline/docs/job/{job_id}— Job DetailGET/api/pipeline/docs/job/{job_id}/events— Job EventsGET/api/pipeline/docs/status/{job_id}— Status
dataroom#
1 endpoints
GET/dataroom/dataroom/— Dataroom Welcome Message
time#
1 endpoints
GET/api/time— Time Now
Trying it interactively#
Visit docs-api.gritiva.com/docs — the backend serves Swagger UI with a working Authorize button. Paste your bearer token and you can hit any endpoint live.
SDKs (planned)#
We don't ship a first-party SDK yet. Plain HTTPS + JSON works with any HTTP client. See Roadmap for the SDK timeline.
Stability promise#
- Adding response fields or new endpoints — non-breaking, no notice.
- Removing or renaming fields — breaking, bumps to a new path version.
- Removing endpoints — at minimum 90 days deprecation notice in the Changelog.
Related#
- Concepts: Webhooks — outbound event delivery
- Concepts: API Tokens — token management
- Concepts: RBAC and Tenants — permission model
- Architecture Overview