Skip to main content

adaline.ink API Reference

Complete REST API documentation for the Adaline platform.

Base URL

https://api.adaline.ink

Authentication

All API requests require a Bearer token in the Authorization header. Obtain tokens via the login endpoint.

Authorization: Bearer <access_token>

Access tokens expire after 15 minutes. Use the refresh endpoint to obtain a new one.

Error Format

All errors return JSON with an error or detail field:

{
  "detail": "Document not found"
}

HTTP status codes: 400 (validation), 401 (unauthorized), 403 (forbidden), 404 (not found), 429 (rate limited), 500 (server error).

Rate Limits

API requests are rate-limited per IP. If you exceed the limit, you'll receive a 429 response. Wait and retry.


Auth

POST /api/v1/auth/register

Create a new account.

FieldTypeRequired
emailstringYes
passwordstringYes
full_namestringYes
invite_tokenstringNo

Returns: { user, tokens: { access_token, refresh_token } }

POST /api/v1/auth/login

FieldTypeRequired
emailstringYes
passwordstringYes

Returns: { access_token, refresh_token, token_type }

POST /api/v1/auth/refresh

FieldTypeRequired
refresh_tokenstringYes

Returns: { access_token, refresh_token, token_type }

POST /api/v1/auth/logout

FieldTypeRequired
refresh_tokenstringYes

Users

GET /api/v1/users/me

Returns the current user profile including onboarding state and survey responses.

PATCH /api/v1/users/me

Update user settings.

FieldType
show_badgeboolean

GET /api/v1/users/me/onboarding

Returns: { step, completed }

PATCH /api/v1/users/me/onboarding

FieldType
stepnumber
completedboolean
skippedboolean

GET /api/v1/users/me/survey

Returns: { responses }

PUT /api/v1/users/me/survey

Replace all survey responses.

FieldType
responsesobject

Organizations

GET /api/v1/orgs/

List organizations the current user belongs to.

POST /api/v1/orgs/

Create a new organization.

FieldTypeRequired
namestringYes

GET /api/v1/orgs/:org_id

Get organization details.

GET /api/v1/orgs/:org_id/members

List organization members with roles.

POST /api/v1/orgs/:org_id/invitations

Invite a user to the organization.

FieldTypeRequired
emailstringYes
rolestringNo (default: member)

Documents

GET /api/v1/documents/?org_id=:org_id

List documents for an organization. Returns uploaded_by_name and tags.

POST /api/v1/documents/upload?org_id=:org_id

Upload a document. Send as multipart/form-data with a file field.

Supported formats: PDF, DOCX, PPTX, HTML, Markdown, LaTeX, PNG, JPG.

Max sizes: PDF/PPTX 100MB, DOCX 50MB, HTML/MD/LaTeX 10MB, Images 20MB.

Returns: { id, filename, content_type, size_bytes, doc_type }

GET /api/v1/documents/:id

Get document details including tags and uploader name.

GET /api/v1/documents/:id/preview

Get a presigned URL to preview/download the document. URL expires in 1 hour.

Returns: { preview_url, content_type, filename }

DELETE /api/v1/documents/:id

Delete a document and all associated data (versions, shares, tags, jobs).


Document Sharing

POST /api/v1/documents/:id/shares

Share a document with a user or organization.

FieldType
user_emailstring
org_idstring
permissionstring (view, score, full)

GET /api/v1/documents/:id/shares

List shares for a document.

DELETE /api/v1/documents/:id/shares/:share_id

Revoke a share.

POST /api/v1/documents/:id/public-share

Create a public read-only link (adaline.observer).

FieldType
expires_in_daysnumber (optional)

Returns: { id, token, url, expires_at }

GET /api/v1/public/:token

View a public share (no authentication required). Returns document metadata and presigned preview URL.


Conversions

POST /api/v1/conversions/

Start a document conversion job.

FieldTypeRequired
document_idstringYes

Returns: { job_id, document_id, status }

GET /api/v1/conversions/:job_id

Get conversion job status with pipeline steps.

Returns: { id, status, steps: [{ step_name, status, duration_ms }] }


Compliance

POST /api/v1/compliance/test

Run a compliance check on a document.

FieldTypeRequired
document_idstringYes
tiersnumber[]No (default: [1])

Returns: { overall_score, grade, compliant, categories, checks }

GET /api/v1/compliance/reports/:document_id

List compliance reports for a document.

GET /api/v1/compliance/reports/:document_id/:report_id

Get a specific compliance report with full check details.


Tags

GET /api/v1/tags?org_id=:org_id

List tags for an organization.

POST /api/v1/tags

Create a tag.

FieldTypeRequired
namestringYes
colorstringNo
org_idstringYes

DELETE /api/v1/tags/:tag_id

Delete a tag.

POST /api/v1/tags/:tag_id/documents/:document_id

Add a tag to a document.

DELETE /api/v1/tags/:tag_id/documents/:document_id

Remove a tag from a document.


Analytics

GET /api/v1/analytics/dashboard?org_id=:org_id

Dashboard analytics: document counts, storage, upload trends, compliance scores, job statuses.

GET /api/v1/analytics/org/:org_id

Per-user analytics for organization overview.

GET /api/v1/analytics/onboarding

Onboarding funnel analytics (staff only). Returns completion rate, drop-off by step, survey completion, time to first upload.

© 2026 Adaline LLC