API keys — the Public API
Public API endpoints authenticate with an API key sent as a bearer token:X-Api-Key header with the same value is also accepted.
Getting a key
In the admin console: API & webhooks → Issue key. You need theapi:manage permission, which the Admin preset carries.
Using the playground
Each endpoint page on this reference has a Try it panel.1
Enter your key
Paste it into the bearer-token field. The playground sends it as
Authorization: Bearer <your key>.2
Fill in parameters
For example
date=2026-06-15 on the attendance endpoint.3
Send
The request goes to
https://app.ontime.hosai.app — your real organization.Scopes
A key is issued asReadOnly or ReadWrite. Both currently grant identical access — employee:read and attendance:read — because the public surface has no write endpoints. See Authentication for why.
Rate limit
600 requests per minute per key.Session cookies — the platform routes
The rest of/api/* authenticates with a signed, httpOnly session cookie set at POST /api/auth/login and validated against a live session record on every request.
This is what the OnTime web and mobile apps use. Two consequences:
- Revocation is immediate. Ending a session takes effect at once rather than waiting for a token to expire.
- The playground cannot authenticate these routes. A browser will not attach an OnTime session cookie to a request from this documentation site, so platform endpoints in the playground will return
401. They are documented for reading, not for calling from here.
The MCP server
POST /api/mcp authenticates differently again — an employee-bound API key or an OAuth access token, resolved into a specific employee’s identity so that permissions and scope apply exactly as they do in the app. It speaks JSON-RPC and is not part of this reference. See the AI & MCP tab.
Biometric ingest
/api/ingest/biometric/* authenticates with a shared connector secret and is called only by the OnTime connector running on your network. It is deliberately outside both session and API-key auth. See the Biometric Terminals tab.