Skip to content

MailSlurp\WebhookControllerApi

All URIs are relative to https://golang.api.mailslurp.com

Method HTTP request Description
CreateAccountWebhook Post /webhooks Attach a WebHook URL to an inbox
CreateWebhook Post /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
CreateWebhookForPhoneNumber Post /phone/numbers/{phoneNumberId}/webhooks Attach a WebHook URL to a phone number
DeleteAllWebhooks Delete /webhooks Delete all webhooks
DeleteWebhook Delete /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a Webhook for an Inbox
DeleteWebhookById Delete /webhooks/{webhookId} Delete a webhook
GetAllAccountWebhooks Get /webhooks/account/paginated List account webhooks Paginated
GetAllWebhookResults Get /webhooks/results Get results for all webhooks
GetAllWebhooks Get /webhooks/paginated List Webhooks Paginated
GetInboxWebhooksPaginated Get /inboxes/{inboxId}/webhooks/paginated Get paginated webhooks for an Inbox
GetJsonSchemaForWebhookEvent Post /webhooks/schema
GetJsonSchemaForWebhookPayload Post /webhooks/{webhookId}/schema
GetPhoneNumberWebhooksPaginated Get /phone/numbers/{phoneId}/webhooks/paginated Get paginated webhooks for a phone number
GetTestWebhookPayload Get /webhooks/test
GetTestWebhookPayloadBounce Get /webhooks/test/email-bounce-payload
GetTestWebhookPayloadBounceRecipient Get /webhooks/test/email-bounce-recipient-payload
GetTestWebhookPayloadDeliveryStatus Get /webhooks/test/delivery-status-payload Get webhook test payload for delivery status event
GetTestWebhookPayloadEmailOpened Get /webhooks/test/email-opened-payload
GetTestWebhookPayloadEmailRead Get /webhooks/test/email-read-payload
GetTestWebhookPayloadForWebhook Post /webhooks/{webhookId}/example
GetTestWebhookPayloadNewAttachment Get /webhooks/test/new-attachment-payload Get webhook test payload for new attachment event
GetTestWebhookPayloadNewContact Get /webhooks/test/new-contact-payload Get webhook test payload for new contact event
GetTestWebhookPayloadNewEmail Get /webhooks/test/new-email-payload Get webhook test payload for new email event
GetTestWebhookPayloadNewSms Get /webhooks/test/new-sms-payload Get webhook test payload for new sms event
GetWebhook Get /webhooks/{webhookId} Get a webhook
GetWebhookResult Get /webhooks/results/{webhookResultId} Get a webhook result for a webhook
GetWebhookResults Get /webhooks/{webhookId}/results Get a webhook results for a webhook
GetWebhookResultsUnseenErrorCount Get /webhooks/results/unseen-count Get count of unseen webhook results with error status
GetWebhooks Get /inboxes/{inboxId}/webhooks Get all webhooks for an Inbox
RedriveWebhookResult Post /webhooks/results/{webhookResultId}/redrive Get a webhook result and try to resend the original webhook payload
SendTestData Post /webhooks/{webhookId}/test Send webhook test data
UpdateWebhookHeaders Put /webhooks/{webhookId}/headers Update a webhook request headers
VerifyWebhookSignature Post /webhooks/verify Verify a webhook payload signature

CreateAccountWebhook

WebhookDto CreateAccountWebhook(ctx, createWebhookOptions)

Attach a WebHook URL to an inbox

Get notified of account level events such as bounce and bounce recipient.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
createWebhookOptions CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

CreateWebhook

WebhookDto CreateWebhook(ctx, inboxId, createWebhookOptions)

Attach a WebHook URL to an inbox

Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
inboxId string
createWebhookOptions CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

CreateWebhookForPhoneNumber

WebhookDto CreateWebhookForPhoneNumber(ctx, phoneNumberId, createWebhookOptions)

Attach a WebHook URL to a phone number

Get notified whenever a phone number receives an SMS via a WebHook URL.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
phoneNumberId string
createWebhookOptions CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteAllWebhooks

DeleteAllWebhooks(ctx, optional)

Delete all webhooks

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *DeleteAllWebhooksOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeleteAllWebhooksOpts struct

