Create a shift
Creates a shift for the authenticated user. endDate must be on or after startDate.
POST
/v1/shifts
const url = 'https://api.shiftsync.app/v1/shifts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"startDate":"2026-01-01T09:00:00.000Z","endDate":"2026-01-01T09:00:00.000Z","isSplit":true,"splitEndTime":"2026-01-01T09:00:00.000Z","splitStartTime":"2026-01-01T09:00:00.000Z","templateId":0,"tempId":"string","notes":"string","visibility":"public"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shiftsync.app/v1/shifts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "startDate": "2026-01-01T09:00:00.000Z", "endDate": "2026-01-01T09:00:00.000Z", "isSplit": true, "splitEndTime": "2026-01-01T09:00:00.000Z", "splitStartTime": "2026-01-01T09:00:00.000Z", "templateId": 0, "tempId": "string", "notes": "string", "visibility": "public" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
startDate
required
string format: date-time
endDate
required
string format: date-time
isSplit
boolean
splitEndTime
string format: date-time
splitStartTime
string format: date-time
templateId
required
integer
tempId
required
string
notes
string
visibility
required
string
Example
{ "startDate": "2026-01-01T09:00:00.000Z", "endDate": "2026-01-01T09:00:00.000Z", "isSplit": true, "splitEndTime": "2026-01-01T09:00:00.000Z", "splitStartTime": "2026-01-01T09:00:00.000Z", "templateId": 0, "tempId": "string", "notes": "string", "visibility": "public"}Responses
Section titled “Responses”The created shift
Media typeapplication/json
object
item
required
object
id
required
integer
startDate
required
string format: date-time
endDate
required
string format: date-time
isSplit
boolean
splitEndTime
string format: date-time
splitStartTime
string format: date-time
userId
required
integer
templateId
required
integer
tempId
required
string
notes
string
visibility
required
string
seriesId
integer
Example
{ "item": { "id": 0, "startDate": "2026-01-01T09:00:00.000Z", "endDate": "2026-01-01T09:00:00.000Z", "isSplit": true, "splitEndTime": "2026-01-01T09:00:00.000Z", "splitStartTime": "2026-01-01T09:00:00.000Z", "userId": 0, "templateId": 0, "tempId": "string", "notes": "string", "visibility": "public", "seriesId": 0 }}