Skip to content

WebhookControllerAPI

All URIs are relative to https://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
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
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
getTestWebhookPayload GET /webhooks/test
getTestWebhookPayloadBounce GET /webhooks/test/email-bounce-payload
getTestWebhookPayloadBounceRecipient GET /webhooks/test/email-bounce-recipient-payload
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
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
    open class func createAccountWebhook( createWebhookOptions: CreateWebhookOptions) -> Promise<WebhookDto>

Attach a WebHook URL to an inbox

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let createWebhookOptions = CreateWebhookOptions(url: "url_example", basicAuth: BasicAuthOptions(username: "username_example", password: "password_example"), name: "name_example", eventName: "eventName_example") // CreateWebhookOptions | 

// Attach a WebHook URL to an inbox
WebhookControllerAPI.createAccountWebhook(createWebhookOptions: createWebhookOptions).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
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 ]

    open class func createWebhook( inboxId: UUID,  createWebhookOptions: CreateWebhookOptions) -> Promise<WebhookDto>

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.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | 
let createWebhookOptions = CreateWebhookOptions(url: "url_example", basicAuth: BasicAuthOptions(username: "username_example", password: "password_example"), name: "name_example", eventName: "eventName_example") // CreateWebhookOptions | 

// Attach a WebHook URL to an inbox
WebhookControllerAPI.createWebhook(inboxId: inboxId, createWebhookOptions: createWebhookOptions).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
inboxId UUID
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 ]

    open class func deleteAllWebhooks() -> Promise<Void>

Delete all webhooks

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


// Delete all webhooks
WebhookControllerAPI.deleteAllWebhooks().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

This endpoint does not need any parameter.

Return type

Void (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 ]

    open class func deleteWebhook( inboxId: UUID,  webhookId: UUID) -> Promise<Void>

Delete and disable a Webhook for an Inbox

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | 
let webhookId = 987 // UUID | 

// Delete and disable a Webhook for an Inbox
WebhookControllerAPI.deleteWebhook(inboxId: inboxId, webhookId: webhookId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
inboxId UUID
webhookId UUID

Return type

Void (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 ]

    open class func deleteWebhookById( webhookId: UUID) -> Promise<Void>

Delete a webhook

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookId = 987 // UUID | 

// Delete a webhook
WebhookControllerAPI.deleteWebhookById(webhookId: webhookId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookId UUID

Return type

Void (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 ]

    open class func getAllWebhookResults( page: Int? = nil,  size: Int? = nil,  sort: Sort_getAllWebhookResults? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil,  unseenOnly: Bool? = nil) -> Promise<PageWebhookResult>

Get results for all webhooks

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let page = 987 // Int | Optional page  in list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size in list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)
let unseenOnly = true // Bool | Filter for unseen exceptions only (optional)

// Get results for all webhooks
WebhookControllerAPI.getAllWebhookResults(page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before, unseenOnly: unseenOnly).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

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

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 ]

    open class func getAllWebhooks( page: Int? = nil,  size: Int? = nil,  sort: Sort_getAllWebhooks? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil) -> Promise<PageWebhookProjection>

List Webhooks Paginated

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let page = 987 // Int | Optional page  in list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size for paginated result list. (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .desc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)

// List Webhooks Paginated
WebhookControllerAPI.getAllWebhooks(page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

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

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 ]

    open class func getInboxWebhooksPaginated( inboxId: UUID,  page: Int? = nil,  size: Int? = nil,  sort: Sort_getInboxWebhooksPaginated? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil) -> Promise<PageWebhookProjection>

Get paginated webhooks for an Inbox

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | 
let page = 987 // Int | Optional page  in list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size in list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)

// Get paginated webhooks for an Inbox
WebhookControllerAPI.getInboxWebhooksPaginated(inboxId: inboxId, page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
inboxId UUID
page Int Optional page in list pagination [optional] [default to 0]
size Int Optional page size in list pagination [optional] [default to 20]
sort String Optional createdAt sort direction ASC or DESC [optional] [default to .asc]
searchFilter String Optional search filter [optional]
since Date Filter by created at after the given timestamp [optional]
before Date Filter by created at before the given timestamp [optional]

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 ]

    open class func getJsonSchemaForWebhookEvent( event: Event_getJsonSchemaForWebhookEvent) -> Promise<JSONSchemaDto>

Get JSON Schema definition for webhook payload by event

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let event = "event_example" // String | 

WebhookControllerAPI.getJsonSchemaForWebhookEvent(event: event).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
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 ]

    open class func getJsonSchemaForWebhookPayload( webhookId: UUID) -> Promise<JSONSchemaDto>

Get JSON Schema definition for webhook payload

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookId = 987 // UUID | 

WebhookControllerAPI.getJsonSchemaForWebhookPayload(webhookId: webhookId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookId UUID

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 ]

    open class func getTestWebhookPayload( eventName: EventName_getTestWebhookPayload? = nil) -> Promise<AbstractWebhookPayload>

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

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let eventName = "eventName_example" // String |  (optional)

