Table of Contents

Interface IWebhookCollectionResource

Namespace
Mailtrap.Webhooks
Assembly
Mailtrap.Abstractions.dll

Represents webhook collection resource.

public interface IWebhookCollectionResource : IRestResource
Inherited Members

Methods

Create(CreateWebhookRequest, CancellationToken)

Creates a new webhook with details specified by request.

Task<CreateWebhookResponse> Create(CreateWebhookRequest request, CancellationToken cancellationToken = default)

Parameters

request CreateWebhookRequest

Request containing webhook details for creation.

cancellationToken CancellationToken
Token to control operation cancellation.

Returns

Task<CreateWebhookResponse>

Created webhook details, including the SigningSecret.

Remarks

The signing secret is only returned at creation time - store it securely.

GetAll(CancellationToken)

Returns all webhooks for the account.

Task<IList<Webhook>> GetAll(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token to control operation cancellation.

Returns

Task<IList<Webhook>>

Collection of webhook details.