API reference

The full DaRetriva REST API β€” every endpoint used by the app itself, generated directly from the live schema so it's never out of date.

Authentication

Log in to receive a bearer JWT, then send it on every subsequent request. Tokens expire after 24 hours by default; call the logout endpoint to revoke one early.

curl -X POST https://daretriva.com/api/organization/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"β€’β€’β€’β€’β€’β€’β€’β€’"}'

# β†’ { "token": "eyJhbGciOi...", "email": "you@example.com", ... }

curl https://daretriva.com/api/agents \
  -H "Authorization: Bearer eyJhbGciOi..."

List your AI agents

curl https://daretriva.com/api/agents \
  -H "Authorization: Bearer $TOKEN"

Upload a document

curl -X POST https://daretriva.com/api/upload \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@handbook.pdf" \
  -F "dataset_id=your-dataset-id"

Chat with a public widget (no auth)

Widget endpoints are unauthenticated β€” scoped only to the one agent behind the public token. See the Widget Integration guide.

curl -X POST https://daretriva.com/api/public/widget/{token}/chat \
  -H "Content-Type: application/json" \
  -d '{"message":"What data sources do you support?","language":"en"}'