Sentily is in active early development. Features, integrations, and pricing are still evolving — request access to try it out.

Sentily API Documentation

This document covers two different things, and they don't share authentication:

  1. The external API (/api/v1/...) — authenticated by a project-scoped API key, meant to be called from your own application. See External API (v1) below.
  2. The internal JSON/AJAX endpoints the Sentily web frontend itself uses (/submit_feedback, /get_feedback, etc.) — session-cookie + CSRF authenticated, the same mechanism the website's own JS uses. These are documented further down for completeness, but they're not a stable contract the way /api/v1 is meant to be — they're free to change shape alongside the dashboard.

External API (v1)

Authentication

Every /api/v1/... request needs an API key in the Authorization header:

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Each key belongs to one project: everything it creates or reads is in that project. There's no self-serve key management in the app yet — ask the Sentily team for a key for your project. A key is only ever shown once, when it's created, so store it somewhere safe (and treat it like a password: keep it on your server, never in browser or mobile app code). If a key leaks, ask for it to be revoked and replaced.

A missing, invalid, or revoked key gets 401. No CSRF token is needed on these endpoints.

Quick start

curl -X POST https://YOUR-SENTILY-APP/api/v1/feedback \
  -H "Authorization: Bearer sk_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"content": "Checkout was quick and painless."}'

The response is the stored entry, including its sentiment analysis if the project had credits available (see Create Feedback).

Errors

Every error response from /api/v1/... has the same shape — a human-readable error plus a stable code you can branch on programmatically instead of parsing the message text:

{"error": "Invalid or revoked API key", "code": "invalid_api_key"}
Code HTTP status Meaning
missing_api_key 401 No Authorization: Bearer ... header sent
invalid_api_key 401 Key doesn't exist, or has been revoked
validation_error 400 content missing/empty, or another field failed validation
invalid_source 400 source_id doesn't match a real FeedbackSource
not_found 404 The feedback id doesn't exist, or belongs to a different project than the key
rate_limited 429 Too many requests for this key — see Rate limiting below

Rate limiting

Per-key (not per-IP): 30/minute on the create endpoint, 60/minute on the read endpoints. 429 past that, with code: "rate_limited".

Response times

Creating feedback runs AI analysis before responding, so expect it to take a few seconds. And while Sentily is in early access, the service sleeps when idle: the first request after a quiet period can take up to a minute while it wakes. Set your client's timeout to at least 90 seconds, and retry on a timeout rather than treating it as a failure.

1. Create Feedback

2. List Feedback

3. Get a Single Feedback Entry


Internal Endpoints (web frontend's own AJAX)

The rest of this document describes the JSON/AJAX endpoints the Sentily web frontend itself uses for feedback management and analysis. Every endpoint below uses the same session-cookie login as the website, plus a CSRF token on anything that changes data — not the API-key scheme above. The one exception, Webhook Receiver, predates the external API and uses its own shared-secret-per-integration scheme.

Base URL

Relative to wherever Sentily is deployed, e.g. http://localhost:5000 in local development. All paths below are relative to that.

Session Authentication

Sentily uses session-cookie authentication (Flask-Login), the same mechanism the website itself uses:

  1. POST /login with username (username or email) and password form fields. On success, a signed session cookie is set; the browser (or your HTTP client, if it persists cookies) sends it automatically on subsequent requests.
  2. Most endpoints also require a project to be selected in that session (POST /select_project with a project_id form field, or simply having visited the dashboard before, which selects one automatically). Endpoints that need this return 400 {"error": "No project selected"} if none is set.

These endpoints don't accept the /api/v1 API key described above — requests without a valid session cookie get redirected to /login (HTML routes) or 401/403 JSON (AJAX-style routes).

CSRF tokens

Every POST / PUT / PATCH / DELETE endpoint below additionally requires a valid CSRF token, checked against the value stored in your session. Get the current token either from the rendered page (a <meta name="csrf-token" content="..."> tag, or Jinja's csrf_token() template helper) and send it as:

A missing or mismatched token gets a 400 Bad Request before the endpoint's own logic ever runs.

Rate limiting (internal endpoints)

Several endpoints are rate-limited per client (Flask-Limiter), noted per endpoint below. Exceeding the limit returns 429 Too Many Requests.

Endpoints


1. Submit Feedback

Submit new feedback into your currently-selected project.


2. Retrieve Feedback Entries

Paginated, filterable list of feedback for the session's selected project.


3. Retrieve Single Feedback Entry


4. Update Feedback Entry

Update an existing entry's content, source, or date. If content changes and credits are available, it's automatically re-analyzed.


5. Delete Feedback Entry


6. Import Feedback via CSV

Bulk-create feedback from an uploaded CSV file.


7. Export Feedback

Export the selected project's feedback (with the same filters as Retrieve Feedback Entries) as a file download.

A parallel /export/analytics.csv endpoint exports the project's overall sentiment percentages (no per-entry filters) in the same way.


8. Webhook Receiver

An older way for another service to push feedback in, predating the External API. It authenticates with a per-integration shared secret, which there's currently no way to set up from the app — so for new integrations, use the External API instead.

If credits are available in the integration's project, the feedback is analyzed automatically after being saved; if not, it's still saved unanalyzed (see Credits & the Periodic Allowance in the Developer Guide — there's no way to buy more credits via this endpoint or any other).