# MailSlurp\WebhookControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
CreateWebhook | Post /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox |
DeleteWebhook | Delete /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a Webhook for an Inbox |
GetAllWebhooks | Get /webhooks/paginated | List Webhooks Paginated |
GetWebhook | Get /webhooks/{webhookId} | Get a webhook for an Inbox |
GetWebhooks | Get /inboxes/{inboxId}/webhooks | Get all Webhooks for an Inbox |
SendTestData | Post /webhooks/{webhookId}/test | Send webhook test data |
# CreateWebhook
WebhookDto CreateWebhook(ctx, inboxId, webhookOptions)
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 | inboxId | |
webhookOptions | CreateWebhookOptions | webhookOptions |
# Return type
# Authorization
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# 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 | inboxId | |
webhookId | string | webhookId |
# Return type
(empty response body)
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# GetAllWebhooks
PageWebhookProjection GetAllWebhooks(ctx, optional)
List Webhooks Paginated
List webhooks in paginated form. Allows for page index, 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 index in inbox list pagination | [default to 0] |
size | optional.Int32 | Optional page size in inbox list pagination | [default to 20] |
sort | optional.String | Optional createdAt sort direction ASC or DESC | [default to ASC] |
# Return type
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# GetWebhook
WebhookDto GetWebhook(ctx, webhookId)
Get a webhook for an Inbox
# Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
webhookId | string | webhookId |
# Return type
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# 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 | inboxId |
# Return type
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# 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 | webhookId |
# Return type
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]