Create alert | Genlogs API Docs

Create Alert

Create Alert endpoint allows our customers to create alerts that are triggered when one of Genlogs sensors detect a truck that match the alert criteria, sending an email with the detection results.

This endpoint is restricted to authorized users with appropriate permissions.

Authentication

Include the following headers in your requests:

Permissions

Make sure that your api user is created with a role that has admin or create-alert-endpoint permission.

Endpoint

Request Format

All parameters must be sent as JSON in the request body with Content-Type: application/json header.

Request Body Content

Response Codes

Response Body:

You must save the alert ID in order to use the Edit Alert endpoint.

Request Example

Using curl:

curl -X POST 'https://api.genlogs.io/alerts' \
-H 'Access-Token: {access_token}' \
-H 'x-api-key: {your_api_key}' \
-H 'Content-Type: application/json' \
-d '{
  "email": "user@example.com",
  "cc_emails": "notification@example.com",
  "alert_type": "normal",
  "disabled": false,
  "alert_name": "New alert",
  "trailer_number": "12345",
  "usdot_number": "",
  "deep_search": "",
  "exact_match_deep_search": false
}'

This API ensures secure alert creation while maintaining proper role-based access control.