WebhookControllerApi

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

MethodHTTP requestDescription
createWebhookPOST /inboxes/{inboxId}/webhooksAttach a WebHook URL to an inbox
deleteAllWebhooksDELETE /webhooksDelete all webhooks
deleteWebhookDELETE /inboxes/{inboxId}/webhooks/{webhookId}Delete and disable a Webhook for an Inbox
getAllWebhookResultsGET /webhooks/resultsGet results for all webhooks
getAllWebhooksGET /webhooks/paginatedList Webhooks Paginated
getInboxWebhooksPaginatedGET /inboxes/{inboxId}/webhooks/paginatedGet paginated webhooks for an Inbox
getJsonSchemaForWebhookPayloadPOST /webhooks/{webhookId}/schemaGet JSON Schema definition for webhook payload
getTestWebhookPayloadGET /webhooks/testGet test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.
getTestWebhookPayloadEmailOpenedGET /webhooks/test/email-opened-payloadGet webhook test payload for email opened event
getTestWebhookPayloadEmailReadGET /webhooks/test/email-read-payloadGet webhook test payload for email opened event
getTestWebhookPayloadForWebhookPOST /webhooks/{webhookId}/exampleGet example payload for webhook
getTestWebhookPayloadNewAttachmentGET /webhooks/test/new-attachment-payloadGet webhook test payload for new attachment event
getTestWebhookPayloadNewContactGET /webhooks/test/new-contact-payloadGet webhook test payload for new contact event
getTestWebhookPayloadNewEmailGET /webhooks/test/new-email-payloadGet webhook test payload for new email event
getWebhookGET /webhooks/{webhookId}Get a webhook for an Inbox
getWebhookResultGET /webhooks/results/{webhookResultId}Get a webhook result for a webhook
getWebhookResultsGET /webhooks/{webhookId}/resultsGet a webhook results for a webhook
getWebhookResultsUnseenErrorCountGET /webhooks/results/unseen-countGet count of unseen webhook results with error status
getWebhooksGET /inboxes/{inboxId}/webhooksGet all webhooks for an Inbox
redriveWebhookResultPOST /webhooks/results/{webhookResultId}/redriveGet a webhook result and try to resend the original webhook payload
sendTestDataPOST /webhooks/{webhookId}/testSend webhook test data

createWebhook

WebhookDto createWebhook(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.

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | inboxId
val webhookOptions : CreateWebhookOptions =  // CreateWebhookOptions | webhookOptions
try {
    val result : WebhookDto = apiInstance.createWebhook(inboxId, webhookOptions)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#createWebhook")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#createWebhook")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDinboxId
webhookOptionsCreateWebhookOptionswebhookOptions

Return type

WebhookDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

deleteAllWebhooks

deleteAllWebhooks()

Delete all webhooks

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
try {
    apiInstance.deleteAllWebhooks()
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#deleteAllWebhooks")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#deleteAllWebhooks")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

deleteWebhook

deleteWebhook(inboxId, webhookId)

Delete and disable a Webhook for an Inbox

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | inboxId
val webhookId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | webhookId
try {
    apiInstance.deleteWebhook(inboxId, webhookId)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#deleteWebhook")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#deleteWebhook")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDinboxId
webhookIdjava.util.UUIDwebhookId

Return type

null (empty response body)

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getAllWebhookResults

PageWebhookResult getAllWebhookResults(before, page, searchFilter, since, size, sort, unseenOnly)

Get results for all webhooks

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in list pagination
val searchFilter : kotlin.String = searchFilter_example // kotlin.String | Optional search filter
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at after the given timestamp
val size : kotlin.Int = 56 // kotlin.Int | Optional page size in list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
val unseenOnly : kotlin.Boolean = true // kotlin.Boolean | Filter for unseen exceptions only
try {
    val result : PageWebhookResult = apiInstance.getAllWebhookResults(before, page, searchFilter, since, size, sort, unseenOnly)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getAllWebhookResults")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getAllWebhookResults")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]
pagekotlin.IntOptional page in list pagination[optional] [default to 0]
searchFilterkotlin.StringOptional search filter[optional]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
sizekotlin.IntOptional page size in list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]
unseenOnlykotlin.BooleanFilter for unseen exceptions only[optional]

Return type

PageWebhookResult

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getAllWebhooks

PageWebhookProjection getAllWebhooks(before, page, searchFilter, since, size, sort)

List Webhooks Paginated

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

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in list pagination
val searchFilter : kotlin.String = searchFilter_example // kotlin.String | Optional search filter
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at after the given timestamp
val size : kotlin.Int = 56 // kotlin.Int | Optional page size for paginated result list.
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
try {
    val result : PageWebhookProjection = apiInstance.getAllWebhooks(before, page, searchFilter, since, size, sort)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getAllWebhooks")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getAllWebhooks")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]
pagekotlin.IntOptional page in list pagination[optional] [default to 0]
searchFilterkotlin.StringOptional search filter[optional]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
sizekotlin.IntOptional page size for paginated result list.[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to DESC] [enum: ASC, DESC]

Return type

PageWebhookProjection

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getInboxWebhooksPaginated

PageWebhookProjection getInboxWebhooksPaginated(inboxId, before, page, searchFilter, since, size, sort)

Get paginated webhooks for an Inbox

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | inboxId
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in list pagination
val searchFilter : kotlin.String = searchFilter_example // kotlin.String | Optional search filter
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at after the given timestamp
val size : kotlin.Int = 56 // kotlin.Int | Optional page size in list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
try {
    val result : PageWebhookProjection = apiInstance.getInboxWebhooksPaginated(inboxId, before, page, searchFilter, since, size, sort)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getInboxWebhooksPaginated")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getInboxWebhooksPaginated")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDinboxId
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]
pagekotlin.IntOptional page in list pagination[optional] [default to 0]
searchFilterkotlin.StringOptional search filter[optional]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
sizekotlin.IntOptional page size in list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]

