All URIs are relative to https://api.mailvio.com/v3/
Method | HTTP request | Description |
---|---|---|
createWebhook | POST /webhooks | Create a webhook |
deleteWebhook | DELETE /webhooks/{webhookId} | Delete a webhook |
getWebhook | GET /webhooks/{webhookId} | Get a webhook details |
getWebhooks | GET /webhooks | Get all webhooks |
updateWebhook | PUT /webhooks/{webhookId} | Update a webhook |
\Swagger\Client\Model\CreateModel createWebhook($create_webhook)
Create a webhook
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
$api_instance = new Swagger\Client\Api\WebhooksApi();
$create_webhook = new \Swagger\Client\Model\CreateWebhook(); // \Swagger\Client\Model\CreateWebhook | Values to create a webhook
try {
$result = $api_instance->createWebhook($create_webhook);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->createWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
create_webhook | \Swagger\Client\Model\CreateWebhook | Values to create a webhook |
\Swagger\Client\Model\CreateModel
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteWebhook($webhook_id)
Delete a webhook
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
$api_instance = new Swagger\Client\Api\WebhooksApi();
$webhook_id = 789; // int | Id of the webhook
try {
$api_instance->deleteWebhook($webhook_id);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->deleteWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | int | Id of the webhook |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\GetWebhook getWebhook($webhook_id)
Get a webhook details
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
$api_instance = new Swagger\Client\Api\WebhooksApi();
$webhook_id = 789; // int | Id of the webhook
try {
$result = $api_instance->getWebhook($webhook_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->getWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | int | Id of the webhook |
\Swagger\Client\Model\GetWebhook
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\GetWebhooks getWebhooks($type)
Get all webhooks
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
$api_instance = new Swagger\Client\Api\WebhooksApi();
$type = "transactional"; // string | Filter on webhook type
try {
$result = $api_instance->getWebhooks($type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->getWebhooks: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
type | string | Filter on webhook type | [optional] [default to transactional] |
\Swagger\Client\Model\GetWebhooks
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateWebhook($webhook_id, $update_webhook)
Update a webhook
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
$api_instance = new Swagger\Client\Api\WebhooksApi();
$webhook_id = 789; // int | Id of the webhook
$update_webhook = new \Swagger\Client\Model\UpdateWebhook(); // \Swagger\Client\Model\UpdateWebhook | Values to update a webhook
try {
$api_instance->updateWebhook($webhook_id, $update_webhook);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->updateWebhook: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
webhook_id | int | Id of the webhook | |
update_webhook | \Swagger\Client\Model\UpdateWebhook | Values to update a webhook |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]