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 |
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 |
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", includeHeaders: WebhookHeaders(headers: [WebhookHeaderNameValue(name: "name_example", value: "value_example")]), requestBodyTemplate: "requestBodyTemplate_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
Authorization
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", includeHeaders: WebhookHeaders(headers: [WebhookHeaderNameValue(name: "name_example", value: "value_example")]), requestBodyTemplate: "requestBodyTemplate_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
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
open class func createWebhookForPhoneNumber( phoneNumberId: UUID, createWebhookOptions: CreateWebhookOptions) -> Promise<WebhookDto>
Attach a WebHook URL to a phone number
Get notified whenever a phone number receives an SMS via a WebHook URL.
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 phoneNumberId = 987 // UUID |
let createWebhookOptions = CreateWebhookOptions(url: "url_example", basicAuth: BasicAuthOptions(username: "username_example", password: "password_example"), name: "name_example", eventName: "eventName_example", includeHeaders: WebhookHeaders(headers: [WebhookHeaderNameValue(name: "name_example", value: "value_example")]), requestBodyTemplate: "requestBodyTemplate_example") // CreateWebhookOptions |
// Attach a WebHook URL to a phone number
WebhookControllerAPI.createWebhookForPhoneNumber(phoneNumberId: phoneNumberId, 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 |
---|---|---|---|
phoneNumberId | UUID | ||
createWebhookOptions | CreateWebhookOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
let before = Date() // Date | before (optional)
// Delete all webhooks
WebhookControllerAPI.deleteAllWebhooks(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 |
---|---|---|---|
before | Date | before | [optional] |
Return type
Void (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 ]
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
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
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 getAllAccountWebhooks( page: Int? = nil, size: Int? = nil, sort: Sort_getAllAccountWebhooks? = nil, eventType: EventType_getAllAccountWebhooks? = nil, since: Date? = nil, before: Date? = nil) -> Promise<PageWebhookProjection>
List account webhooks Paginated
List account 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 eventType = "eventType_example" // String | Optional event type (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 account webhooks Paginated
WebhookControllerAPI.getAllAccountWebhooks(page: page, size: size, sort: sort, eventType: eventType, 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] |
eventType | String | Optional event type | [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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[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
Authorization
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, inboxId: UUID? = nil, phoneId: UUID? = 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 inboxId = 987 // UUID | Filter by inboxId (optional)
let phoneId = 987 // UUID | Filter by phoneId (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, inboxId: inboxId, phoneId: phoneId, 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] |
inboxId | UUID | Filter by inboxId | [optional] |
phoneId | UUID | Filter by phoneId | [optional] |
before | Date | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
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
Authorization
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
open class func getPhoneNumberWebhooksPaginated( phoneId: UUID, page: Int? = nil, size: Int? = nil, sort: Sort_getPhoneNumberWebhooksPaginated? = nil, since: Date? = nil, before: Date? = nil) -> Promise<PageWebhookProjection>
Get paginated webhooks for a phone number
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 phoneId = 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 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 a phone number
WebhookControllerAPI.getPhoneNumberWebhooksPaginated(phoneId: phoneId, page: page, size: size, sort: sort, 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 |
---|---|---|---|
phoneId | 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] |
since | Date | Filter by created at after the given timestamp | [optional] |
before | Date | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
Get webhook test payload for delivery status 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 delivery status event
WebhookControllerAPI.getTestWebhookPayloadDeliveryStatus().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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
Get webhook test payload for new sms 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 sms event
WebhookControllerAPI.getTestWebhookPayloadNewSms().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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
// Get count of unseen webhook results with error status
WebhookControllerAPI.getWebhookResultsUnseenErrorCount().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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
open class func updateWebhookHeaders( webhookId: UUID, webhookHeaders: WebhookHeaders) -> Promise<WebhookDto>
Update a webhook request headers
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 |
let webhookHeaders = WebhookHeaders(headers: [WebhookHeaderNameValue(name: "name_example", value: "value_example")]) // WebhookHeaders |
// Update a webhook request headers
WebhookControllerAPI.updateWebhookHeaders(webhookId: webhookId, webhookHeaders: webhookHeaders).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 | ||
webhookHeaders | WebhookHeaders |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
open class func verifyWebhookSignature( verifyWebhookSignatureOptions: VerifyWebhookSignatureOptions) -> Promise<VerifyWebhookSignatureResults>
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.
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 verifyWebhookSignatureOptions = VerifyWebhookSignatureOptions(messageId: "messageId_example", signature: "signature_example") // VerifyWebhookSignatureOptions |
// Verify a webhook payload signature
WebhookControllerAPI.verifyWebhookSignature(verifyWebhookSignatureOptions: verifyWebhookSignatureOptions).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 |
---|---|---|---|
verifyWebhookSignatureOptions | VerifyWebhookSignatureOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]