API is in Alpha and may change at any time.

API Resources > Emergency

Attach Unit

This endpoint allows you to attach an unit from a call.

Attach Unit

POST api/v1/emergency/attach_unit

Request Body

Name Type Description Default
call_id number Call ID Required
user_id number User ID Required

Example Request Body

{
    "call_id": 123456789,
    "user_id": 123456789123456789
}

Responses

200 A successful call.

{
    "success": true,
    "message": "Unit attached to call.",
    "data": []
}

200 with validation errors.

{
    "success": false,
    "message": "Validation errors",
    "data": {
        "call_id": [
            "The call id field is required.",
            "The call id must be a number."
        ],
        "user_id": [
            "The user id field is required.",
            "The user id must be a number."
        ],
    }
}

200 with no call found.

{
    "success": false,
    "message": "Call not found.",
    "data": []
}

200 with no active unit found.

{
    "success": false,
    "message": "No active unit found for the given user.",
    "data": []
}

200 with unit already attached.

{
    "success": false,
    "message": "Unit is already attached to call.",
    "data": []
}

Still have questions?

Still have questions? Talk to support.