Name Type Description Notes
before optional.Time before

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteWebhook

DeleteWebhook(ctx, inboxId, webhookId)

Delete and disable a Webhook for an Inbox

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
inboxId string
webhookId string

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteWebhookById

DeleteWebhookById(ctx, webhookId)

Delete a webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId string

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAllAccountWebhooks

PageWebhookProjection GetAllAccountWebhooks(ctx, optional)

List account webhooks Paginated

List account webhooks in paginated form. Allows for page , page size, and sort direction.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetAllAccountWebhooksOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAllAccountWebhooksOpts struct

Name Type Description Notes
page optional.Int32 Optional page in list pagination [default to 0]
size optional.Int32 Optional page size for paginated result list. [default to 20]
sort optional.String Optional createdAt sort direction ASC or DESC [default to DESC]
eventType optional.String Optional event type
since optional.Time Filter by created at after the given timestamp
before optional.Time Filter by created at before the given timestamp

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAllWebhookResults

PageWebhookResult GetAllWebhookResults(ctx, optional)

Get results for all webhooks

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetAllWebhookResultsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAllWebhookResultsOpts struct

Name Type Description Notes
page optional.Int32 Optional page in list pagination [default to 0]
size optional.Int32 Optional page size in list pagination [default to 20]
sort optional.String Optional createdAt sort direction ASC or DESC [default to ASC]
searchFilter optional.String Optional search filter
since optional.Time Filter by created at after the given timestamp
before optional.Time Filter by created at before the given timestamp
unseenOnly optional.Bool Filter for unseen exceptions only

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAllWebhooks

PageWebhookProjection GetAllWebhooks(ctx, optional)

List Webhooks Paginated

List webhooks in paginated form. Allows for page , page size, and sort direction.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetAllWebhooksOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAllWebhooksOpts struct

Name Type Description Notes
page optional.Int32 Optional page in list pagination [default to 0]
size optional.Int32 Optional page size for paginated result list. [default to 20]
sort optional.String Optional createdAt sort direction ASC or DESC [default to DESC]
searchFilter optional.String Optional search filter
since optional.Time Filter by created at after the given timestamp
inboxId optional.Interface of string Filter by inboxId
phoneId optional.Interface of string Filter by phoneId
before optional.Time Filter by created at before the given timestamp

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetInboxWebhooksPaginated

PageWebhookProjection GetInboxWebhooksPaginated(ctx, inboxId, optional)

Get paginated webhooks for an Inbox

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
inboxId string
optional *GetInboxWebhooksPaginatedOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetInboxWebhooksPaginatedOpts struct

Name Type Description Notes

page | optional.Int32| Optional page in list pagination | [default to 0] size | optional.Int32| Optional page size in list pagination | [default to 20] sort | optional.String| Optional createdAt sort direction ASC or DESC | [default to ASC] searchFilter | optional.String| Optional search filter | since | optional.Time| Filter by created at after the given timestamp | before | optional.Time| Filter by created at before the given timestamp |

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetJsonSchemaForWebhookEvent

JsonSchemaDto GetJsonSchemaForWebhookEvent(ctx, event)

Get JSON Schema definition for webhook payload by event

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
event string

Return type

JsonSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetJsonSchemaForWebhookPayload

JsonSchemaDto GetJsonSchemaForWebhookPayload(ctx, webhookId)

Get JSON Schema definition for webhook payload

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId string

Return type

JsonSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetPhoneNumberWebhooksPaginated

PageWebhookProjection GetPhoneNumberWebhooksPaginated(ctx, phoneId, optional)

Get paginated webhooks for a phone number

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
phoneId string
optional *GetPhoneNumberWebhooksPaginatedOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetPhoneNumberWebhooksPaginatedOpts struct

Name Type Description Notes

page | optional.Int32| Optional page in list pagination | [default to 0] size | optional.Int32| Optional page size in list pagination | [default to 20] sort | optional.String| Optional createdAt sort direction ASC or DESC | [default to ASC] since | optional.Time| Filter by created at after the given timestamp | before | optional.Time| Filter by created at before the given timestamp |

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayload

