Skip to main content

Update a webhook

PUT/client_api/v2/webhooks/{id}

Changes a webhook's URL or events. Send only what changes. PATCH works the same way.

Path parameters

  • idintegerRequired

    The webhook's id.

Parameters

  • webhookobjectRequired

    The webhook's settings.

Returns

Returns the webhook.

Errors

  • 400Bad Request
    The request body isn't valid JSON, or something failed on our side.
  • 401Unauthorized
    The token is missing, expired or invalid. Sign in again.
  • 422Unprocessable Content
    The request was refused. error says why in one sentence, and errors lists each reason.
View as Markdown
PUT /client_api/v2/webhooks/{id}
1curl -X PUT "https://sandbox-api.vatit-stream.com/client_api/v2/webhooks/5" \
2 -H "Authorization: Bearer $API_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "webhook": {
6 "events": [
7 "shipment.updated.status"
8 ]
9 }
10 }'
Response
{
"webhook": {
"events": [
"shipment.updated.status"
],
"id": 4,
"status": "active",
"target_url": "https://hooks.globaltradecorp.example/stream",
"token": "q7Vt2mX9pL4sKe8RzW1nYg"
}
}
API ExplorerSandbox

Pick a call on the right and run it. Every call goes to the sandbox, so nothing is really shipped or charged. The answer appears here.