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 RequestThe request body isn't valid JSON, or something failed on our side.
- 401UnauthorizedThe token is missing, expired or invalid. Sign in again.
- 422Unprocessable ContentThe request was refused.
errorsays why in one sentence, anderrorslists each reason.
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"}}