Base URL
All API requests should be made to:
Authentication
The Tomorro API uses API keys for authentication. Include your API key in the x-api-key header with every request.
curl -X GET "https://api.tomorro.com/members" \
-H "x-api-key: your-api-key"
Get your API key Generate an API key from your organization settings.
Keep your API key secure. Do not share it in publicly accessible areas such as GitHub, client-side code, or public repositories.
All responses are returned in JSON format. Successful responses wrap the data in a data field:
{
"data" : {
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"user" : { ... },
"role" : "admin" ,
"status" : "active"
}
}
List endpoints use cursor-based pagination for efficient traversal of large datasets.
Parameters
Parameter Type Default Description page[size]integer 20 Number of items per page (1-50) afterstring - Cursor for forward pagination beforestring - Cursor for backward pagination
Response
Paginated responses include a pagination object:
{
"data" : [ ... ],
"pagination" : {
"hasNext" : true ,
"hasPrevious" : false ,
"nextCursor" : "eyJpZCI6IjEyMyJ9" ,
"previousCursor" : null
}
}
Example: Fetching pages
# First page
curl "https://api.tomorro.com/members?page[size]=10" \
-H "x-api-key: your-api-key"
# Next page (using nextCursor from previous response)
curl "https://api.tomorro.com/members?page[size]=10&after=eyJpZCI6IjEyMyJ9" \
-H "x-api-key: your-api-key"
Sorting
Use the sort parameter to order results. Prefix with - for descending order.
# Sort by creation date (newest first)
GET /members?sort=-createdAt
# Sort by role ascending, then by creation date descending
GET /members?sort=role,-createdAt
Sortable Fields
Endpoint Allowed Fields /membersid, role, status, createdAt, updatedAt
Filtering
Use filter[field] query parameters to filter results.
Filter Operators
Operator Description Example filter[field]Exact match filter[status]=activefilter[field][eq]Equals filter[status][eq]=activefilter[field][ne]Not equals filter[status][ne]=disabledfilter[field][in]In list filter[role][in]=admin,manager
Example
# Get active admins and managers
GET /members?filter[status]=active & filter[role][in] =admin,manager
Error Handling
The API uses standard HTTP status codes to indicate success or failure.
Status Codes
Code Description 200Success 201Resource created 400Bad request - Invalid parameters 401Unauthorized - Invalid or missing API key 404Not found - Resource doesn’t exist 409Conflict - Resource already exists 429Too many requests - Rate limit exceeded 500Internal server error
{
"statusCode" : 400 ,
"message" : "Validation failed" ,
"error" : "Bad Request"
}
Rate Limiting
The API implements rate limiting to ensure fair usage. If you exceed the rate limit, you’ll receive a 429 Too Many Requests response.
Implement exponential backoff in your client to handle rate limiting gracefully.