# MailSlurp\DomainControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
addDomainWildcardCatchAll | POST /domains/{id}/wildcard | Add catch all wild card inbox to domain |
createDomain | POST /domains | Create Domain |
deleteDomain | DELETE /domains/{id} | Delete a domain |
getDomain | GET /domains/{id} | Get a domain |
getDomains | GET /domains | Get domains |
updateDomain | PUT /domains/{id} | Update a domain |
# addDomainWildcardCatchAll
\MailSlurp\Models\DomainDto addDomainWildcardCatchAll($id)
Add catch all wild card inbox to domain
Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\DomainControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | id
try {
$result = $apiInstance->addDomainWildcardCatchAll($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainControllerApi->addDomainWildcardCatchAll: ', $e->getMessage(), PHP_EOL;
}
?>
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | string | id |
# Return type
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# createDomain
\MailSlurp\Models\DomainDto createDomain($domain_options)
Create Domain
Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain.
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\DomainControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$domain_options = new \MailSlurp\Models\CreateDomainOptions(); // \MailSlurp\Models\CreateDomainOptions | domainOptions
try {
$result = $apiInstance->createDomain($domain_options);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainControllerApi->createDomain: ', $e->getMessage(), PHP_EOL;
}
?>
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
domain_options | \MailSlurp\Models\CreateDomainOptions | domainOptions |
# Return type
# Authorization
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# deleteDomain
string[] deleteDomain($id)
Delete a domain
Delete a domain. This will disable any existing inboxes that use this domain.
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\DomainControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | id
try {
$result = $apiInstance->deleteDomain($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainControllerApi->deleteDomain: ', $e->getMessage(), PHP_EOL;
}
?>
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | string | id |
# Return type
string[]
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# getDomain
\MailSlurp\Models\DomainDto getDomain($id)
Get a domain
Returns domain verification status and tokens for a given domain
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\DomainControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | id
try {
$result = $apiInstance->getDomain($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainControllerApi->getDomain: ', $e->getMessage(), PHP_EOL;
}
?>
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | string | id |
# Return type
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# getDomains
\MailSlurp\Models\DomainPreview[] getDomains()
Get domains
List all custom domains you have created
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\DomainControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->getDomains();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainControllerApi->getDomains: ', $e->getMessage(), PHP_EOL;
}
?>
# Parameters
This endpoint does not need any parameter.
# Return type
\MailSlurp\Models\DomainPreview[]
# Authorization
# HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
# updateDomain
\MailSlurp\Models\DomainDto updateDomain($id, $update_domain_dto)
Update a domain
Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.
# Example
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: API_KEY
$config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MailSlurp\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
$apiInstance = new MailSlurp\Api\DomainControllerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | id
$update_domain_dto = new \MailSlurp\Models\UpdateDomainOptions(); // \MailSlurp\Models\UpdateDomainOptions | updateDomainDto
try {
$result = $apiInstance->updateDomain($id, $update_domain_dto);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DomainControllerApi->updateDomain: ', $e->getMessage(), PHP_EOL;
}
?>
# Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | string | id | |
update_domain_dto | \MailSlurp\Models\UpdateDomainOptions | updateDomainDto |
# Return type
# Authorization
# HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]