# Delete a shift

Removes a shift from the event.
**This returns a 200 carrying `{"messages": null}`, not the 204 the rest of the API
returns for a delete.** `messages` is normally null and carries a note when
something about the deletion is worth telling the caller.
Two things can interrupt it, and both are questions rather than failures.
A shift in a linked series comes back as a 400 carrying `reference: "repeat"`,
which you answer by sending `repeat`: true also deletes every later shift in the
series and drops the people following it, false deletes this shift alone.
A shift people already hold places on comes back as a 405 saying how many they are
and carrying the key to confirm with in `reference`. Send that key back **in the
query string, as an array**, keeping the rest of the request the same:
`?override[]=event.shift.delete.demand`. Two things to know about it. The key in
`reference` is prefixed - send the part after `override_system_limits.`, not the
whole string. And it has to be the array form: `?override=event.shift.delete.demand`
is a 500, and sending it in the JSON body is not seen at all and simply repeats the
405.
The shift has to belong to the event in the URL; a mismatch is a 404.

Endpoint: DELETE /api/v2/event/{event_id}/shift/{id}
Version: 2.0.0
Security: default

## Path parameters:

  - `event_id` (integer, required)
    The ID of the event.

  - `id` (integer, required)
    The ID of the shift.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `repeat` (boolean)
    Also delete every later shift linked to this one. Only meaningful on a shift that belongs to a linked series, and required there - see the description.

## Response 200 fields (application/json):

  - `messages` (string | null)

## Response 400 fields (application/json):

  - `message` (string)

  - `reference` (string)

## Response 405 fields (application/json):

  - `message` (string)

  - `reference` (string)

