Package com.sendly.resources
Class WebhooksResource
java.lang.Object
com.sendly.resources.WebhooksResource
Webhooks resource for managing webhook endpoints.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new webhook endpoint.Create a new webhook endpoint with options.voidDelete a webhook.Get a specific webhook by ID.getDeliveries(String webhookId) Get delivery history for a webhook.list()List all webhooks.voidretryDelivery(String webhookId, String deliveryId) Retry a failed delivery.rotateSecret(String webhookId) Rotate the webhook signing secret.Test a webhook endpoint.Update a webhook configuration.
-
Constructor Details
-
WebhooksResource
-
-
Method Details
-
create
Create a new webhook endpoint.- Parameters:
url- HTTPS endpoint URLevents- Event types to subscribe to- Returns:
- Created webhook with signing secret
- Throws:
SendlyException
-
create
public WebhookCreatedResponse create(String url, List<String> events, String description, Map<String, Object> metadata) throws SendlyExceptionCreate a new webhook endpoint with options.- Parameters:
url- HTTPS endpoint URLevents- Event types to subscribe todescription- Optional descriptionmetadata- Optional metadata- Returns:
- Created webhook with signing secret
- Throws:
SendlyException
-
list
List all webhooks.- Throws:
SendlyException
-
get
Get a specific webhook by ID.- Throws:
SendlyException
-
update
public Webhook update(String webhookId, String url, List<String> events, String description, Boolean isActive) throws SendlyException Update a webhook configuration.- Throws:
SendlyException
-
delete
Delete a webhook.- Throws:
SendlyException
-
test
Test a webhook endpoint.- Throws:
SendlyException
-
rotateSecret
Rotate the webhook signing secret.- Throws:
SendlyException
-
getDeliveries
Get delivery history for a webhook.- Throws:
SendlyException
-
retryDelivery
Retry a failed delivery.- Throws:
SendlyException
-