API is in Alpha and may change at any time.

API Resources > Emergency

Panic Button

The Panic API call allows you to trigger a panic button from in-game.

Panic

POST api/v1/emergency/panic

Request Body

Name Type Description Default
user_id number Discord ID of the player. Required
is_panic bool Panic status. Required
location string Location of player. ""

Example Request Body

{
    "user_id": 123456789123456789,
    "is_panic": true,
    "location": "234 Route 68, Sandy Shores"
}

Responses

200 A successful call.

{
    "success": true,
    "message": "You have pressed your panic button.", | "message": "You have cleared your panic button.",
    "data": []
}
                            

200 with error message if the unit was not found.

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

200 with validation errors.

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

Still have questions?

Still have questions? Talk to support.