Delete a Shift

Deletes a shift as performedBy, who needs the Manage Shifts permission. This can't be undone.

DELETE

/api/v1/server/shifts/{shiftId}

Request

curl -X DELETE "https://api.melonly.com/api/v1/server/shifts/{shiftId}" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

200

Success

{
  "data": {
    "breakTimestamps": [
      {
        "endedAt": 1794777600000,
        "startedAt": 1794777000000
      }
    ],
    "createdAt": 1794776859830,
    "endedAt": 1794790000000,
    "id": "7527830759214682112",
    "memberId": "7308965405773533184",
    "serverId": "7294057520392310784",
    "type": "7400000000000000000",
    "wave": 12
  }
}

Authorization

Authorizationstringrequired
Your API token as Bearer YOUR_TOKEN. Create one in your server's dashboard settings.

Path parameters

shiftIdstringrequired

Query parameters

performedBystringrequired
Member ID of the staff member performing the delete, with their permissions.

Response

200 Success

breakTimestampsobject[]required
Breaks taken, oldest first. See the break object.
createdAtintegerrequired
When the shift started.
idstringrequired
Shift ID.
memberIdstringrequired
Member ID of the member on shift.
serverIdstringrequired
Server ID, or department ID for department shifts.
waveintegerrequired
Activity wave the shift counts towards.
autoEndboolean | null
Whether the shift ends automatically.
endedAtinteger | null
When the shift ended. Missing while it's active.
endedBystring | null
Member ID of who ended it, if not the member.
typestring | null
Shift type ID. Missing for the default type.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
403Success
404Not found
429Rate limited. See Retry-After and details.
500Internal server error
502next did not confirm the write. Check whether it applied before retrying.
503Write endpoints are not configured on this deployment