create alert.md
Create alert
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:
- Access-Token: The access token obtained from the "Create Access Token" endpoint.
- x-api-key: The API key provided by GenLogs. This header must be included in the request.
Permissions
Make sure that your api user is created with a role that has admin or create-alert-endpoint permission
Endpoint
- URL:
https://api.genlogs.io/alerts - Method:
POST
Request Format
All parameters must be sent as JSON in the request body with Content-Type: application/json header.
Request Body Content
- email (string, Required): The email address to the alert results if a match is found
- cc_emails (array of strings, Optional): List of additional email addresses to receive notifications if a match is found based on alerts criteria
- alert_type (string, Required): Specifies the type of alert to be sent.
- normal: Also called "Daily Alerts", these are triggered once per day in the morning.
- hot: Triggered every 15 minutes.
- disabled (boolean, Required): Whether the alert is active or disabled.
- alert_name (string, Required): The name of the alert for identification.
- usdot_number (string, Optional): The USDOT number for alert identification.
- mc_number (string, Optional): The MC number for alert identification.
- license_plate (string, Optional): The license plate number related to the alert.
- vin (string, Optional): Last 6 Digits of the vehicle identification number.
- cab_number (string, Optional): The cab number associated with the vehicle.
- equipment_type (string, Optional): The equipment type for alert identification.
- trailer_logo (string, Optional): The logo displayed on the trailer. * The logo displayed on the trailer. See
- trailer_number (string, Optional): The trailer number associated with the alert.
- exact_match_trailer_number (boolean, Optional): Specifies whether the trailer number search should match exactly or be treated as a “contains” search.
- true: Performs an exact match for the trailer number.
- false: Utilizes a “contains” search for the trailer number.
- deep_search (string, Optional): The deep search criteria associated to the alert
- exact_match_deep_search (boolean, Optional): Specifies whether the deep search criteria should match exactly or be treated as a “contains” search.
- true: Performs an exact match for the deep search criteria.
- false: Utilizes a “contains” search for the deep search criteria.
- notification_channels (array of strings, Optional): list of channels to receive notifications
"email","webhook". Default: `[\