MailSlurp\WebhookControllerApi
All URIs are relative to https://php.api.mailslurp.com, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createAccountWebhook() | POST /webhooks | Attach a WebHook URL to an inbox |
createWebhook() | POST /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox |
createWebhookForPhoneNumber() | POST /phone/numbers/{phoneNumberId}/webhooks | Attach a WebHook URL to a phone number |
deleteAllWebhooks() | DELETE /webhooks | Delete all webhooks |
deleteWebhook() | DELETE /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a Webhook for an Inbox |
deleteWebhookById() | DELETE /webhooks/{webhookId} | Delete a webhook |
getAllAccountWebhooks() | GET /webhooks/account/paginated | List account webhooks Paginated |
getAllWebhookResults() | GET /webhooks/results | Get results for all webhooks |
getAllWebhooks() | GET /webhooks/paginated | List Webhooks Paginated |
getInboxWebhooksPaginated() | GET /inboxes/{inboxId}/webhooks/paginated | Get paginated webhooks for an Inbox |
getJsonSchemaForWebhookEvent() | POST /webhooks/schema | |
getJsonSchemaForWebhookPayload() | POST /webhooks/{webhookId}/schema | |
getPhoneNumberWebhooksPaginated() | GET /phone/numbers/{phoneId}/webhooks/paginated | Get paginated webhooks for a phone number |
getTestWebhookPayload() | GET /webhooks/test | |
getTestWebhookPayloadBounce() | GET /webhooks/test/email-bounce-payload | |
getTestWebhookPayloadBounceRecipient() | GET /webhooks/test/email-bounce-recipient-payload | |
getTestWebhookPayloadDeliveryStatus() | GET /webhooks/test/delivery-status-payload | Get webhook test payload for delivery status event |
getTestWebhookPayloadEmailOpened() | GET /webhooks/test/email-opened-payload | |
getTestWebhookPayloadEmailRead() | GET /webhooks/test/email-read-payload | |
getTestWebhookPayloadForWebhook() | POST /webhooks/{webhookId}/example | |
getTestWebhookPayloadNewAttachment() | GET /webhooks/test/new-attachment-payload | Get webhook test payload for new attachment event |
getTestWebhookPayloadNewContact() | GET /webhooks/test/new-contact-payload | Get webhook test payload for new contact event |
getTestWebhookPayloadNewEmail() | GET /webhooks/test/new-email-payload | Get webhook test payload for new email event |
getTestWebhookPayloadNewSms() | GET /webhooks/test/new-sms-payload | Get webhook test payload for new sms event |
getWebhook() | GET /webhooks/{webhookId} | Get a webhook |
getWebhookResult() | GET /webhooks/results/{webhookResultId} | Get a webhook result for a webhook |
getWebhookResults() | GET /webhooks/{webhookId}/results | Get a webhook results for a webhook |
getWebhookResultsUnseenErrorCount() | GET /webhooks/results/unseen-count | Get count of unseen webhook results with error status |
getWebhooks() | GET /inboxes/{inboxId}/webhooks | Get all webhooks for an Inbox |
redriveWebhookResult() | POST /webhooks/results/{webhookResultId}/redrive | Get a webhook result and try to resend the original webhook payload |
sendTestData() | POST /webhooks/{webhookId}/test | Send webhook test data |
updateWebhookHeaders() | PUT /webhooks/{webhookId}/headers | Update a webhook request headers |
verifyWebhookSignature() | POST /webhooks/verify | Verify a webhook payload signature |
createAccountWebhook()
Attach a WebHook URL to an inbox
Get notified of account level events such as bounce and bounce recipient.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$create_webhook_options = new MailSlurpModelsCreateWebhookOptions(); // MailSlurpModelsCreateWebhookOptions
try {
$result = $apiInstance->createAccountWebhook($create_webhook_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->createAccountWebhook: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
create_webhook_options | MailSlurpModelsCreateWebhookOptions |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
createWebhook()
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
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string
$create_webhook_options = new MailSlurpModelsCreateWebhookOptions(); // MailSlurpModelsCreateWebhookOptions
try {
$result = $apiInstance->createWebhook($inbox_id, $create_webhook_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->createWebhook: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | string | ||
create_webhook_options | MailSlurpModelsCreateWebhookOptions |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
createWebhookForPhoneNumber()
Attach a WebHook URL to a phone number
Get notified whenever a phone number receives an SMS via a WebHook URL.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$phone_number_id = 'phone_number_id_example'; // string
$create_webhook_options = new MailSlurpModelsCreateWebhookOptions(); // MailSlurpModelsCreateWebhookOptions
try {
$result = $apiInstance->createWebhookForPhoneNumber($phone_number_id, $create_webhook_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->createWebhookForPhoneNumber: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phone_number_id | string | ||
create_webhook_options | MailSlurpModelsCreateWebhookOptions |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
deleteAllWebhooks()
Delete all webhooks
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | before
try {
$apiInstance->deleteAllWebhooks($before);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->deleteAllWebhooks: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
before | DateTime | 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 ]
deleteWebhook()
Delete and disable a Webhook for an Inbox
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string
$webhook_id = 'webhook_id_example'; // string
try {
$apiInstance->deleteWebhook($inbox_id, $webhook_id);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->deleteWebhook: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | string | ||
webhook_id | string |
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 ]
deleteWebhookById()
Delete a webhook
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_id = 'webhook_id_example'; // string
try {
$apiInstance->deleteWebhookById($webhook_id);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->deleteWebhookById: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | string |
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 ]
getAllAccountWebhooks()
getAllAccountWebhooks($page, $size, $sort, $event_type, $since, $before): MailSlurpModelsPageWebhookProjection
List account webhooks Paginated
List account webhooks in paginated form. Allows for page , page size, and sort direction.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$page = 0; // int | Optional page in list pagination
$size = 20; // int | Optional page size for paginated result list.
$sort = 'DESC'; // string | Optional createdAt sort direction ASC or DESC
$event_type = 'event_type_example'; // string | Optional event type
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
try {
$result = $apiInstance->getAllAccountWebhooks($page, $size, $sort, $event_type, $since, $before);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getAllAccountWebhooks: ', $e->getMessage(), PHP_EOL;
}
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'] |
event_type | string | Optional event type | [optional] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
MailSlurpModelsPageWebhookProjection
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getAllWebhookResults()
getAllWebhookResults($page, $size, $sort, $search_filter, $since, $before, $unseen_only): MailSlurpModelsPageWebhookResult
Get results for all webhooks
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$page = 0; // int | Optional page in list pagination
$size = 20; // int | Optional page size in list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$search_filter = 'search_filter_example'; // string | Optional search filter
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
$unseen_only = True; // bool | Filter for unseen exceptions only
try {
$result = $apiInstance->getAllWebhookResults($page, $size, $sort, $search_filter, $since, $before, $unseen_only);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getAllWebhookResults: ', $e->getMessage(), PHP_EOL;
}
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'] |
search_filter | string | Optional search filter | [optional] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
unseen_only | bool | Filter for unseen exceptions only | [optional] |
Return type
MailSlurpModelsPageWebhookResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getAllWebhooks()
getAllWebhooks($page, $size, $sort, $search_filter, $since, $inbox_id, $phone_id, $before): MailSlurpModelsPageWebhookProjection
List Webhooks Paginated
List webhooks in paginated form. Allows for page , page size, and sort direction.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$page = 0; // int | Optional page in list pagination
$size = 20; // int | Optional page size for paginated result list.
$sort = 'DESC'; // string | Optional createdAt sort direction ASC or DESC
$search_filter = 'search_filter_example'; // string | Optional search filter
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$inbox_id = 'inbox_id_example'; // string | Filter by inboxId
$phone_id = 'phone_id_example'; // string | Filter by phoneId
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
try {
$result = $apiInstance->getAllWebhooks($page, $size, $sort, $search_filter, $since, $inbox_id, $phone_id, $before);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getAllWebhooks: ', $e->getMessage(), PHP_EOL;
}
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'] |
search_filter | string | Optional search filter | [optional] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
inbox_id | string | Filter by inboxId | [optional] |
phone_id | string | Filter by phoneId | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
MailSlurpModelsPageWebhookProjection
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getInboxWebhooksPaginated()
getInboxWebhooksPaginated($inbox_id, $page, $size, $sort, $search_filter, $since, $before): MailSlurpModelsPageWebhookProjection
Get paginated webhooks for an Inbox
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string
$page = 0; // int | Optional page in list pagination
$size = 20; // int | Optional page size in list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$search_filter = 'search_filter_example'; // string | Optional search filter
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
try {
$result = $apiInstance->getInboxWebhooksPaginated($inbox_id, $page, $size, $sort, $search_filter, $since, $before);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getInboxWebhooksPaginated: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | string | ||
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'] |
search_filter | string | Optional search filter | [optional] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
MailSlurpModelsPageWebhookProjection
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getJsonSchemaForWebhookEvent()
Get JSON Schema definition for webhook payload by event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$event = 'event_example'; // string
try {
$result = $apiInstance->getJsonSchemaForWebhookEvent($event);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getJsonSchemaForWebhookEvent: ', $e->getMessage(), PHP_EOL;
}
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 ]
getJsonSchemaForWebhookPayload()
Get JSON Schema definition for webhook payload
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_id = 'webhook_id_example'; // string
try {
$result = $apiInstance->getJsonSchemaForWebhookPayload($webhook_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getJsonSchemaForWebhookPayload: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | 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 ]
getPhoneNumberWebhooksPaginated()
getPhoneNumberWebhooksPaginated($phone_id, $page, $size, $sort, $since, $before): MailSlurpModelsPageWebhookProjection
Get paginated webhooks for a phone number
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$phone_id = 'phone_id_example'; // string
$page = 0; // int | Optional page in list pagination
$size = 20; // int | Optional page size in list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
try {
$result = $apiInstance->getPhoneNumberWebhooksPaginated($phone_id, $page, $size, $sort, $since, $before);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getPhoneNumberWebhooksPaginated: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phone_id | string | ||
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 | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
Return type
MailSlurpModelsPageWebhookProjection
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayload()
Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED
as default.
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$event_name = 'event_name_example'; // string
try {
$result = $apiInstance->getTestWebhookPayload($event_name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayload: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
event_name | string | [optional] |
Return type
MailSlurpModelsAbstractWebhookPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadBounce()
Get webhook test payload for bounce
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadBounce();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadBounce: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookBouncePayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadBounceRecipient()
Get webhook test payload for bounce recipient
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadBounceRecipient();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadBounceRecipient: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookBounceRecipientPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadDeliveryStatus()
Get webhook test payload for delivery status event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadDeliveryStatus();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadDeliveryStatus: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookDeliveryStatusPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadEmailOpened()
Get webhook test payload for email opened event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadEmailOpened();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadEmailOpened: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookEmailOpenedPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadEmailRead()
Get webhook test payload for email opened event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadEmailRead();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadEmailRead: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookEmailReadPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadForWebhook()
Get example payload for webhook
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_id = 'webhook_id_example'; // string
try {
$result = $apiInstance->getTestWebhookPayloadForWebhook($webhook_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadForWebhook: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | string |
Return type
MailSlurpModelsAbstractWebhookPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadNewAttachment()
Get webhook test payload for new attachment event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadNewAttachment();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadNewAttachment: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookNewAttachmentPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadNewContact()
Get webhook test payload for new contact event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadNewContact();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadNewContact: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookNewContactPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadNewEmail()
Get webhook test payload for new email event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadNewEmail();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadNewEmail: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookNewEmailPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getTestWebhookPayloadNewSms()
Get webhook test payload for new sms event
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getTestWebhookPayloadNewSms();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getTestWebhookPayloadNewSms: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsWebhookNewSmsPayload
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getWebhook()
Get a webhook
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_id = 'webhook_id_example'; // string
try {
$result = $apiInstance->getWebhook($webhook_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getWebhook: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | 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 ]
getWebhookResult()
Get a webhook result for a webhook
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_result_id = 'webhook_result_id_example'; // string | Webhook Result ID
try {
$result = $apiInstance->getWebhookResult($webhook_result_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getWebhookResult: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_result_id | string | Webhook Result ID |
Return type
MailSlurpModelsWebhookResultDto
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getWebhookResults()
getWebhookResults($webhook_id, $page, $size, $sort, $search_filter, $since, $before, $unseen_only): MailSlurpModelsPageWebhookResult
Get a webhook results for a webhook
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_id = 'webhook_id_example'; // string | ID of webhook to get results for
$page = 0; // int | Optional page in list pagination
$size = 20; // int | Optional page size in list pagination
$sort = 'ASC'; // string | Optional createdAt sort direction ASC or DESC
$search_filter = 'search_filter_example'; // string | Optional search filter
$since = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at after the given timestamp
$before = new DateTime("2013-10-20T19:20:30+01:00"); // DateTime | Filter by created at before the given timestamp
$unseen_only = True; // bool | Filter for unseen exceptions only
try {
$result = $apiInstance->getWebhookResults($webhook_id, $page, $size, $sort, $search_filter, $since, $before, $unseen_only);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getWebhookResults: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | string | 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'] |
search_filter | string | Optional search filter | [optional] |
since | DateTime | Filter by created at after the given timestamp | [optional] |
before | DateTime | Filter by created at before the given timestamp | [optional] |
unseen_only | bool | Filter for unseen exceptions only | [optional] |
Return type
MailSlurpModelsPageWebhookResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getWebhookResultsUnseenErrorCount()
Get count of unseen webhook results with error status
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
try {
$result = $apiInstance->getWebhookResultsUnseenErrorCount();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getWebhookResultsUnseenErrorCount: ', $e->getMessage(), PHP_EOL;
}
Parameters
This endpoint does not need any parameter.
Return type
MailSlurpModelsUnseenErrorCountDto
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
getWebhooks()
Get all webhooks for an Inbox
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$inbox_id = 'inbox_id_example'; // string
try {
$result = $apiInstance->getWebhooks($inbox_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->getWebhooks: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inbox_id | 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 ]
redriveWebhookResult()
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
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_result_id = 'webhook_result_id_example'; // string | Webhook Result ID
try {
$result = $apiInstance->redriveWebhookResult($webhook_result_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->redriveWebhookResult: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_result_id | string | Webhook Result ID |
Return type
MailSlurpModelsWebhookRedriveResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
sendTestData()
Send webhook test data
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_id = 'webhook_id_example'; // string
try {
$result = $apiInstance->sendTestData($webhook_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->sendTestData: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | string |
Return type
MailSlurpModelsWebhookTestResult
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
updateWebhookHeaders()
Update a webhook request headers
Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$webhook_id = 'webhook_id_example'; // string
$webhook_headers = new MailSlurpModelsWebhookHeaders(); // MailSlurpModelsWebhookHeaders
try {
$result = $apiInstance->updateWebhookHeaders($webhook_id, $webhook_headers);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->updateWebhookHeaders: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | string | ||
webhook_headers | MailSlurpModelsWebhookHeaders |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]
verifyWebhookSignature()
verifyWebhookSignature($verify_webhook_signature_options): MailSlurpModelsVerifyWebhookSignatureResults
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
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurpConfiguration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurpApiWebhookControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttpClientInterface`.
// This is optional, `GuzzleHttpClient` will be used as default.
new GuzzleHttpClient(),
$config
);
$verify_webhook_signature_options = new MailSlurpModelsVerifyWebhookSignatureOptions(); // MailSlurpModelsVerifyWebhookSignatureOptions
try {
$result = $apiInstance->verifyWebhookSignature($verify_webhook_signature_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhookControllerApi->verifyWebhookSignature: ', $e->getMessage(), PHP_EOL;
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
verify_webhook_signature_options | MailSlurpModelsVerifyWebhookSignatureOptions |
Return type
MailSlurpModelsVerifyWebhookSignatureResults
Authorization
HTTP request headers
- Content-Type:
application/json
- Accept:
*/*
[Back to top] [Back to API list] [Back to Model list] [Back to ]