WebhookControllerAPI.getTestWebhookPayload(eventName: eventName).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
eventName String [optional]

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 ]

    open class func getTestWebhookPayloadBounce() -> Promise<WebhookBouncePayload>

Get webhook test payload for bounce

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


WebhookControllerAPI.getTestWebhookPayloadBounce().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]

    open class func getTestWebhookPayloadBounceRecipient() -> Promise<WebhookBounceRecipientPayload>

Get webhook test payload for bounce recipient

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


WebhookControllerAPI.getTestWebhookPayloadBounceRecipient().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]

    open class func getTestWebhookPayloadEmailOpened() -> Promise<WebhookEmailOpenedPayload>

Get webhook test payload for email opened event

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


WebhookControllerAPI.getTestWebhookPayloadEmailOpened().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]

    open class func getTestWebhookPayloadEmailRead() -> Promise<WebhookEmailReadPayload>

Get webhook test payload for email opened event

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


WebhookControllerAPI.getTestWebhookPayloadEmailRead().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]

    open class func getTestWebhookPayloadForWebhook( webhookId: UUID) -> Promise<AbstractWebhookPayload>

Get example payload for webhook

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookId = 987 // UUID | 

WebhookControllerAPI.getTestWebhookPayloadForWebhook(webhookId: webhookId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookId UUID

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 ]

    open class func getTestWebhookPayloadNewAttachment() -> Promise<WebhookNewAttachmentPayload>

Get webhook test payload for new attachment event

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


// Get webhook test payload for new attachment event
WebhookControllerAPI.getTestWebhookPayloadNewAttachment().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]

    open class func getTestWebhookPayloadNewContact() -> Promise<WebhookNewContactPayload>

Get webhook test payload for new contact event

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


// Get webhook test payload for new contact event
WebhookControllerAPI.getTestWebhookPayloadNewContact().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]

    open class func getTestWebhookPayloadNewEmail() -> Promise<WebhookNewEmailPayload>

Get webhook test payload for new email event

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


// Get webhook test payload for new email event
WebhookControllerAPI.getTestWebhookPayloadNewEmail().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

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 ]

    open class func getWebhook( webhookId: UUID) -> Promise<WebhookDto>

Get a webhook

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookId = 987 // UUID | 

// Get a webhook
WebhookControllerAPI.getWebhook(webhookId: webhookId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookId UUID

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 ]

    open class func getWebhookResult( webhookResultId: UUID) -> Promise<WebhookResultDto>

Get a webhook result for a webhook

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookResultId = 987 // UUID | Webhook Result ID

// Get a webhook result for a webhook
WebhookControllerAPI.getWebhookResult(webhookResultId: webhookResultId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookResultId UUID 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 ]

    open class func getWebhookResults( webhookId: UUID,  page: Int? = nil,  size: Int? = nil,  sort: Sort_getWebhookResults? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil,  unseenOnly: Bool? = nil) -> Promise<PageWebhookResult>

Get a webhook results for a webhook

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookId = 987 // UUID | ID of webhook to get results for
let page = 987 // Int | Optional page  in list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size in list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)
let unseenOnly = true // Bool | Filter for unseen exceptions only (optional)

// Get a webhook results for a webhook
WebhookControllerAPI.getWebhookResults(webhookId: webhookId, page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before, unseenOnly: unseenOnly).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookId UUID ID of webhook to get results for
page Int Optional page in list pagination [optional] [default to 0]
size Int Optional page size in list pagination [optional] [default to 20]
sort String Optional createdAt sort direction ASC or DESC [optional] [default to .asc]
searchFilter String Optional search filter [optional]
since Date Filter by created at after the given timestamp [optional]
before Date Filter by created at before the given timestamp [optional]
unseenOnly Bool Filter for unseen exceptions only [optional]

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 ]

    open class func getWebhookResultsUnseenErrorCount( inboxId: UUID) -> Promise<UnseenErrorCountDto>

Get count of unseen webhook results with error status

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | 

// Get count of unseen webhook results with error status
WebhookControllerAPI.getWebhookResultsUnseenErrorCount(inboxId: inboxId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
inboxId UUID

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 ]

    open class func getWebhooks( inboxId: UUID) -> Promise<[WebhookDto]>

Get all webhooks for an Inbox

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | 

// Get all webhooks for an Inbox
WebhookControllerAPI.getWebhooks(inboxId: inboxId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
inboxId UUID

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 ]

    open class func redriveWebhookResult( webhookResultId: UUID) -> Promise<WebhookRedriveResult>

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.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookResultId = 987 // UUID | Webhook Result ID

// Get a webhook result and try to resend the original webhook payload
WebhookControllerAPI.redriveWebhookResult(webhookResultId: webhookResultId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookResultId UUID 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 ]

    open class func sendTestData( webhookId: UUID) -> Promise<WebhookTestResult>

Send webhook test data

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let webhookId = 987 // UUID | 

// Send webhook test data
WebhookControllerAPI.sendTestData(webhookId: webhookId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
webhookId UUID

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 ]