Getting Started
Learn how to authenticate and make your first API request.
Base URL
The tersOS API base URL is shown below. All endpoints in this documentation are relative to this base URL.
https://app.tersos.io/apiAuthentication
tersOS uses Bearer token authentication via Laravel Sanctum. Include your API key in the Authorization header of every request.
curl -X GET https://app.tersos.io/api/bookings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json"API keys can be generated from your tersOS admin panel under Settings → API Keys.
Auth Types
tersOS supports three authentication methods depending on the endpoint:
- BearerRequired for most endpoints. Pass your API token in the Authorization header.
- PublicNo authentication needed. Used for public events, check-in kiosks, and similar endpoints.
- Device TokenUsed by display/signage devices. Token is passed in the URL path.
Response Format
All API responses follow a consistent JSON structure.
Success Response
{ "success": true, "data": { ... }}Error Response
{ "success": false, "data": "Error message here"}HTTP Status Codes
| Code | Meaning | Description |
|---|---|---|
200 | OK | Request succeeded. |
201 | Created | Resource created successfully. |
400 | Bad Request | Invalid request parameters. |
401 | Unauthorized | Missing or invalid API token. |
403 | Forbidden | Token lacks required permissions. |
404 | Not Found | Resource does not exist. |
422 | Validation Error | Request body failed validation rules. |
500 | Server Error | Something went wrong on our end. |
Your First Request
Here is how to fetch a list of bookings in your preferred language:
curl -X GET https://app.tersos.io/api/bookings \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Accept: application/json"