Package io.mailtrap.api.webhooks
Interface Webhooks
- All Known Implementing Classes:
WebhooksImpl
public interface Webhooks
-
Method Summary
Modifier and TypeMethodDescriptioncreateWebhook(long accountId, CreateWebhookRequest request) Create a new webhook for the account.deleteWebhook(long accountId, long webhookId) Permanently delete a webhook.getAllWebhooks(long accountId) List all webhooks for the account.getWebhook(long accountId, long webhookId) Get a single webhook by ID.updateWebhook(long accountId, long webhookId, UpdateWebhookRequest request) Update an existing webhook.
-
Method Details
-
createWebhook
Create a new webhook for the account. The response includes thesigning_secretused to verify webhook signatures (only returned on creation).- Parameters:
accountId- unique account IDrequest- webhook configuration- Returns:
- created webhook including the signing secret
-
getAllWebhooks
List all webhooks for the account.- Parameters:
accountId- unique account ID- Returns:
- webhooks
-
getWebhook
Get a single webhook by ID.- Parameters:
accountId- unique account IDwebhookId- webhook ID- Returns:
- webhook details
-
updateWebhook
Update an existing webhook.- Parameters:
accountId- unique account IDwebhookId- webhook IDrequest- fields to update- Returns:
- updated webhook
-
deleteWebhook
Permanently delete a webhook.- Parameters:
accountId- unique account IDwebhookId- webhook ID- Returns:
- the deleted webhook
-