Create a Call

Creates a call as createdBy, exactly as a dispatcher would in the CAD. It shows up on the dispatch and service panels straight away, the call-created webhook fires and workflows run.

POST

/api/v1/server/cad/calls

Request

curl -X POST "https://api.melonly.com/api/v1/server/cad/calls" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "address": "Highway 1",
  "createdBy": "7264722635089514496",
  "description": "red prancer fled a traffic stop. driver waved at us",
  "priority": "1",
  "title": "10-80 on a Bullhorn Prancer",
  "units": [
    {
      "id": 12,
      "type": "unit"
    }
  ]
}'

Response

201

Created

{
  "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": []
  }
}

Units you list are assigned straight away if they're signed in to a service panel, and are moved off any call they're already on. The call starts open when units are assigned, and pending otherwise.

Authorization

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

Body

createdBystringrequired
Member ID of the dispatcher creating the call. Needs the Dispatch Panel permission.
titlestringrequired
1-45 characters.
addressstring | null
Up to 45 characters.
codestring | null
Call code, such as 10-80. Up to 45 characters.
descriptionstring
Up to 4000 characters.
originstring | null
Where the call came from, such as 911. Up to 45 characters.
postalstring | null
Up to 45 characters.
primaryUnitobject | null
A CAD unit, or a group of units working together.
prioritystring | null
Up to 45 characters.
unitsobject[]
Units to assign straight away. Only units signed in to a service panel are assigned, and they're moved off any call they're already on.

Response

201 Created

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
403createdBy can't dispatch in this CAD
404CAD is not set up
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