API basics
Requests and responses
- Send bodies as JSON (
Content-Type: application/json) and ask for JSON (Accept: application/json). - A successful answer has its data in
data, lists alsometa:
{"data": [{"ref": "WEB-12", "title": "…"}], "meta": {"next_cursor": "eyJ…"}}
- Times are UTC in ISO 8601 (
2026-12-01T09:30:00+00:00), datesYYYY-MM-DD. - Texts of tickets and comments are HTML (
description_html,body_html); Notcha sanitizes them on save (the tags the editor allows). Accept-Language(cs,en) picks the language of messages.
Errors
An error always has the same shape – message for people, code for programs, and errors per field for validation:
{"message": "The title is required.", "code": "validation_failed", "errors": {"title": ["The title is required."]}}
| Status | When | Example code |
|---|---|---|
| 400 | the organization is missing or does not match | tenant_required |
| 401 | no token, invalid or expired | unauthenticated |
| 402 | the organization waits for a payment | tenant_payment_required |
| 403 | the token or the person may not do this | token_ability_missing, token_route_internal, plan_feature_missing, forbidden |
| 404 | does not exist, or you may not see it | not_found |
| 409 | a concurrent change – send again with the lock_version from the X-Lock-Version header |
ticket_conflict |
| 422 | invalid data | validation_failed |
| 429 | too many requests | too_many_requests |
Pagination
Lists use a cursor. Page size per_page (default 50, max 200), the next page cursor from meta.next_cursor. No next_cursor = the last page.
curl "https://notcha.cz/api/v1/tickets?per_page=100&cursor=eyJ…" -H "Authorization: Bearer $NOTCHA_TOKEN"
Only what changed
Lists of tickets, comments and more accept updated_since=<ISO 8601>: only what changed since then, deleted items included (with deleted: true). Handy for syncing.
Idempotency
POST requests accept an Idempotency-Key header (e.g. a UUID). Repeat a request with the same key (network failure, retry) and you get the stored answer – nothing is created twice. Keys are kept for 24 hours, per person.
Limits
- 120 requests a minute per token (
X-RateLimit-Limit,X-RateLimit-Remaining; over the limit429withRetry-After). - Uploads up to 10 MB, the same file types as in the app.
- Some actions have stricter limits (e.g. bulk changes).
Organization and visibility
A token works in one organization and sees only what its owner (or the integration) may see. A client of a project never gets priority, estimates, time, money or SLA over the API – just like in the app.
Versions and changes
- The API is versioned in the URL (
/api/v1). Within v1 we add fields and endpoints; we do not remove anything or change meanings. - Ignore unknown fields in answers – new ones may appear.
- A breaking change would come as
/api/v2, and v1 would keep running for at least 12 months. Changes are announced in the changelog.