v1

latestOpenAPI 3.0.02026-07-26254134307.1 KB
Shifts

Create shift

Create a shift in the oldest active workspace that the token has access to. If you need to specify the workspace, we recommend using the Create team shift endpoint instead.

Required scope: shifts:write

post/shifts

Request body

namestring required

Name of the shift

color'black' | 'grey' | 'pink' | 'purple' | 'blue' | 'teal' | 'green' | 'yellow' | 'orange' | 'red' required

Color of the shift

timezonestring required

A timezone name as defined in the IANA tz database

teammate_idsResourceID[] required

List of all the teammate ids who will be part of this shift. Alternatively, you can supply emails as a resource alias.

Example request

{
  "times": {
    "mon": {
      "start": "09:00",
      "end": "17:00"
    },
    "tue": {
      "start": "09:00",
      "end": "17:00"
    },
    "wed": {
      "start": "09:00",
      "end": "17:00"
    },
    "thu": {
      "start": "09:00",
      "end": "17:00"
    },
    "fri": {
      "start": "09:00",
      "end": "17:00"
    },
    "sat": {
      "start": "09:00",
      "end": "17:00"
    },
    "sun": {
      "start": "09:00",
      "end": "17:00"
    }
  }
}

Response

A shift

idstring required

Unique identifier of the shift

namestring required

Name of the shift

color'black' | 'grey' | 'pink' | 'purple' | 'blue' | 'teal' | 'green' | 'yellow' | 'orange' | 'red' required

Color of the shift

timezonestring required

A timezone name as defined in the IANA tz database

created_atnumber

The timestamp when the shift was created.

updated_atnumber

The timestamp when the shift was updated.

Example response

{
  "_links": {
    "self": "https://yourCompany.api.frontapp.com/shifts/shf_1bri",
    "related": {
      "teammates": "https://yourCompany.api.frontapp.com/shifts/shf_1bri/teammates",
      "owner": "https://yourCompany.api.frontapp.com/teams/tim_4kxji"
    }
  },
  "id": "shf_1bri",
  "name": "Scranton Business Park shifts",
  "color": "green",
  "timezone": "America/New_York",
  "times": {
    "mon": {
      "start": "09:00",
      "end": "17:00"
    },
    "tue": {
      "start": "09:00",
      "end": "17:00"
    },
    "wed": {
      "start": "09:00",
      "end": "17:00"
    },
    "thu": {
      "start": "09:00",
      "end": "17:00"
    },
    "fri": {
      "start": "09:00",
      "end": "17:00"
    },
    "sat": {
      "start": "09:00",
      "end": "17:00"
    },
    "sun": {
      "start": "09:00",
      "end": "17:00"
    }
  },
  "created_at": 1606943265.298,
  "updated_at": 1701878404.43
}