API Reference

API Reference

Common behavior, status codes, and endpoint overview for the CiteArk REST API.

All CiteArk endpoints speak JSON, with base URL https://citeark.com. Public reads require no authentication; write operations such as submitting papers or starting reproductions can use a browser session, or an API Key sent via the x-api-key header. See Authentication.

New machine clients should use the versioned, compact Agent API under /api/v1. Its contract is published at /openapi.json and it uses structured { "error": { "code", "message" } } errors. The unversioned endpoints documented in this section remain compatibility and browser workflow endpoints.

curl https://citeark.com/api/repositories \
  -H "x-api-key: $CITEARK_API_KEY"

Common behavior

  • /api/v1 errors use {"error":{"code":"…","message":"…"}}; compatibility endpoints use {"error":"message"}.
  • Exceeding a rate limit or monthly quota returns 429, always with a Retry-After header. Rate-limit headers are X-RateLimit-*; monthly-quota headers are X-Quota-*. The two are independent. See Rate limits and quotas.
  • Request bodies over 26 MB are rejected with 413 (the paper PDF itself is limited to 25 MB; the headroom covers multipart boundaries and fields).

Status codes

CodeMeaning
200Success
201Created
202Accepted (async execution)
304Not modified (ETag)
400Invalid request
401Not signed in or invalid key
403Insufficient permission
404Not found
409Conflict (e.g. paper already exists)
413Request body too large
422Unprocessable
429Rate limit or quota exceeded
451License does not allow redistribution
502Upstream or integrity check failure
503Service degraded

Endpoint overview

Notes

  • The Agent API is versioned at /api/v1; legacy browser and compatibility routes remain under /api.
  • If a self-hosted deployment sets CITEARK_BACKEND_ORIGIN, the frontend proxies API requests verbatim to that backend.