Assign Units to a Call

Assigns units to a call as performedBy. Only units signed in to a service panel can be assigned, and they're moved off any call they're already on. The call opens, and the units get it on their screens straight away.

POST

/api/v1/server/cad/calls/{callId}/units

Request

curl -X POST "https://api.melonly.com/api/v1/server/cad/calls/{callId}/units" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "performedBy": "7264722635089514496",
  "units": [
    {
      "id": 12,
      "type": "unit"
    }
  ]
}'

Response

200

Success

{
  "data": {
    "address": "Highway 1",
    "closedAt": 0,
    "code": "10-80",
    "createdAt": 1794776859830,
    "createdByUnit": {},
    "createdByUserId": "7308965405773533184",
    "description": "red prancer fled a traffic stop. driver waved at us",
    "id": "7527000000000000000",
    "loc": {},
    "origin": "911",
    "panels": [],
    "postal": "214",
    "primaryUnit": {},
    "priority": "2",
    "records": [],
    "serverId": "7294057520392310784",
    "status": 0,
    "title": "10-80 on a Bullhorn Prancer",
    "type": 0,
    "unitHistory": [],
    "units": []
  }
}

Authorization

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

Path parameters

callIdstringrequired

Body

performedBystringrequired
Member ID of the dispatcher. Needs the Dispatch Panel permission.
unitsobject[]required
1-25 units. Only units signed in to a service panel are assigned, and they're moved off any call they're already on.

Response

200 Success

createdAtintegerrequired
When it was created.
createdByUserIdstringrequired
Melonly user ID of who created the call.
descriptionstringrequired
Longer description.
idstringrequired
Unique ID.
panelsobjectrequired
Panels the call is shown on.
recordsobjectrequired
Records attached.
serverIdstringrequired
Server ID.
statusintegerrequired
Status code.
titlestringrequired
Title.
typeintegerrequired
Type code.
unitHistoryobjectrequired
Units that have been on the call.
unitsobjectrequired
Units attached.
addressstring | null
Address.
apiIdstring | null
ID set by an integration that created the call.
closedAtinteger | null
When the call was closed.
codestring | null
Call code.
createdByUnitobject | null
Unit that created the call.
locobject | null
Map position.
originstring | null
Where the call came from.
postalstring | null
Postal code.
primaryUnitobject | null
Unit leading the call.
prioritystring | null
Call priority.

Errors

StatusMeaning
400Invalid request. validation_failed lists each invalid field in details.fields.
401Missing, invalid or expired token
403Success
404Not found
409None of the units can be assigned
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