Overview
Delete an existing webhook subscription to stop receiving notifications for subscribed events. This endpoint is used by Zapier when users remove or disable trigger integrations, ensuring clean webhook management and preventing unnecessary API calls.This endpoint is primarily used by Zapier integrations but can be used with any webhook service that follows the same pattern.
Authentication
All requests require a valid API key in the Authorization header:Delete Webhook
Path Parameters
The unique identifier of the webhook subscription to delete.Format: Webhook ID (e.g.,
wh_1234567890abcdef)Example: wh_1234567890abcdefResponse
Success Response
Confirms successful webhook deletion.
Error Responses
400 Bad Request - Webhook Not Found
400 Bad Request - Webhook Not Found
400 Bad Request - Deletion Failed
400 Bad Request - Deletion Failed
401 Unauthorized
401 Unauthorized
401 Unauthorized - User ID Not Found
401 Unauthorized - User ID Not Found
500 Internal Server Error
500 Internal Server Error
Zapier Integration Usage
Automatic Cleanup
Zapier automatically calls this endpoint when:1
Trigger Removal
When users delete a Zap that contains webhook triggers, Zapier calls this endpoint to clean up the subscription.
2
Integration Disconnection
When users disconnect the Timetracker integration from their Zapier account, all associated webhooks are automatically removed.
3
Error Recovery
If a webhook subscription fails or becomes invalid, Zapier may attempt to clean it up to prevent future issues.
Webhook Lifecycle
Creation
Creation
Subscribe: When setting up a trigger, Zapier calls the subscribe endpoint to create a webhook subscription.
Active State
Active State
Monitoring: The webhook remains active and receives event notifications until deleted.
Deletion
Deletion
Cleanup: When no longer needed, Zapier calls this delete endpoint to remove the subscription.
Important Notes
Idempotent Operation: Deleting a non-existent webhook returns a success response, making this operation safe to retry.
Best Practices:
- Always store webhook IDs when creating subscriptions for later cleanup
- Implement proper error handling for deletion failures
- Consider implementing webhook health checks to detect stale subscriptions
- Use HTTPS endpoints only for security
- Monitor webhook deletion logs for integration health
Webhook Management
Finding Webhook IDs
To find webhook IDs for deletion, you can:- Store during creation: Save the webhook ID returned from the subscribe endpoint
- List webhooks: Use the webhook listing endpoint (if available) to find active subscriptions
- Zapier management: Check your Zapier account’s webhook management interface
Bulk Cleanup
For managing multiple webhooks:Security Considerations
Audit Trail: Webhook deletions are logged for security and compliance purposes. Consider implementing audit logging in your applications.
Troubleshooting
Common Issues
Webhook Not Found Error
Webhook Not Found Error
Cause: The webhook ID is incorrect or the webhook was already deleted.Solution:
- Verify the webhook ID is correct
- Check if the webhook was already deleted
- Ensure you’re using the correct API key for the workspace
Authentication Failures
Authentication Failures
Cause: Invalid API key or missing authorization header.Solution:
- Verify your API key is correct and active
- Ensure the Authorization header is properly formatted
- Check that your API key has the necessary permissions
Persistent Webhooks
Persistent Webhooks
Cause: Webhook appears to still be active after deletion.Solution:
- Wait a few minutes for the deletion to propagate
- Check if multiple webhooks exist for the same URL
- Verify the webhook ID was correct
Integration Testing
To test webhook deletion in your integration:- Create a test webhook using the subscribe endpoint
- Store the webhook ID returned in the response
- Delete the webhook using this endpoint
- Verify deletion by attempting to trigger the webhook (should fail)
- Clean up any test data created during testing