put https://sandbox.api.mothership.com/beta/webhookConfigs/
This endpoint allows a user to update the webhook config represented by webhookConfigId.
The only fields on a webhook config that can be updated are
webhookUrl
andsubscribedEvents
.
curl -X POST \
https://sandbox.api.mothership.com/beta/webhookConfig \
-H 'Authorization: Bearer {YOUR_API_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
"webhookUrl": "https://www.yourserver.io/newWebhook/mothership",
"subscribedEvents": ["shipment.status.updated"]
}'
{
"data": {
"id": "48asjgaoi33nkl4t3lae",
"createdAt": "2019-03-20T16:17:13:424Z",
"status": "active",
"subscribedEvents": ["shipment.status.updated"],
"webhookUrl": "https://www.yourserver.io/newWebhook/mothership"
}
}