Start a Department Break

Starts a break on an active department shift. Only the member on shift can start their own break.

POST

/api/v1/server/departments/{departmentId}/shifts/{shiftId}/breaks

Request

curl -X POST "https://api.melonly.com/api/v1/server/departments/{departmentId}/shifts/{shiftId}/breaks" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

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

departmentIdstringrequired
shiftIdstringrequired

Body

performedBystring | null
Member ID of a staff member acting on someone else's shift or LOA. Leave it out to act as the owner.

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
404Not found
409Shift ended or already on break
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