Return type

PageWebhookProjection

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getJsonSchemaForWebhookPayload

JSONSchemaDto getJsonSchemaForWebhookPayload(webhookId)

Get JSON Schema definition for webhook payload

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val webhookId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | webhookId
try {
    val result : JSONSchemaDto = apiInstance.getJsonSchemaForWebhookPayload(webhookId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getJsonSchemaForWebhookPayload")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getJsonSchemaForWebhookPayload")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
webhookIdjava.util.UUIDwebhookId

Return type

JSONSchemaDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getTestWebhookPayload

AbstractWebhookPayload getTestWebhookPayload(eventName)

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

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val eventName : kotlin.String = eventName_example // kotlin.String | eventName
try {
    val result : AbstractWebhookPayload = apiInstance.getTestWebhookPayload(eventName)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getTestWebhookPayload")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getTestWebhookPayload")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
eventNamekotlin.StringeventName[optional] [enum: EMAIL_RECEIVED, NEW_EMAIL, NEW_CONTACT, NEW_ATTACHMENT, EMAIL_OPENED, EMAIL_READ]

Return type

AbstractWebhookPayload

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getTestWebhookPayloadEmailOpened

WebhookEmailOpenedPayload getTestWebhookPayloadEmailOpened()

Get webhook test payload for email opened event

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
try {
    val result : WebhookEmailOpenedPayload = apiInstance.getTestWebhookPayloadEmailOpened()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getTestWebhookPayloadEmailOpened")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getTestWebhookPayloadEmailOpened")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailOpenedPayload

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getTestWebhookPayloadEmailRead

WebhookEmailReadPayload getTestWebhookPayloadEmailRead()

Get webhook test payload for email opened event

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
try {
    val result : WebhookEmailReadPayload = apiInstance.getTestWebhookPayloadEmailRead()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getTestWebhookPayloadEmailRead")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getTestWebhookPayloadEmailRead")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailReadPayload

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getTestWebhookPayloadForWebhook

AbstractWebhookPayload getTestWebhookPayloadForWebhook(webhookId)

Get example payload for webhook

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val webhookId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | webhookId
try {
    val result : AbstractWebhookPayload = apiInstance.getTestWebhookPayloadForWebhook(webhookId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getTestWebhookPayloadForWebhook")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getTestWebhookPayloadForWebhook")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
webhookIdjava.util.UUIDwebhookId

Return type

AbstractWebhookPayload

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getTestWebhookPayloadNewAttachment

WebhookNewAttachmentPayload getTestWebhookPayloadNewAttachment()

Get webhook test payload for new attachment event

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
try {
    val result : WebhookNewAttachmentPayload = apiInstance.getTestWebhookPayloadNewAttachment()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getTestWebhookPayloadNewAttachment")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getTestWebhookPayloadNewAttachment")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewAttachmentPayload

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getTestWebhookPayloadNewContact

WebhookNewContactPayload getTestWebhookPayloadNewContact()

Get webhook test payload for new contact event

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
try {
    val result : WebhookNewContactPayload = apiInstance.getTestWebhookPayloadNewContact()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getTestWebhookPayloadNewContact")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getTestWebhookPayloadNewContact")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewContactPayload

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getTestWebhookPayloadNewEmail

WebhookNewEmailPayload getTestWebhookPayloadNewEmail()

Get webhook test payload for new email event

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
try {
    val result : WebhookNewEmailPayload = apiInstance.getTestWebhookPayloadNewEmail()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getTestWebhookPayloadNewEmail")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getTestWebhookPayloadNewEmail")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewEmailPayload

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getWebhook

WebhookDto getWebhook(webhookId)

Get a webhook for an Inbox

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val webhookId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | webhookId
try {
    val result : WebhookDto = apiInstance.getWebhook(webhookId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getWebhook")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getWebhook")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
webhookIdjava.util.UUIDwebhookId

Return type

WebhookDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getWebhookResult

WebhookResultDto getWebhookResult(webhookResultId)

Get a webhook result for a webhook

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val webhookResultId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | Webhook Result ID
try {
    val result : WebhookResultDto = apiInstance.getWebhookResult(webhookResultId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getWebhookResult")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getWebhookResult")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
webhookResultIdjava.util.UUIDWebhook Result ID

Return type

WebhookResultDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getWebhookResults

PageWebhookResult getWebhookResults(webhookId, before, page, searchFilter, since, size, sort, unseenOnly)

Get a webhook results for a webhook

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val webhookId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | ID of webhook to get results for
val before : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at before the given timestamp
val page : kotlin.Int = 56 // kotlin.Int | Optional page  in list pagination
val searchFilter : kotlin.String = searchFilter_example // kotlin.String | Optional search filter
val since : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | Filter by created at after the given timestamp
val size : kotlin.Int = 56 // kotlin.Int | Optional page size in list pagination
val sort : kotlin.String = sort_example // kotlin.String | Optional createdAt sort direction ASC or DESC
val unseenOnly : kotlin.Boolean = true // kotlin.Boolean | Filter for unseen exceptions only
try {
    val result : PageWebhookResult = apiInstance.getWebhookResults(webhookId, before, page, searchFilter, since, size, sort, unseenOnly)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getWebhookResults")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getWebhookResults")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
webhookIdjava.util.UUIDID of webhook to get results for
beforejava.time.OffsetDateTimeFilter by created at before the given timestamp[optional]
pagekotlin.IntOptional page in list pagination[optional] [default to 0]
searchFilterkotlin.StringOptional search filter[optional]
sincejava.time.OffsetDateTimeFilter by created at after the given timestamp[optional]
sizekotlin.IntOptional page size in list pagination[optional] [default to 20]
sortkotlin.StringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]
unseenOnlykotlin.BooleanFilter for unseen exceptions only[optional]

Return type

PageWebhookResult

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getWebhookResultsUnseenErrorCount

UnseenErrorCountDto getWebhookResultsUnseenErrorCount(inboxId)

Get count of unseen webhook results with error status

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | inboxId
try {
    val result : UnseenErrorCountDto = apiInstance.getWebhookResultsUnseenErrorCount(inboxId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getWebhookResultsUnseenErrorCount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getWebhookResultsUnseenErrorCount")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDinboxId

Return type

UnseenErrorCountDto

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

getWebhooks

kotlin.collections.List getWebhooks(inboxId)

Get all webhooks for an Inbox

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | inboxId
try {
    val result : kotlin.collections.List<WebhookDto> = apiInstance.getWebhooks(inboxId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#getWebhooks")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#getWebhooks")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDinboxId

Return type

kotlin.collections.List

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

redriveWebhookResult

WebhookRedriveResult redriveWebhookResult(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.

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val webhookResultId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | Webhook Result ID
try {
    val result : WebhookRedriveResult = apiInstance.redriveWebhookResult(webhookResultId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#redriveWebhookResult")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#redriveWebhookResult")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
webhookResultIdjava.util.UUIDWebhook Result ID

Return type

WebhookRedriveResult

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

sendTestData

WebhookTestResult sendTestData(webhookId)

Send webhook test data

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = WebhookControllerApi()
val webhookId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | webhookId
try {
    val result : WebhookTestResult = apiInstance.sendTestData(webhookId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling WebhookControllerApi#sendTestData")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling WebhookControllerApi#sendTestData")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
webhookIdjava.util.UUIDwebhookId

Return type

WebhookTestResult

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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