Authentication
Every request carries a token in Authorization: Bearer <token>. A token always belongs to one organization – you do not need the X-Tenant header (if you send it and it does not match, you get 403 token_tenant_mismatch). Notcha offers three kinds of access:
| For | Made in | Valid | |
|---|---|---|---|
| Personal API token | your scripts, CLIs, Cursor, Claude Code | Profile → API and apps | 30, 90, 365 days or no limit |
| Integration token | Zapier, Make, your own system | Organization settings → Integrations | 30, 90, 365 days or no limit |
| OAuth 2.1 | third-party apps, Claude.ai, ChatGPT | the person allows the app | access 1 hour, refresh 90 days |
Tokens start with ntc_ (e.g. 12|ntc_…), so GitHub and other services recognise them if they leak into a repository. The secret is shown once.
Personal API token
A token has the rights of its owner – it sees and changes only what they can – and only in the areas chosen when it was made. When the person leaves the organization, the token stops working. Its owner gets an e-mail when a token is created.
Organization integration (service account)
An admin of the organization creates an integration (e.g. "Zapier") in Organization settings → Integrations, picks its projects and role (member or project admin) and issues tokens for it.
- it takes no seat, never signs in and gets no notifications,
- the history and the tickets show its name, not the name of whoever set it up,
- it keeps working when that person leaves the organization.
Integrations come with the Team plan.
Scopes
Every token has scopes. read = every area to read, write = everything (writing includes reading). Or per area <area>:read / <area>:write:
| Area | Covers |
|---|---|
projects |
projects, columns, labels, milestones, wiki, links |
tickets |
tickets, search, saved filters, bulk changes |
comments |
comments, threads, messages, polls |
files |
attachments of tickets and projects |
time |
time entries, timer, approvals and closings |
calendar |
events, absences, holidays |
people |
people of the organization and projects, teams, clients, contacts |
reports |
stats, exports, client reports, invoices |
quotes |
quotes, sending them to the client, turning them into projects |
notifications |
notifications and their settings |
settings |
SLA, forms, widget, ticket types, custom fields, automations |
webhooks |
managing webhooks |
GET /me and the list of organizations work with any token. A token never reaches billing and plans, account security (password, 2FA, sessions, tokens, connected apps), the administration of Notcha, deleting an organization or the AI features – those answer 403 token_route_internal. A missing scope answers 403 token_ability_missing.
Plans: reading over the API works in every plan including Free; writing needs the Team plan or higher (else 403 plan_feature_missing).
OAuth 2.1 for apps
For apps acting on behalf of a person (and for MCP), Notcha is an OAuth 2.1 authorization server. It supports only the authorization code flow with PKCE (S256) for public clients – no client secret.
Metadata: GET https://notcha.cz/.well-known/oauth-authorization-server
| Endpoint | URL |
|---|---|
| Client registration (RFC 7591) | POST /oauth/register |
| Authorization | GET /oauth/authorize |
| Token | POST /oauth/token |
| Revocation (RFC 7009) | POST /oauth/revoke |
1. Register
curl -X POST https://notcha.cz/oauth/register -H "Content-Type: application/json" -d '{
"client_name": "My app",
"redirect_uris": ["https://my-app.example/oauth/callback"],
"token_endpoint_auth_method": "none"
}'
# → {"client_id": "ntc_app_…", …}
Redirect URIs must be https://, http://localhost / http://127.0.0.1 (any port) or the app's own scheme (cursor://…).
2. Authorize
Generate a code_verifier (43–128 characters) and code_challenge = BASE64URL(SHA256(verifier)). Send the person to:
https://notcha.cz/oauth/authorize?response_type=code
&client_id=ntc_app_…
&redirect_uri=https://my-app.example/oauth/callback
&code_challenge=…&code_challenge_method=S256
&state=…
&scope=tickets:write time:write (optional)
They sign in, pick the organization and whether the app may only read or also change things. They come back to redirect_uri with code, state and iss. If they decline, you get error=access_denied.
3. Exchange the code
curl -X POST https://notcha.cz/oauth/token \
-d grant_type=authorization_code -d client_id=ntc_app_… \
-d code=… -d redirect_uri=https://my-app.example/oauth/callback -d code_verifier=…
{"access_token": "34|ntc_…", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "ntr_…", "scope": "write"}
A code is valid for 10 minutes, once – a second use revokes everything the first one gave.
4. Refresh
curl -X POST https://notcha.cz/oauth/token -d grant_type=refresh_token -d client_id=ntc_app_… -d refresh_token=ntr_…
The refresh token rotates on every use. Using an old one again revokes the whole connection (theft protection). A connection lasts 90 days from the last refresh; the person can disconnect it any time in Profile → API and apps.