Set Fleet Webhook
POST/v1/fleet/webhook
Registers where LotGrids should POST charge-completion events for this fleet. Call it again with a new URL to change it later — your signing secret stays the same across changes, so you never lose signature verification just from moving the endpoint.
You don't need to call this directly — the Partner Dashboard's API Access tab has a webhook field for both your live and test keys that calls this same endpoint. Use the API directly only if you're setting it up as part of an automated deploy.
Auth
Authorization: ApiKey $LOTGRIDS_API_KEY — the same fleet-scoped key used for driver management. Test and live keys each have their own independent webhook URL/secret, matching how each has its own sub-wallet.
Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
webhookUrl | string | Yes | Must be a valid URL. LotGrids will POST to it — it needs to be publicly reachable. |
Example request
curl https://api.lotgrids.com/v1/fleet/webhook \
-X POST \
-H "Authorization: ApiKey $LOTGRIDS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://fleetco.example.com/webhooks/lotgrids"
}'
Example success response
200 OK
{
"webhookUrl": "https://fleetco.example.com/webhooks/lotgrids",
"webhookSecret": "6f2c9e1b7a4d8f0c3e5b9a1d7c4f6e8b0a2d4f6e8b0a2d4f6e8b0a2d4f6e8b0a"
}
Unlike your API key, webhookSecret isn't a one-time reveal — calling this endpoint again (even just to change the URL) returns the same secret, so store it whenever it's convenient rather than only on first setup. See Webhooks for how to use it to verify a delivery.
Error responses
{ "error": { "code": "invalid_api_key", "message": "Unknown API key." } }
{ "error": { "code": "invalid_argument", "message": "webhookUrl must be a valid URL." } }