AbstractWebhookPayload GetTestWebhookPayload(ctx, optional)

Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetTestWebhookPayloadOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetTestWebhookPayloadOpts struct

Name Type Description Notes
eventName optional.String

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadBounce

WebhookBouncePayload GetTestWebhookPayloadBounce(ctx, )

Get webhook test payload for bounce

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookBouncePayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadBounceRecipient

WebhookBounceRecipientPayload GetTestWebhookPayloadBounceRecipient(ctx, )

Get webhook test payload for bounce recipient

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookBounceRecipientPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadDeliveryStatus

WebhookDeliveryStatusPayload GetTestWebhookPayloadDeliveryStatus(ctx, )

Get webhook test payload for delivery status event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookDeliveryStatusPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadEmailOpened

WebhookEmailOpenedPayload GetTestWebhookPayloadEmailOpened(ctx, )

Get webhook test payload for email opened event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailOpenedPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadEmailRead

WebhookEmailReadPayload GetTestWebhookPayloadEmailRead(ctx, )

Get webhook test payload for email opened event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailReadPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadForWebhook

AbstractWebhookPayload GetTestWebhookPayloadForWebhook(ctx, webhookId)

Get example payload for webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId string

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadNewAttachment

WebhookNewAttachmentPayload GetTestWebhookPayloadNewAttachment(ctx, )

Get webhook test payload for new attachment event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookNewAttachmentPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadNewContact

WebhookNewContactPayload GetTestWebhookPayloadNewContact(ctx, )

Get webhook test payload for new contact event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookNewContactPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadNewEmail

WebhookNewEmailPayload GetTestWebhookPayloadNewEmail(ctx, )

Get webhook test payload for new email event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookNewEmailPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadNewSms

WebhookNewSmsPayload GetTestWebhookPayloadNewSms(ctx, )

Get webhook test payload for new sms event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookNewSmsPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhook

WebhookDto GetWebhook(ctx, webhookId)

Get a webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId string

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhookResult

WebhookResultDto GetWebhookResult(ctx, webhookResultId)

Get a webhook result for a webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookResultId string Webhook Result ID

Return type

WebhookResultDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhookResults

PageWebhookResult GetWebhookResults(ctx, webhookId, optional)

Get a webhook results for a webhook

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId string ID of webhook to get results for
optional *GetWebhookResultsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetWebhookResultsOpts struct

Name Type Description Notes

page | optional.Int32| Optional page in list pagination | [default to 0] size | optional.Int32| Optional page size in list pagination | [default to 20] sort | optional.String| Optional createdAt sort direction ASC or DESC | [default to ASC] searchFilter | optional.String| Optional search filter | since | optional.Time| Filter by created at after the given timestamp | before | optional.Time| Filter by created at before the given timestamp | unseenOnly | optional.Bool| Filter for unseen exceptions only |

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhookResultsUnseenErrorCount

UnseenErrorCountDto GetWebhookResultsUnseenErrorCount(ctx, )

Get count of unseen webhook results with error status

Required Parameters

This endpoint does not need any parameter.

Return type

UnseenErrorCountDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhooks

[]WebhookDto GetWebhooks(ctx, inboxId)

Get all webhooks for an Inbox

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
inboxId string

Return type

[]WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

RedriveWebhookResult

WebhookRedriveResult RedriveWebhookResult(ctx, webhookResultId)

Get a webhook result and try to resend the original webhook payload

Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookResultId string Webhook Result ID

Return type

WebhookRedriveResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

SendTestData

WebhookTestResult SendTestData(ctx, webhookId)

Send webhook test data

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId string

Return type

WebhookTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

UpdateWebhookHeaders

WebhookDto UpdateWebhookHeaders(ctx, webhookId, webhookHeaders)

Update a webhook request headers

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
webhookId string
webhookHeaders WebhookHeaders

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

VerifyWebhookSignature

VerifyWebhookSignatureResults VerifyWebhookSignature(ctx, verifyWebhookSignatureOptions)

Verify a webhook payload signature

Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
verifyWebhookSignatureOptions VerifyWebhookSignatureOptions

Return type

VerifyWebhookSignatureResults

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]