Update Webhooks
Update Webhooks
You can update a webhook using the Developer Console or API.
Developer Console
To update a webhook in the Developer Console, follow the steps below.
- Go to the Webhooks tab in the Developer Console to display all webhooks.
- Select the webhook you want to update by clicking on its ID.
- Click the Edit webhook button.
- Fill in the data you want to update.
- Click the Update button to save your changes.
API
To update a webhook, use the update webhook endpoint, which requires the webhook ID. To find the ID of the webhook, use the list all webhooks endpoint.
cURL
curl -i -X PUT "https://api.box.com/2.0/webhooks/3321123" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"triggers": [
"FILE.DOWNLOADED"
]
}'Node/TypeScript v10
await client.webhooks.updateWebhookById(webhook.id!, {
requestBody: {
address: 'https://example.com/updated-webhook',
} satisfies UpdateWebhookByIdRequestBody,
} satisfies UpdateWebhookByIdOptionalsInput);Python v10
client.webhooks.update_webhook_by_id(
webhook.id, address="https://example.com/updated-webhook"
).NET v10
await client.Webhooks.UpdateWebhookByIdAsync(webhookId: NullableUtils.Unwrap(webhook.Id), requestBody: new UpdateWebhookByIdRequestBody() { Address = "https://example.com/updated-webhook" });Swift v10
try await client.webhooks.updateWebhookById(webhookId: webhook.id!, requestBody: UpdateWebhookByIdRequestBody(address: "https://example.com/updated-webhook"))Java v10
client.getWebhooks().updateWebhookById(webhook.getId(), new UpdateWebhookByIdRequestBody.Builder().address("https://example.com/updated-webhook").build()).NET v6
await client.Webhooks.UpdateWebhookByIdAsync(webhookId: NullableUtils.Unwrap(webhook.Id), requestBody: new UpdateWebhookByIdRequestBody() { Address = "https://example.com/updated-webhook" });Node v4
await client.webhooks.updateWebhookById(webhook.id!, {
requestBody: {
address: 'https://example.com/updated-webhook',
} satisfies UpdateWebhookByIdRequestBody,
} satisfies UpdateWebhookByIdOptionalsInput);