Loading...
Integrate your systems with RosterOptic's powerful REST API. Build custom workflows, sync staff data, and automate roster operations.
Need help? Contact support@rosteroptic.com support@rosteroptic.com
Authenticate requests using your API key in the Authorization header. Authorization:
Authorization: Bearer YOUR_API_KEYAll API keys are passed via the Authorization header. x-api-key.API keys start with 'ro_' followed by a unique identifier. Bearer.Keys are stored securely and can be rotated at any time.
You can manage and revoke keys at any time from the Settings page.
API keys can be scoped to limit access:
read:staff, write:rosters, read:reports
All API endpoints are relative to:
https://api.rosteroptic.com/v1Replace with your regional endpoint if applicable.
GET/api/staffSessionList all staff membersPOST/api/staffSession or API KeyCreate a new staff memberGET/api/staff/[id]SessionGet staff detailsPUT/api/staff/[id]Session or API KeyUpdate staff informationDELETE/api/staff/[id]Session or API KeyDelete a staff memberGET/api/rosterSessionFetch roster for date rangePOST/api/roster/generateSession or API KeyTrigger AI roster generationPOST/api/roster/commitSession or API KeyCommit draft rosterPATCH/api/roster/[id]Session or API KeyUpdate a shift assignmentDELETE/api/roster/[id]Session or API KeyDelete a shiftGET/api/roster/coverageSession or API KeyGet coverage analyticsGET/api/roster/metricsSession or API KeyGet roster metricsGET/api/sitesSession or API KeyList work sitesPOST/api/sitesSession or API KeyCreate a new siteGET/api/complianceSession or API KeyGenerate compliance reportGET/api/swapsSessionList shift swap requestsPATCH/api/swaps/[id]Session or API KeyUpdate swap request statusGET/api/shift-patternsSessionList shift patternsGET/api/annual-leaveSessionList leave requestsGET/api/reportsSession or API KeyGenerate custom reportsAll errors return JSON with the following format:
{
"success": false,
"error": "Error description"
}field - The field that caused the error details details - Additional error information
200200 - Success400400 - Bad Request401401 - Unauthorized403403 - Forbidden404404 - Not Found409409 - Conflict422422 - Validation Error429429 - Too Many Requests500500 - Internal Server ErrorNote: Rate limit headers are included in all responses.
fetch('https://api.rosteroptic.com/v1/staff', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}).then(res => res.json()).then(data => console.log(data));Always store your API key securely. Never expose it in client-side code.
curl -X GET 'https://api.rosteroptic.com/v1/staff' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json'Get your API key from the Settings page and start building.