Skip to content

Latest commit

 

History

History
253 lines (174 loc) · 7.7 KB

WebhooksApi.md

File metadata and controls

253 lines (174 loc) · 7.7 KB

Swagger\Client\WebhooksApi

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

createWebhook

\Swagger\Client\Model\CreateModel createWebhook($create_webhook)

Create a webhook

Example

<?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;
}
?>

Parameters

Name Type Description Notes
create_webhook \Swagger\Client\Model\CreateWebhook Values to create a webhook

Return type

\Swagger\Client\Model\CreateModel

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteWebhook

deleteWebhook($webhook_id)

Delete a webhook

Example

<?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;
}
?>

Parameters

Name Type Description Notes
webhook_id int Id of the webhook

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWebhook

\Swagger\Client\Model\GetWebhook getWebhook($webhook_id)

Get a webhook details

Example

<?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;
}
?>

Parameters

Name Type Description Notes
webhook_id int Id of the webhook

Return type

\Swagger\Client\Model\GetWebhook

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWebhooks

\Swagger\Client\Model\GetWebhooks getWebhooks($type)

Get all webhooks

Example

<?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;
}
?>

Parameters

Name Type Description Notes
type string Filter on webhook type [optional] [default to transactional]

Return type

\Swagger\Client\Model\GetWebhooks

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateWebhook

updateWebhook($webhook_id, $update_webhook)

Update a webhook

Example

<?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;
}
?>

Parameters

Name Type Description Notes
webhook_id int Id of the webhook
update_webhook \Swagger\Client\Model\UpdateWebhook Values to update a webhook

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]