Skip to main content

Update Callback

Modify the URL, event type, status, or authentication settings of an existing callback registration.

Endpoint​

POST /v2/callbacks/update

Request Body​

FieldTypeRequiredConstraintsDescription
callbackIdintYes—The unique ID of the callback to update.
urlstringNoHTTPS onlyNew webhook URL to deliver events to.
eventObjectsNoSee ENUMsUpdated event type that triggers this callback.
statusStatusNoSee ENUMsNew status for the callback (e.g., Suspended to pause delivery).
httpAuthTypeHTTPAuthTypeNoSee ENUMsUpdated authentication method for your endpoint.
usernamestringNo—Updated username for HTTP authentication.
passwordstringNo—Updated password for HTTP authentication.
{
"callbackId": 7001,
"url": "https://app.example.com/webhooks/ecgrid-v2",
"status": "Active",
"httpAuthType": "Basic",
"username": "webhook_user",
"password": "n3wP@ssword!"
}

Response​

Returns the updated callback record.

{
"success": true,
"data": {
"callbackId": 7001,
"url": "https://app.example.com/webhooks/ecgrid-v2",
"event": "Parcel",
"mailboxId": 12345,
"networkId": 0,
"httpAuthType": "Basic",
"status": "Active"
}
}

ENUMs​

Objects​

See Enums Reference for the complete Objects ENUM.

HTTPAuthType​

ValueDescription
NoneNo authentication
BasicHTTP Basic authentication
DigestHTTP Digest authentication

Status​

ValueDescription
ActiveCallback is active and delivering events
SuspendedCallback is paused — events are not delivered
TerminatedCallback is permanently disabled

See Enums Reference for the complete Status ENUM.

Code Examples​

curl -X POST "https://rest.ecgrid.io/v2/callbacks/update" \
-H "X-API-Key: $ECGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "callbackId": 7001, "url": "https://app.example.com/webhooks/ecgrid-v2", "status": "Active", "httpAuthType": "Basic", "username": "webhook_user", "password": "n3wP@ssword!" }'

See Also​