POST
/api/v1/server/departments/{departmentId}/shifts
Request
Response
201
Created
Authorization
AuthorizationstringrequiredYour API token as
Bearer YOUR_TOKEN. Create one in your server's dashboard settings.Path parameters
departmentIdstringrequiredBody
memberIdstringrequiredMember ID of the member starting the shift.
typestring | nullShift type ID. Leave it out for the default type. Needs premium.
Response
201 Created
breakTimestampsobject[]requiredBreaks taken, oldest first. See the break object.
createdAtintegerrequiredWhen the shift started.
idstringrequiredShift ID.
memberIdstringrequiredMember ID of the member on shift.
serverIdstringrequiredServer ID, or department ID for department shifts.
waveintegerrequiredActivity wave the shift counts towards.
autoEndboolean | nullWhether the shift ends automatically.
endedAtinteger | nullWhen the shift ended. Missing while it's active.
endedBystring | nullMember ID of who ended it, if not the member.
typestring | nullShift type ID. Missing for the default type.
Errors
| Status | Meaning |
|---|---|
400 | Invalid request. validation_failed lists each invalid field in details.fields. |
401 | Missing, invalid or expired token |
403 | The member cannot start this shift type |
404 | Not found |
409 | The member already has an active shift |
429 | Rate limited. See Retry-After and details. |
500 | Internal server error |
502 | next did not confirm the write. Check whether it applied before retrying. |
503 | Write endpoints are not configured on this deployment |