Updating Shifts

Update one or more existing shifts. Only include fields you want to change - unspecified fields retain their current values.

Endpoint

MethodEndpointDescription
PUT/scheduler/v1/schedulers/{schedulerId}/shiftsUpdate one or more shifts

Path Parameters

ParameterTypeRequiredDescription
schedulerIdintegerYesThe scheduler's unique ID

Query Parameters

ParameterTypeDefaultDescription
notifyUsersbooleantrueSend notifications for changes

Request Body

The request body is an array of shift update objects.

Shift Update Fields

FieldTypeRequiredDescription
shiftIdstringYesThe shift ID to update
startTimeintegerNoNew start time (Unix timestamp)
endTimeintegerNoNew end time (Unix timestamp)
titlestringNoNew shift title
jobIdstringNoNew associated job ID
timezonestringNoNew timezone (Tz format)
isPublishedbooleanNoPublish/unpublish the shift
isOpenShiftbooleanNoConvert to/from open shift
openSpotsintegerNoUpdate open spots (JS Vision only)
isRequireAdminApprovalbooleanNoToggle admin approval requirement
assignedUserIdsarrayNoUpdate assigned users
locationDataobjectNoUpdate location
colorstringNoUpdate color
notesarrayNoReplace all notes
breaksarrayNoReplace all breaks
customFieldsarrayNoUpdate custom field values
isEditForAllUsersbooleanNoApply changes to all users in group shift
📝

Partial Updates

Only include fields you want to change. Omitted fields retain their current values.


Group Shift Editing

When editing group shifts (shifts with multiple assigned users), use isEditForAllUsers to control the scope of changes.

⚠️

Group Shift Rules

  • isEditForAllUsers: true - Apply changes to ALL users in the group
  • isEditForAllUsers: false - Apply changes only to specified user(s)
  • When isEditForAllUsers: false, you MUST provide assignedUserIds
  • Cannot use isEditForAllUsers if shift is not part of a group

Restrictions

🚫

Repeating Shifts

Repeating shifts cannot be edited via API. Attempting to update a repeating shift will return an error.

⚠️

Root Open Shift Restriction

When not using JS Vision, you cannot edit the root open shift if there are multiple open spots. This is a legacy architecture limitation.


Examples

Update Shift Time

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts?notifyUsers=true' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "startTime": 1736928000,
      "endTime": 1736956800
    }
  ]'

Update Shift Title and Color

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "title": "Updated Morning Shift",
      "color": "#487037"
    }
  ]'

Publish a Draft Shift

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts?notifyUsers=true' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "isPublished": true,
      "assignedUserIds": [9170357]
    }
  ]'
📝

Publishing Requires Assignment

When publishing a non-open shift, you must ensure at least one user is assigned.

Reassign Shift to Different User

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts?notifyUsers=true' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "assignedUserIds": [9170358]
    }
  ]'

Convert to Open Shift

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "isOpenShift": true,
      "assignedUserIds": [],
      "isRequireAdminApproval": true
    }
  ]'

Update Location

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "locationData": {
        "isReferencedToJob": false,
        "gps": {
          "address": "789 New Location Ave",
          "latitude": 40.7484,
          "longitude": -73.9857
        }
      }
    }
  ]'

Update Breaks

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "breaks": [
        {
          "id": "break-existing-001",
          "name": "Updated Lunch",
          "type": "unpaid",
          "startTime": 750,
          "duration": 45
        },
        {
          "name": "New Afternoon Break",
          "type": "paid",
          "startTime": 900,
          "duration": 15
        }
      ]
    }
  ]'
📝

Updating Breaks

  • Include id to update an existing break
  • Omit id to create a new break
  • Breaks not included in the array will be removed
  • If a break id doesn't exist, the API returns an error

Update Custom Fields

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "customFields": [
        {
          "id": "field_abc123",
          "value": "PROJ-2024-002"
        },
        {
          "id": "field_def456",
          "value": "CC-Sales"
        }
      ]
    }
  ]'
📝

Partial Custom Field Updates

When updating custom fields, you only need to include the fields you want to change. Other custom field values remain unchanged.

Edit Group Shift (All Users)

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts?notifyUsers=true' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "title": "Team Shift - Updated",
      "startTime": 1736928000,
      "endTime": 1736956800,
      "isEditForAllUsers": true
    }
  ]'

Edit Group Shift (Single User)

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "assignedUserIds": [9170357],
      "isEditForAllUsers": false
    }
  ]'

Bulk Update

curl --request PUT \
  --url 'https://api.connecteam.com/scheduler/v1/schedulers/9454799/shifts' \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '[
    {
      "shiftId": "6784dacb3c07733b0a849f49",
      "title": "Updated Shift 1"
    },
    {
      "shiftId": "6784dacb3c07733b0a849f50",
      "isPublished": true
    },
    {
      "shiftId": "6784dacb3c07733b0a849f51",
      "color": "#AE2121"
    }
  ]'

Response

The update response may include additional fields for group shift operations:

{
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "data": {
    "shifts": [
      {
        "id": "6784dacb3c07733b0a849f49",
        "title": "Updated Shift",
        "color": "#4B7AC5",
        "assignedUserIds": [9170357],
        "startTime": 1736928000,
        "endTime": 1736956800,
        "timezone": "America/New_York",
        "isOpenShift": false,
        "isPublished": true,
        "updateTime": 1736761000
      }
    ],
    "deletedShiftIds": [],
    "createdShifts": []
  }
}

Response Fields

FieldTypeDescription
shiftsarrayUpdated shifts
deletedShiftIdsarrayShift IDs deleted during update (e.g., when removing users from group)
createdShiftsarrayNew shifts created during update (e.g., when splitting a group shift)
📝

Group Shift Side Effects

When updating group shifts, the operation may delete some shift instances (returned in deletedShiftIds) or create new ones (returned in createdShifts).


Error Responses

400 Bad Request

Shift not found:

{
  "detail": "Shifts with ids ['invalid-shift-id'] not found"
}

Repeating shift:

{
  "detail": "Editing repeating shifts is not supported at the moment (id: 6784dacb3c07733b0a849f49)"
}

Invalid isEditForAllUsers:

{
  "detail": "is_edit_for_all_users can be set only for shifts that are part of a group"
}

Missing assignedUserIds for single edit:

{
  "detail": "assigned_user_ids must be provided when is_edit_for_all_users is False"
}

Break not found:

{
  "detail": "A break with the id 'invalid-break-id' cannot be found."
}

Root open shift edit:

{
  "detail": "can't edit root open shift with multiple open spots"
}

API Reference