Edit Alert

Allows api users to update existing alerts. Alerts can currently be created either from Asset Locator Portal or via Create alert . These alerts are triggered when a scheduled job is triggered and perform the search on the detections based on the alerts criteria. Notifications are sent via email and webhooks

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 your API user is created with a role that includes either admin or edit-alert-endpoint permissions.


Endpoint

  • URL: https://api.genlogs.io/alerts/{alert_id}

  • Method: PATCH


Request Parameters

Only the following fields are updatable:

Field
Type
Required
Description

alert_name

string

Optional

The name of the alert for identification.

location_state

string

Optional

State where the alert is triggered.

location_city

string

Optional

City where the alert is triggered.

license_plate

string

Optional

License plate number related to the alert.

location_plate_state

string

Optional

State where the license plate is registered.

usdot_number

string

Optional

USDOT number of the vehicle.

mc_number

string

Optional

MC number of the vehicle.

vin

string

Optional

Last 6 digits of the VIN.

cab_number

string

Optional

Cab number of the vehicle.

trailer_logo

string

Optional

Logo displayed on the trailer.

trailer_number

string

Optional

Trailer number associated with the alert.

exact_match_trailer_number

boolean

Optional

Whether to do an exact match on trailer number.

cc_emails

array of strings

Optional

Additional recipients for email notifications.

alert_type

string

Optional

normal or hot. Defines how often alerts are triggered.

disabled

boolean

Optional

Indicates whether the alert is active.

start_date

string (ISO 8601)

Optional

Alert start date.

end_date

string (ISO 8601)

Optional

Alert end date.

deep_search

boolean

Optional

Enables deeper asset match scanning.


Response Codes

Code
Meaning

200 OK

Successfully updated the alert.

400 Bad Request

Missing or invalid parameters.

401 Unauthorized

Authentication credentials are missing or invalid.

403 Forbidden

User lacks required permissions.

404 Not Found

No alert found with the specified ID.

500 Internal Server Error

An unexpected server error occurred.


Response Body

{
  "alert_name": "text",
  "location_state": "text",
  "location_city": "text",
  "license_plate": "text",
  "license_plate_state": "text",
  "usdot_number": "text",
  "mc_number": "text",
  "vin": "text",
  "cab_number": "text",
  "trailer_logo": "text",
  "trailer_number": "text",
  "exact_match_trailer_number": true,
  "cc_emails": [
    "text"
  ],
  "alert_type": "text",
  "disabled": true,
  "start_date": "2025-06-27T15:46:59.165Z",
  "end_date": "2025-06-27T15:46:59.165Z",
  "deep_search": "text"
}

Request Example

curl -L \
  --request PATCH \
  --url 'https://api.genlogs.io/alerts/{alert_id}' \
  --header 'Access-Token: YOUR_ACCESS_TOKEN' \
  --header 'x-api-key: text: YOUR_API_KEY ' \
  --header 'Content-Type: application/json' \
  --data '{
    "alert_name": "text",
    "location_state": "text",
    "location_city": "text",
    "license_plate": "text",
    "license_plate_state": "text",
    "usdot_number": "text",
    "mc_number": "text",
    "vin": "text",
    "cab_number": "text",
    "trailer_logo": "text",
    "trailer_number": "text",
    "disabled": true,
    "cc_emails": [
      "text"
    ],
    "alert_type": "text",
    "exact_match_trailer_number": true,
    "start_date": "2025-06-27T15:46:59.165Z",
    "end_date": "2025-06-27T15:46:59.165Z",
    "deep_search": "text"
  }'

Edit Alert

patch

Partially update an existing alert by alert_id.

Authorizations
Path parameters
alert_idintegerRequired
Header parameters
x-api-keystringRequired

API Key required for authentication.

Body

Schema for partial updates of alerts (PATCH operations). All fields are optional - only provided fields will be updated.

alert_nameany ofOptional
stringOptional
or
nullOptional
location_stateany ofOptional
stringOptional
or
nullOptional
location_cityany ofOptional
stringOptional
or
nullOptional
license_plateany ofOptional
stringOptional
or
nullOptional
license_plate_stateany ofOptional
stringOptional
or
nullOptional
usdot_numberany ofOptional
stringOptional
or
nullOptional
mc_numberany ofOptional
stringOptional
or
nullOptional
vinany ofOptional
stringOptional
or
nullOptional
cab_numberany ofOptional
stringOptional
or
nullOptional
trailer_logoany ofOptional
stringOptional
or
nullOptional
trailer_numberany ofOptional
stringOptional
or
nullOptional
disabledany ofOptional
booleanOptional
or
nullOptional
cc_emailsany ofOptional
string[]Optional
or
nullOptional
alert_typeany ofOptional
stringOptional
or
nullOptional
exact_match_trailer_numberany ofOptional
booleanOptional
or
nullOptional
start_dateany ofOptional
string · date-timeOptional
or
nullOptional
end_dateany ofOptional
string · date-timeOptional
or
nullOptional
deep_searchany ofOptional
stringOptional
or
nullOptional
Responses
200
Successful Response
application/json
patch
PATCH /alerts/{alert_id} HTTP/1.1
Host: api.genlogs.io
Access-Token: YOUR_API_KEY
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 430

{
  "alert_name": "text",
  "location_state": "text",
  "location_city": "text",
  "license_plate": "text",
  "license_plate_state": "text",
  "usdot_number": "text",
  "mc_number": "text",
  "vin": "text",
  "cab_number": "text",
  "trailer_logo": "text",
  "trailer_number": "text",
  "disabled": true,
  "cc_emails": [
    "text"
  ],
  "alert_type": "text",
  "exact_match_trailer_number": true,
  "start_date": "2025-07-17T20:48:27.641Z",
  "end_date": "2025-07-17T20:48:27.641Z",
  "deep_search": "text"
}
{
  "alert_name": "text",
  "location_state": "text",
  "location_city": "text",
  "license_plate": "text",
  "license_plate_state": "text",
  "usdot_number": "text",
  "mc_number": "text",
  "vin": "text",
  "cab_number": "text",
  "trailer_logo": "text",
  "trailer_number": "text",
  "exact_match_trailer_number": false,
  "cc_emails": [
    "text"
  ],
  "alert_type": "normal",
  "disabled": false,
  "start_date": "2025-07-17T20:48:27.641Z",
  "end_date": "2025-07-17T20:48:27.641Z",
  "deep_search": "text"
}

Last updated