Developers / API reference
API reference
HTTP JSON API. Base URL: https://api.dracily.com. Errors: {"message":"…"}.
Authentication
Bearer API keys, cookies, and why you don’t need a client ID.
Scans
Create, poll, results, feedback, and quota behavior.
Endpoint map
| Method | Path | What it does |
|---|---|---|
| GET | /v1/auth/me | Returns the current user, or null / 401 when not signed in. |
| POST | /v1/auth/register | Creates a user + new organization and sets a session cookie. |
| POST | /v1/auth/login | Validates email/password and sets a session cookie. |
| POST | /v1/auth/logout | Clears the session cookie. |
| POST | /v1/auth/forgot-password | Placeholder recovery response until email delivery is live. |
| GET | /v1/scans | Lists org scans. |
| POST | /v1/scans | Creates a scan (UI or API key). Enforces plan limits. |
| GET | /v1/scans/:id | Scan status payload for polling. |
| GET | /v1/scans/:id/result | Full probabilistic result when complete. |
| DELETE | /v1/scans/:id | Deletes scan + result. |
| POST | /v1/scans/:id/feedback | Stores feedback and optional training consent. |
| GET | /v1/models | Lists available detector models. |
| GET | /v1/models/:id | Model detail (requires auth). |
| GET/PATCH | /v1/settings | Read/update workspace settings (includes plan field). |
| GET | /v1/settings/export | Export user data package. |
| DELETE | /v1/settings/data | Delete scans/results/feedback/reports for the org. |
| GET/POST | /v1/api-keys | List keys / create key (secret returned once). |
| DELETE | /v1/api-keys/:id | Revoke a key. |
| GET | /v1/api-logs | Recent API requests made with your keys. |
| GET | /v1/billing | Current plan, used scans/seats/storage vs limits. |
| POST | /v1/billing/:action | Checkout/portal stubs until Stripe is connected. |
| GET | /v1/organizations/:orgId/members | Team roster (must be same org). |
| POST | /v1/organizations/:orgId/invites | Invite member (enforces seat limit). |
| PATCH/DELETE | /v1/organizations/:orgId/members/:id | Change role / remove member. |
| GET/POST | /v1/reports | List / create report exports. |
Minimal curl flow
export API=https://api.dracily.com
export KEY=drac_your_secret
curl -sS "$API/v1/scans" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"inputType":"text","text":"Paste at least thirty characters of content here…","mode":"Standard"}'
