Set a Unit Group's Status

Sets the status of a unit group and every unit in it as performedBy.

POST

/api/v1/server/cad/unit-groups/{groupId}/status

Request

curl -X POST "https://api.melonly.com/api/v1/server/cad/unit-groups/{groupId}/status" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "performedBy": "7264722635089514496",
  "status": "enroute"
}'

Response

200

Success

{
  "data": {
    "id": 3,
    "maxUnits": 4,
    "name": "Adam 1",
    "panic": false,
    "premade": true,
    "serverId": "7294057520392310784",
    "status": 1,
    "units": []
  }
}

Authorization

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

Path parameters

groupIdstringrequired

Body

performedBystringrequired
Member ID of the dispatcher. Needs the Dispatch Panel permission.
statusstringrequired
Allowed values:availableunavailablebusyenrouteonScenecustom
customStatusIdstring | null
The custom status to use when status is custom.

Response

200 Success

idintegerrequired
Unit group ID.
namestringrequired
Display name.
panicbooleanrequired
Whether panic is active.
premadebooleanrequired
Whether it's a premade group.
serverIdstringrequired
Server ID.
statusintegerrequired
Status code.
unitsobjectrequired
Units attached.
customStatusIdstring | null
Custom status, when one is set.
maxUnitsinteger | null
Most units that can join.
restrictAgencystring | null
Only this agency's units can join.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
403Success
404Not found
409The custom status isn't on the group's panel
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