Inbound API

Default

domainsBatchPost

Bulk provision domains

Provision up to 1000 domains to use MailChannels Inbound.


/domains/batch

Usage and SDK Samples

curl -X POST -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/batch?subscriptionHandle=&associate-key=&overwrite="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String subscriptionHandle = subscriptionHandle_example; // String | The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.

        InlineObject body = ; // InlineObject | 
        Boolean associateKey = true; // Boolean | If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).

        Boolean overwrite = true; // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.

        try {
            inline_response_200 result = apiInstance.domainsBatchPost(subscriptionHandle, body, associateKey, overwrite);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsBatchPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String subscriptionHandle = subscriptionHandle_example; // String | The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.

        InlineObject body = ; // InlineObject | 
        Boolean associateKey = true; // Boolean | If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).

        Boolean overwrite = true; // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.

        try {
            inline_response_200 result = apiInstance.domainsBatchPost(subscriptionHandle, body, associateKey, overwrite);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsBatchPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *subscriptionHandle = subscriptionHandle_example; // The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.
 (default to null)
InlineObject *body = ; // 
Boolean *associateKey = true; // If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).
 (optional) (default to null)
Boolean *overwrite = true; // If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.
 (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Bulk provision domains
[apiInstance domainsBatchPostWith:subscriptionHandle
    body:body
    associateKey:associateKey
    overwrite:overwrite
              completionHandler: ^(inline_response_200 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var subscriptionHandle = subscriptionHandle_example; // {String} The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.

var body = ; // {InlineObject} 
var opts = {
  'associateKey': true, // {Boolean} If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).

  'overwrite': true // {Boolean} If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsBatchPost(subscriptionHandle, body, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsBatchPostExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var subscriptionHandle = subscriptionHandle_example;  // String | The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.
 (default to null)
            var body = new InlineObject(); // InlineObject | 
            var associateKey = true;  // Boolean | If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).
 (optional)  (default to null)
            var overwrite = true;  // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.
 (optional)  (default to null)

            try
            {
                // Bulk provision domains
                inline_response_200 result = apiInstance.domainsBatchPost(subscriptionHandle, body, associateKey, overwrite);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsBatchPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$subscriptionHandle = subscriptionHandle_example; // String | The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.

$body = ; // InlineObject | 
$associateKey = true; // Boolean | If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).

$overwrite = true; // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.


try {
    $result = $api_instance->domainsBatchPost($subscriptionHandle, $body, $associateKey, $overwrite);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsBatchPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $subscriptionHandle = subscriptionHandle_example; # String | The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.

my $body = WWW::OPenAPIClient::Object::InlineObject->new(); # InlineObject | 
my $associateKey = true; # Boolean | If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).

my $overwrite = true; # Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.


eval { 
    my $result = $api_instance->domainsBatchPost(subscriptionHandle => $subscriptionHandle, body => $body, associateKey => $associateKey, overwrite => $overwrite);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsBatchPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
subscriptionHandle = subscriptionHandle_example # String | The subscription 'handle' that identifies the subscription that domains should be
provisioned against. Subscription handles can be retrieved from the `/subscriptions`
endpoint.
 (default to null)
body =  # InlineObject | 
associateKey = true # Boolean | If present and set to true, the domains will be associated with the api-key in the header.
This means that this api-key must be used for inbound-api actions involving these domains
(for example adding safe/block list entries, etc).
 (optional) (default to null)
overwrite = true # Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for any existing domains will be overwritten with the ones in the request, unless a section is not 
included in the request or there is problem updating a setting in which case the previous settings 
are carried forward.
 (optional) (default to null)

try: 
    # Bulk provision domains
    api_response = api_instance.domains_batch_post(subscriptionHandle, body, associateKey=associateKey, overwrite=overwrite)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsBatchPost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let subscriptionHandle = subscriptionHandle_example; // String
    let body = ; // InlineObject
    let associateKey = true; // Boolean
    let overwrite = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.domainsBatchPost(subscriptionHandle, body, associateKey, overwrite, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Body parameters
Name Description
body *

Query parameters
Name Description
subscriptionHandle*
String
The subscription 'handle' that identifies the subscription that domains should be provisioned against. Subscription handles can be retrieved from the `/subscriptions` endpoint.
Required
associate-key
Boolean
If present and set to true, the domains will be associated with the api-key in the header. This means that this api-key must be used for inbound-api actions involving these domains (for example adding safe/block list entries, etc).
overwrite
Boolean
If present and set to true, the settings (domain settings, downstream addresses, aliases and admins) for any existing domains will be overwritten with the ones in the request, unless a section is not included in the request or there is problem updating a setting in which case the previous settings are carried forward.

Responses


domainsDomainAliasAliasDelete

Remove an alias for the domain


/domains/{domain}/alias/{alias}

Usage and SDK Samples

curl -X DELETE -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | 
        String alias = alias_example; // String | 
        try {
            apiInstance.domainsDomainAliasAliasDelete(domain, alias);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainAliasAliasDelete");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | 
        String alias = alias_example; // String | 
        try {
            apiInstance.domainsDomainAliasAliasDelete(domain, alias);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainAliasAliasDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; //  (default to null)
String *alias = alias_example; //  (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance domainsDomainAliasAliasDeleteWith:domain
    alias:alias
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} 
var alias = alias_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainsDomainAliasAliasDelete(domain, alias, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainAliasAliasDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String |  (default to null)
            var alias = alias_example;  // String |  (default to null)

            try
            {
                apiInstance.domainsDomainAliasAliasDelete(domain, alias);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainAliasAliasDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | 
$alias = alias_example; // String | 

try {
    $api_instance->domainsDomainAliasAliasDelete($domain, $alias);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainAliasAliasDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | 
my $alias = alias_example; # String | 

eval { 
    $api_instance->domainsDomainAliasAliasDelete(domain => $domain, alias => $alias);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainAliasAliasDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String |  (default to null)
alias = alias_example # String |  (default to null)

try: 
    api_instance.domains_domain_alias_alias_delete(domain, alias)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainAliasAliasDelete: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let alias = alias_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainAliasAliasDelete(domain, alias, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
Required
alias*
String
Required

Responses


domainsDomainAliasAliasPost

Create an alias for the domain


/domains/{domain}/alias/{alias}

Usage and SDK Samples

curl -X POST -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/alias/{alias}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | 
        String alias = alias_example; // String | 
        try {
            Alias result = apiInstance.domainsDomainAliasAliasPost(domain, alias);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainAliasAliasPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | 
        String alias = alias_example; // String | 
        try {
            Alias result = apiInstance.domainsDomainAliasAliasPost(domain, alias);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainAliasAliasPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; //  (default to null)
String *alias = alias_example; //  (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance domainsDomainAliasAliasPostWith:domain
    alias:alias
              completionHandler: ^(Alias output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} 
var alias = alias_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsDomainAliasAliasPost(domain, alias, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainAliasAliasPostExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String |  (default to null)
            var alias = alias_example;  // String |  (default to null)

            try
            {
                Alias result = apiInstance.domainsDomainAliasAliasPost(domain, alias);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainAliasAliasPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | 
$alias = alias_example; // String | 

try {
    $result = $api_instance->domainsDomainAliasAliasPost($domain, $alias);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainAliasAliasPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | 
my $alias = alias_example; # String | 

eval { 
    my $result = $api_instance->domainsDomainAliasAliasPost(domain => $domain, alias => $alias);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainAliasAliasPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String |  (default to null)
alias = alias_example # String |  (default to null)

try: 
    api_response = api_instance.domains_domain_alias_alias_post(domain, alias)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainAliasAliasPost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let alias = alias_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainAliasAliasPost(domain, alias, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
Required
alias*
String
Required

Responses


domainsDomainApiKeyPut

Update API key

Update the API key that is associated with a domain.


/domains/{domain}/api-key

Usage and SDK Samples

curl -X PUT -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/api-key"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        InlineObject2 updates = ; // InlineObject2 | 
        try {
            apiInstance.domainsDomainApiKeyPut(domain, updates);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainApiKeyPut");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        InlineObject2 updates = ; // InlineObject2 | 
        try {
            apiInstance.domainsDomainApiKeyPut(domain, updates);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainApiKeyPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name. (default to null)
InlineObject2 *updates = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Update API key
[apiInstance domainsDomainApiKeyPutWith:domain
    updates:updates
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name.
var updates = ; // {InlineObject2} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainsDomainApiKeyPut(domain, updates, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainApiKeyPutExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name. (default to null)
            var updates = new InlineObject2(); // InlineObject2 | 

            try
            {
                // Update API key
                apiInstance.domainsDomainApiKeyPut(domain, updates);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainApiKeyPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name.
$updates = ; // InlineObject2 | 

try {
    $api_instance->domainsDomainApiKeyPut($domain, $updates);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainApiKeyPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name.
my $updates = WWW::OPenAPIClient::Object::InlineObject2->new(); # InlineObject2 | 

eval { 
    $api_instance->domainsDomainApiKeyPut(domain => $domain, updates => $updates);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainApiKeyPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name. (default to null)
updates =  # InlineObject2 | 

try: 
    # Update API key
    api_instance.domains_domain_api_key_put(domain, updates)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainApiKeyPut: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let updates = ; // InlineObject2

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainApiKeyPut(domain, updates, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name.
Required
Body parameters
Name Description
updates *

Responses


domainsDomainDelete

Remove domain

De-provision a domain to cease protecting it with MailChannels Inbound.


/domains/{domain}

Usage and SDK Samples

curl -X DELETE -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name to be removed.
        try {
            apiInstance.domainsDomainDelete(domain);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainDelete");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name to be removed.
        try {
            apiInstance.domainsDomainDelete(domain);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name to be removed. (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Remove domain
[apiInstance domainsDomainDeleteWith:domain
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name to be removed.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainsDomainDelete(domain, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name to be removed. (default to null)

            try
            {
                // Remove domain
                apiInstance.domainsDomainDelete(domain);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name to be removed.

try {
    $api_instance->domainsDomainDelete($domain);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name to be removed.

eval { 
    $api_instance->domainsDomainDelete(domain => $domain);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name to be removed. (default to null)

try: 
    # Remove domain
    api_instance.domains_domain_delete(domain)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainDelete: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainDelete(domain, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name to be removed.
Required

Responses


domainsDomainDownstreamAddressGet

Fetch downstream addresses

Retrieve stored downstream addresses for the domain.


/domains/{domain}/downstream-address

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/downstream-address?limit=&offset="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        Integer limit = 56; // Integer | The number of results to return, defaults to 10.
        Integer offset = 56; // Integer | The offset into the results to return, defaults to 0.
        try {
            inline_response_200_1 result = apiInstance.domainsDomainDownstreamAddressGet(domain, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainDownstreamAddressGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        Integer limit = 56; // Integer | The number of results to return, defaults to 10.
        Integer offset = 56; // Integer | The offset into the results to return, defaults to 0.
        try {
            inline_response_200_1 result = apiInstance.domainsDomainDownstreamAddressGet(domain, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainDownstreamAddressGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name. (default to null)
Integer *limit = 56; // The number of results to return, defaults to 10. (optional) (default to null)
Integer *offset = 56; // The offset into the results to return, defaults to 0. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Fetch downstream addresses
[apiInstance domainsDomainDownstreamAddressGetWith:domain
    limit:limit
    offset:offset
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name.
var opts = {
  'limit': 56, // {Integer} The number of results to return, defaults to 10.
  'offset': 56 // {Integer} The offset into the results to return, defaults to 0.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsDomainDownstreamAddressGet(domain, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainDownstreamAddressGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name. (default to null)
            var limit = 56;  // Integer | The number of results to return, defaults to 10. (optional)  (default to null)
            var offset = 56;  // Integer | The offset into the results to return, defaults to 0. (optional)  (default to null)

            try
            {
                // Fetch downstream addresses
                inline_response_200_1 result = apiInstance.domainsDomainDownstreamAddressGet(domain, limit, offset);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainDownstreamAddressGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name.
$limit = 56; // Integer | The number of results to return, defaults to 10.
$offset = 56; // Integer | The offset into the results to return, defaults to 0.

try {
    $result = $api_instance->domainsDomainDownstreamAddressGet($domain, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainDownstreamAddressGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name.
my $limit = 56; # Integer | The number of results to return, defaults to 10.
my $offset = 56; # Integer | The offset into the results to return, defaults to 0.

eval { 
    my $result = $api_instance->domainsDomainDownstreamAddressGet(domain => $domain, limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainDownstreamAddressGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name. (default to null)
limit = 56 # Integer | The number of results to return, defaults to 10. (optional) (default to null)
offset = 56 # Integer | The offset into the results to return, defaults to 0. (optional) (default to null)

try: 
    # Fetch downstream addresses
    api_response = api_instance.domains_domain_downstream_address_get(domain, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainDownstreamAddressGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let limit = 56; // Integer
    let offset = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainDownstreamAddressGet(domain, limit, offset, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name.
Required
Query parameters
Name Description
limit
Integer
The number of results to return, defaults to 10.
offset
Integer
The offset into the results to return, defaults to 0.

Responses


domainsDomainDownstreamAddressPut

Set downstream address

Sets the list of downstream addreses for the domain. This action deletes any existing downstream address for the domain before creating new ones. If the 'records' parameter is an empty array, all downstream address records will be deleted.


/domains/{domain}/downstream-address

Usage and SDK Samples

curl -X PUT -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/downstream-address"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        InlineObject1 records = ; // InlineObject1 | 
        try {
            inline_response_200_1 result = apiInstance.domainsDomainDownstreamAddressPut(domain, records);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainDownstreamAddressPut");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        InlineObject1 records = ; // InlineObject1 | 
        try {
            inline_response_200_1 result = apiInstance.domainsDomainDownstreamAddressPut(domain, records);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainDownstreamAddressPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name. (default to null)
InlineObject1 *records = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Set downstream address
[apiInstance domainsDomainDownstreamAddressPutWith:domain
    records:records
              completionHandler: ^(inline_response_200_1 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name.
var records = ; // {InlineObject1} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsDomainDownstreamAddressPut(domain, records, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainDownstreamAddressPutExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name. (default to null)
            var records = new InlineObject1(); // InlineObject1 | 

            try
            {
                // Set downstream address
                inline_response_200_1 result = apiInstance.domainsDomainDownstreamAddressPut(domain, records);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainDownstreamAddressPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name.
$records = ; // InlineObject1 | 

try {
    $result = $api_instance->domainsDomainDownstreamAddressPut($domain, $records);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainDownstreamAddressPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name.
my $records = WWW::OPenAPIClient::Object::InlineObject1->new(); # InlineObject1 | 

eval { 
    my $result = $api_instance->domainsDomainDownstreamAddressPut(domain => $domain, records => $records);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainDownstreamAddressPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name. (default to null)
records =  # InlineObject1 | 

try: 
    # Set downstream address
    api_response = api_instance.domains_domain_downstream_address_put(domain, records)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainDownstreamAddressPut: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let records = ; // InlineObject1

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainDownstreamAddressPut(domain, records, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name.
Required
Body parameters
Name Description
records *

Responses


domainsDomainListsListnameDelete

Delete domain list entry

Delete an entry from the blocklist or safelist for a domain.


/domains/{domain}/lists/{listname}

Usage and SDK Samples

curl -X DELETE -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/lists/{listname}?item="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        String listname = listname_example; // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        String item = item_example; // String | 
        try {
            apiInstance.domainsDomainListsListnameDelete(domain, listname, item);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainListsListnameDelete");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        String listname = listname_example; // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        String item = item_example; // String | 
        try {
            apiInstance.domainsDomainListsListnameDelete(domain, listname, item);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainListsListnameDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name. (default to null)
String *listname = listname_example; // The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
String *item = item_example; //  (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Delete domain list entry
[apiInstance domainsDomainListsListnameDeleteWith:domain
    listname:listname
    item:item
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name.
var listname = listname_example; // {String} The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
var item = item_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainsDomainListsListnameDelete(domain, listname, item, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainListsListnameDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name. (default to null)
            var listname = listname_example;  // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
            var item = item_example;  // String |  (default to null)

            try
            {
                // Delete domain list entry
                apiInstance.domainsDomainListsListnameDelete(domain, listname, item);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainListsListnameDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name.
$listname = listname_example; // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
$item = item_example; // String | 

try {
    $api_instance->domainsDomainListsListnameDelete($domain, $listname, $item);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainListsListnameDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name.
my $listname = listname_example; # String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
my $item = item_example; # String | 

eval { 
    $api_instance->domainsDomainListsListnameDelete(domain => $domain, listname => $listname, item => $item);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainListsListnameDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name. (default to null)
listname = listname_example # String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
item = item_example # String |  (default to null)

try: 
    # Delete domain list entry
    api_instance.domains_domain_lists_listname_delete(domain, listname, item)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainListsListnameDelete: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let listname = listname_example; // String
    let item = item_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainListsListnameDelete(domain, listname, item, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name.
Required
listname*
String
The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required
Query parameters
Name Description
item*
String
Required

Responses


domainsDomainListsListnameGet

Get domain list entries

Get all of the blocklist or safelist entries for a domain.


/domains/{domain}/lists/{listname}

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/lists/{listname}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name to be removed.
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        try {
            array[ListItem] result = apiInstance.domainsDomainListsListnameGet(domain, listname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainListsListnameGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name to be removed.
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        try {
            array[ListItem] result = apiInstance.domainsDomainListsListnameGet(domain, listname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainListsListnameGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name to be removed. (default to null)
String *listname = listname_example; // The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get domain list entries
[apiInstance domainsDomainListsListnameGetWith:domain
    listname:listname
              completionHandler: ^(array[ListItem] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name to be removed.
var listname = listname_example; // {String} The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsDomainListsListnameGet(domain, listname, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainListsListnameGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name to be removed. (default to null)
            var listname = listname_example;  // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

            try
            {
                // Get domain list entries
                array[ListItem] result = apiInstance.domainsDomainListsListnameGet(domain, listname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainListsListnameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name to be removed.
$listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

try {
    $result = $api_instance->domainsDomainListsListnameGet($domain, $listname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainListsListnameGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name to be removed.
my $listname = listname_example; # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

eval { 
    my $result = $api_instance->domainsDomainListsListnameGet(domain => $domain, listname => $listname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainListsListnameGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name to be removed. (default to null)
listname = listname_example # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

try: 
    # Get domain list entries
    api_response = api_instance.domains_domain_lists_listname_get(domain, listname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainListsListnameGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let listname = listname_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainListsListnameGet(domain, listname, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name to be removed.
Required
listname*
String
The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required

Responses


domainsDomainListsListnamePost

Add domain list entry

Add an entry to a domain blocklist or safelist.


/domains/{domain}/lists/{listname}

Usage and SDK Samples

curl -X POST -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/lists/{listname}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        ListPost item = ; // ListPost | 
        try {
            ListItem result = apiInstance.domainsDomainListsListnamePost(domain, listname, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainListsListnamePost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        ListPost item = ; // ListPost | 
        try {
            ListItem result = apiInstance.domainsDomainListsListnamePost(domain, listname, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainListsListnamePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name. (default to null)
String *listname = listname_example; // The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
ListPost *item = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Add domain list entry
[apiInstance domainsDomainListsListnamePostWith:domain
    listname:listname
    item:item
              completionHandler: ^(ListItem output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name.
var listname = listname_example; // {String} The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
var item = ; // {ListPost} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsDomainListsListnamePost(domain, listname, item, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainListsListnamePostExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name. (default to null)
            var listname = listname_example;  // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
            var item = new ListPost(); // ListPost | 

            try
            {
                // Add domain list entry
                ListItem result = apiInstance.domainsDomainListsListnamePost(domain, listname, item);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainListsListnamePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name.
$listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
$item = ; // ListPost | 

try {
    $result = $api_instance->domainsDomainListsListnamePost($domain, $listname, $item);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainListsListnamePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name.
my $listname = listname_example; # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
my $item = WWW::OPenAPIClient::Object::ListPost->new(); # ListPost | 

eval { 
    my $result = $api_instance->domainsDomainListsListnamePost(domain => $domain, listname => $listname, item => $item);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainListsListnamePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name. (default to null)
listname = listname_example # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
item =  # ListPost | 

try: 
    # Add domain list entry
    api_response = api_instance.domains_domain_lists_listname_post(domain, listname, item)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainListsListnamePost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let listname = listname_example; // String
    let item = ; // ListPost

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainListsListnamePost(domain, listname, item, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name.
Required
listname*
String
The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required
Body parameters
Name Description
item *

Responses


domainsDomainLoginLinkGet

Create login link

Generate a link that allows a user to log in as a domain administrator.


/domains/{domain}/login-link

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/login-link"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        try {
            LoginLinkResponse result = apiInstance.domainsDomainLoginLinkGet(domain);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainLoginLinkGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        try {
            LoginLinkResponse result = apiInstance.domainsDomainLoginLinkGet(domain);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainLoginLinkGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name. (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Create login link
[apiInstance domainsDomainLoginLinkGetWith:domain
              completionHandler: ^(LoginLinkResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsDomainLoginLinkGet(domain, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainLoginLinkGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name. (default to null)

            try
            {
                // Create login link
                LoginLinkResponse result = apiInstance.domainsDomainLoginLinkGet(domain);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainLoginLinkGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name.

try {
    $result = $api_instance->domainsDomainLoginLinkGet($domain);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainLoginLinkGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name.

eval { 
    my $result = $api_instance->domainsDomainLoginLinkGet(domain => $domain);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainLoginLinkGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name. (default to null)

try: 
    # Create login link
    api_response = api_instance.domains_domain_login_link_get(domain)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainLoginLinkGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainLoginLinkGet(domain, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name.
Required

Responses


domainsDomainSettingsPut

Update the abuse policy settings (these settings determine how spam messages are handled), downstream addresses, admins and aliases for a domain.


/domains/{domain}/settings

Usage and SDK Samples

curl -X PUT -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains/{domain}/settings"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        CompleteDomainSettings settings = ; // CompleteDomainSettings | 
        try {
            apiInstance.domainsDomainSettingsPut(domain, settings);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainSettingsPut");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String domain = domain_example; // String | The domain name.
        CompleteDomainSettings settings = ; // CompleteDomainSettings | 
        try {
            apiInstance.domainsDomainSettingsPut(domain, settings);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsDomainSettingsPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *domain = domain_example; // The domain name. (default to null)
CompleteDomainSettings *settings = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance domainsDomainSettingsPutWith:domain
    settings:settings
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = domain_example; // {String} The domain name.
var settings = ; // {CompleteDomainSettings} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.domainsDomainSettingsPut(domain, settings, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsDomainSettingsPutExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = domain_example;  // String | The domain name. (default to null)
            var settings = new CompleteDomainSettings(); // CompleteDomainSettings | 

            try
            {
                apiInstance.domainsDomainSettingsPut(domain, settings);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsDomainSettingsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = domain_example; // String | The domain name.
$settings = ; // CompleteDomainSettings | 

try {
    $api_instance->domainsDomainSettingsPut($domain, $settings);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsDomainSettingsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = domain_example; # String | The domain name.
my $settings = WWW::OPenAPIClient::Object::CompleteDomainSettings->new(); # CompleteDomainSettings | 

eval { 
    $api_instance->domainsDomainSettingsPut(domain => $domain, settings => $settings);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsDomainSettingsPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain = domain_example # String | The domain name. (default to null)
settings =  # CompleteDomainSettings | 

try: 
    api_instance.domains_domain_settings_put(domain, settings)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsDomainSettingsPut: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = domain_example; // String
    let settings = ; // CompleteDomainSettings

    let mut context = DefaultApi::Context::default();
    let result = client.domainsDomainSettingsPut(domain, settings, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
domain*
String (hostname)
The domain name.
Required
Body parameters
Name Description
settings *

The abuse policy settings, downstream addresses, admins and aliases for the domains.

Responses


domainsGet

List domains

Fetch a list of all domains associated with this API key.


/domains

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains?domains=&limit=&offset="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        array[String] domains = ; // array[String] | A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.

        Integer limit = 56; // Integer | The maximum number of domains included in the response.
If not specified, defaults to 10.

        Integer offset = 56; // Integer | Offset into the list of domains to return. If not specified, defaults to 0.
        try {
            GetDomainsResponse result = apiInstance.domainsGet(domains, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        array[String] domains = ; // array[String] | A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.

        Integer limit = 56; // Integer | The maximum number of domains included in the response.
If not specified, defaults to 10.

        Integer offset = 56; // Integer | Offset into the list of domains to return. If not specified, defaults to 0.
        try {
            GetDomainsResponse result = apiInstance.domainsGet(domains, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

array[String] *domains = ; // A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.
 (optional) (default to null)
Integer *limit = 56; // The maximum number of domains included in the response.
If not specified, defaults to 10.
 (optional) (default to null)
Integer *offset = 56; // Offset into the list of domains to return. If not specified, defaults to 0. (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// List domains
[apiInstance domainsGetWith:domains
    limit:limit
    offset:offset
              completionHandler: ^(GetDomainsResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var opts = {
  'domains': , // {array[String]} A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.

  'limit': 56, // {Integer} The maximum number of domains included in the response.
If not specified, defaults to 10.

  'offset': 56 // {Integer} Offset into the list of domains to return. If not specified, defaults to 0.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsGet(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domains = new array[String](); // array[String] | A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.
 (optional)  (default to null)
            var limit = 56;  // Integer | The maximum number of domains included in the response.
If not specified, defaults to 10.
 (optional)  (default to null)
            var offset = 56;  // Integer | Offset into the list of domains to return. If not specified, defaults to 0. (optional)  (default to null)

            try
            {
                // List domains
                GetDomainsResponse result = apiInstance.domainsGet(domains, limit, offset);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domains = ; // array[String] | A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.

$limit = 56; // Integer | The maximum number of domains included in the response.
If not specified, defaults to 10.

$offset = 56; // Integer | Offset into the list of domains to return. If not specified, defaults to 0.

try {
    $result = $api_instance->domainsGet($domains, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domains = []; # array[String] | A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.

my $limit = 56; # Integer | The maximum number of domains included in the response.
If not specified, defaults to 10.

my $offset = 56; # Integer | Offset into the list of domains to return. If not specified, defaults to 0.

eval { 
    my $result = $api_instance->domainsGet(domains => $domains, limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domains =  # array[String] | A list of domains to fetch. If this parameter is present, only domains whose
name matches an item in this list are returned.
 (optional) (default to null)
limit = 56 # Integer | The maximum number of domains included in the response.
If not specified, defaults to 10.
 (optional) (default to null)
offset = 56 # Integer | Offset into the list of domains to return. If not specified, defaults to 0. (optional) (default to null)

try: 
    # List domains
    api_response = api_instance.domains_get(domains=domains, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domains = ; // array[String]
    let limit = 56; // Integer
    let offset = 56; // Integer

    let mut context = DefaultApi::Context::default();
    let result = client.domainsGet(domains, limit, offset, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Query parameters
Name Description
domains
array[String] (hostname)
A list of domains to fetch. If this parameter is present, only domains whose name matches an item in this list are returned.
limit
Integer (int32)
The maximum number of domains included in the response. If not specified, defaults to 10.
offset
Integer (int32)
Offset into the list of domains to return. If not specified, defaults to 0.

Responses


domainsPost

Provision domain

Provision a single domain to use MailChannels Inbound.


/domains

Usage and SDK Samples

curl -X POST -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/domains?associate-key=&overwrite="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        Domain domain = ; // Domain | 
        Boolean associateKey = true; // Boolean | If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).

        Boolean overwrite = true; // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 

        try {
            Domain result = apiInstance.domainsPost(domain, associateKey, overwrite);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Domain domain = ; // Domain | 
        Boolean associateKey = true; // Boolean | If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).

        Boolean overwrite = true; // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 

        try {
            Domain result = apiInstance.domainsPost(domain, associateKey, overwrite);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#domainsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

Domain *domain = ; // 
Boolean *associateKey = true; // If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).
 (optional) (default to null)
Boolean *overwrite = true; // If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 
 (optional) (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Provision domain
[apiInstance domainsPostWith:domain
    associateKey:associateKey
    overwrite:overwrite
              completionHandler: ^(Domain output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var domain = ; // {Domain} 
var opts = {
  'associateKey': true, // {Boolean} If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).

  'overwrite': true // {Boolean} If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.domainsPost(domain, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class domainsPostExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var domain = new Domain(); // Domain | 
            var associateKey = true;  // Boolean | If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).
 (optional)  (default to null)
            var overwrite = true;  // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 
 (optional)  (default to null)

            try
            {
                // Provision domain
                Domain result = apiInstance.domainsPost(domain, associateKey, overwrite);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.domainsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$domain = ; // Domain | 
$associateKey = true; // Boolean | If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).

$overwrite = true; // Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 


try {
    $result = $api_instance->domainsPost($domain, $associateKey, $overwrite);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->domainsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $domain = WWW::OPenAPIClient::Object::Domain->new(); # Domain | 
my $associateKey = true; # Boolean | If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).

my $overwrite = true; # Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 


eval { 
    my $result = $api_instance->domainsPost(domain => $domain, associateKey => $associateKey, overwrite => $overwrite);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->domainsPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
domain =  # Domain | 
associateKey = true # Boolean | If present and set to true, the domain will be associated with the api-key that created it.
This means that this api-key must be used for inbound-api actions involving this domain (for
example adding safe/block list entries, etc).
 (optional) (default to null)
overwrite = true # Boolean | If present and set to true, the settings (domain settings, downstream addresses, aliases and admins)
for the domain will be overwritten with the ones in the request if the domain already exists, unless
a section is not included in the request or there is problem updating a setting in which case the 
previous settings are carried forward. 
 (optional) (default to null)

try: 
    # Provision domain
    api_response = api_instance.domains_post(domain, associateKey=associateKey, overwrite=overwrite)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->domainsPost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let domain = ; // Domain
    let associateKey = true; // Boolean
    let overwrite = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.domainsPost(domain, associateKey, overwrite, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Body parameters
Name Description
domain *

Query parameters
Name Description
associate-key
Boolean
If present and set to true, the domain will be associated with the api-key that created it. This means that this api-key must be used for inbound-api actions involving this domain (for example adding safe/block list entries, etc).
overwrite
Boolean
If present and set to true, the settings (domain settings, downstream addresses, aliases and admins) for the domain will be overwritten with the ones in the request if the domain already exists, unless a section is not included in the request or there is problem updating a setting in which case the previous settings are carried forward.

Responses


listsListnameDelete

Delete item from customer list


/lists/{listname}

Usage and SDK Samples

curl -X DELETE -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/lists/{listname}?item="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String listname = listname_example; // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        String item = item_example; // String | 
        try {
            apiInstance.listsListnameDelete(listname, item);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listsListnameDelete");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String listname = listname_example; // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        String item = item_example; // String | 
        try {
            apiInstance.listsListnameDelete(listname, item);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listsListnameDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *listname = listname_example; // The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
String *item = item_example; //  (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Delete item from customer list
[apiInstance listsListnameDeleteWith:listname
    item:item
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var listname = listname_example; // {String} The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
var item = item_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.listsListnameDelete(listname, item, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listsListnameDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var listname = listname_example;  // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
            var item = item_example;  // String |  (default to null)

            try
            {
                // Delete item from customer list
                apiInstance.listsListnameDelete(listname, item);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.listsListnameDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$listname = listname_example; // String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
$item = item_example; // String | 

try {
    $api_instance->listsListnameDelete($listname, $item);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->listsListnameDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $listname = listname_example; # String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
my $item = item_example; # String | 

eval { 
    $api_instance->listsListnameDelete(listname => $listname, item => $item);
};
if ($@) {
    warn "Exception when calling DefaultApi->listsListnameDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
listname = listname_example # String | The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
item = item_example # String |  (default to null)

try: 
    # Delete item from customer list
    api_instance.lists_listname_delete(listname, item)
except ApiException as e:
    print("Exception when calling DefaultApi->listsListnameDelete: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let listname = listname_example; // String
    let item = item_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.listsListnameDelete(listname, item, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
listname*
String
The name of the list to delete an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required
Query parameters
Name Description
item*
String
Required

Responses


listsListnameGet

Get customer list entries


/lists/{listname}

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/lists/{listname}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String listname = listname_example; // String | The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        try {
            array[ListItem] result = apiInstance.listsListnameGet(listname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listsListnameGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String listname = listname_example; // String | The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        try {
            array[ListItem] result = apiInstance.listsListnameGet(listname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listsListnameGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *listname = listname_example; // The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get customer list entries
[apiInstance listsListnameGetWith:listname
              completionHandler: ^(array[ListItem] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var listname = listname_example; // {String} The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listsListnameGet(listname, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listsListnameGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var listname = listname_example;  // String | The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

            try
            {
                // Get customer list entries
                array[ListItem] result = apiInstance.listsListnameGet(listname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.listsListnameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$listname = listname_example; // String | The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

try {
    $result = $api_instance->listsListnameGet($listname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->listsListnameGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $listname = listname_example; # String | The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

eval { 
    my $result = $api_instance->listsListnameGet(listname => $listname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->listsListnameGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
listname = listname_example # String | The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

try: 
    # Get customer list entries
    api_response = api_instance.lists_listname_get(listname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->listsListnameGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let listname = listname_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.listsListnameGet(listname, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
listname*
String
The name of the list to fetch entries for. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required

Responses


listsListnamePost

Add item to customer list


/lists/{listname}

Usage and SDK Samples

curl -X POST -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/lists/{listname}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        ListPost item = ; // ListPost | 
        try {
            ListItem result = apiInstance.listsListnamePost(listname, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listsListnamePost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        ListPost item = ; // ListPost | 
        try {
            ListItem result = apiInstance.listsListnamePost(listname, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#listsListnamePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *listname = listname_example; // The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
ListPost *item = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Add item to customer list
[apiInstance listsListnamePostWith:listname
    item:item
              completionHandler: ^(ListItem output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var listname = listname_example; // {String} The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
var item = ; // {ListPost} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listsListnamePost(listname, item, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listsListnamePostExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var listname = listname_example;  // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
            var item = new ListPost(); // ListPost | 

            try
            {
                // Add item to customer list
                ListItem result = apiInstance.listsListnamePost(listname, item);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.listsListnamePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
$item = ; // ListPost | 

try {
    $result = $api_instance->listsListnamePost($listname, $item);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->listsListnamePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $listname = listname_example; # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
my $item = WWW::OPenAPIClient::Object::ListPost->new(); # ListPost | 

eval { 
    my $result = $api_instance->listsListnamePost(listname => $listname, item => $item);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->listsListnamePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
listname = listname_example # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
item =  # ListPost | 

try: 
    # Add item to customer list
    api_response = api_instance.lists_listname_post(listname, item)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->listsListnamePost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let listname = listname_example; // String
    let item = ; // ListPost

    let mut context = DefaultApi::Context::default();
    let result = client.listsListnamePost(listname, item, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
listname*
String
The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required
Body parameters
Name Description
item *

Responses


reportPost

Submit a false negative or false positive report


/report

Usage and SDK Samples

curl -X POST -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/report?report_type="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String reportType = reportType_example; // String | 
        Report reportRequestBody = ; // Report | 
        try {
            apiInstance.reportPost(reportType, reportRequestBody);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#reportPost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String reportType = reportType_example; // String | 
        Report reportRequestBody = ; // Report | 
        try {
            apiInstance.reportPost(reportType, reportRequestBody);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#reportPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *reportType = reportType_example; //  (default to null)
Report *reportRequestBody = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Submit a false negative or false positive report
[apiInstance reportPostWith:reportType
    reportRequestBody:reportRequestBody
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var reportType = reportType_example; // {String} 
var reportRequestBody = ; // {Report} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.reportPost(reportType, reportRequestBody, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class reportPostExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var reportType = reportType_example;  // String |  (default to null)
            var reportRequestBody = new Report(); // Report | 

            try
            {
                // Submit a false negative or false positive report
                apiInstance.reportPost(reportType, reportRequestBody);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.reportPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$reportType = reportType_example; // String | 
$reportRequestBody = ; // Report | 

try {
    $api_instance->reportPost($reportType, $reportRequestBody);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->reportPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $reportType = reportType_example; # String | 
my $reportRequestBody = WWW::OPenAPIClient::Object::Report->new(); # Report | 

eval { 
    $api_instance->reportPost(reportType => $reportType, reportRequestBody => $reportRequestBody);
};
if ($@) {
    warn "Exception when calling DefaultApi->reportPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
reportType = reportType_example # String |  (default to null)
reportRequestBody =  # Report | 

try: 
    # Submit a false negative or false positive report
    api_instance.report_post(reportType, reportRequestBody)
except ApiException as e:
    print("Exception when calling DefaultApi->reportPost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let reportType = reportType_example; // String
    let reportRequestBody = ; // Report

    let mut context = DefaultApi::Context::default();
    let result = client.reportPost(reportType, reportRequestBody, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Body parameters
Name Description
reportRequestBody *

Query parameters
Name Description
report_type*
String
Required

Responses


statusGet

Retrieve the condition of the service


/status

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/status"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.statusGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#statusGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.statusGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#statusGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];


DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Retrieve the condition of the service
[apiInstance statusGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.statusGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class statusGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();

            try
            {
                // Retrieve the condition of the service
                apiInstance.statusGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.statusGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $api_instance->statusGet();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->statusGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval { 
    $api_instance->statusGet();
};
if ($@) {
    warn "Exception when calling DefaultApi->statusGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()

try: 
    # Retrieve the condition of the service
    api_instance.status_get()
except ApiException as e:
    print("Exception when calling DefaultApi->statusGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.statusGet(&context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Responses


subscriptionsGet

Get a list of your subscriptions to MailChannels Inbound


/subscriptions

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/subscriptions"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        try {
            array[Subscription] result = apiInstance.subscriptionsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#subscriptionsGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            array[Subscription] result = apiInstance.subscriptionsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#subscriptionsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];


DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get a list of your subscriptions to MailChannels Inbound
[apiInstance subscriptionsGetWithCompletionHandler: 
              ^(array[Subscription] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.subscriptionsGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class subscriptionsGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();

            try
            {
                // Get a list of your subscriptions to MailChannels Inbound
                array[Subscription] result = apiInstance.subscriptionsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.subscriptionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $result = $api_instance->subscriptionsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->subscriptionsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval { 
    my $result = $api_instance->subscriptionsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->subscriptionsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()

try: 
    # Get a list of your subscriptions to MailChannels Inbound
    api_response = api_instance.subscriptions_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->subscriptionsGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.subscriptionsGet(&context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Responses


usersEmailListsListnameDelete

Delete item from recipient list


/users/{email}/lists/{listname}

Usage and SDK Samples

curl -X DELETE -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/users/{email}/lists/{listname}?item="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | The email address of the recipient whose list will be modified.
        String listname = listname_example; // String | The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        String item = item_example; // String | The list entry which should be removed.
        try {
            apiInstance.usersEmailListsListnameDelete(email, listname, item);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersEmailListsListnameDelete");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | The email address of the recipient whose list will be modified.
        String listname = listname_example; // String | The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        String item = item_example; // String | The list entry which should be removed.
        try {
            apiInstance.usersEmailListsListnameDelete(email, listname, item);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersEmailListsListnameDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *email = email_example; // The email address of the recipient whose list will be modified. (default to null)
String *listname = listname_example; // The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
String *item = item_example; // The list entry which should be removed. (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Delete item from recipient list
[apiInstance usersEmailListsListnameDeleteWith:email
    listname:listname
    item:item
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var email = email_example; // {String} The email address of the recipient whose list will be modified.
var listname = listname_example; // {String} The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
var item = item_example; // {String} The list entry which should be removed.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersEmailListsListnameDelete(email, listname, item, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class usersEmailListsListnameDeleteExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var email = email_example;  // String | The email address of the recipient whose list will be modified. (default to null)
            var listname = listname_example;  // String | The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
            var item = item_example;  // String | The list entry which should be removed. (default to null)

            try
            {
                // Delete item from recipient list
                apiInstance.usersEmailListsListnameDelete(email, listname, item);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.usersEmailListsListnameDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$email = email_example; // String | The email address of the recipient whose list will be modified.
$listname = listname_example; // String | The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
$item = item_example; // String | The list entry which should be removed.

try {
    $api_instance->usersEmailListsListnameDelete($email, $listname, $item);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->usersEmailListsListnameDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $email = email_example; # String | The email address of the recipient whose list will be modified.
my $listname = listname_example; # String | The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
my $item = item_example; # String | The list entry which should be removed.

eval { 
    $api_instance->usersEmailListsListnameDelete(email => $email, listname => $listname, item => $item);
};
if ($@) {
    warn "Exception when calling DefaultApi->usersEmailListsListnameDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
email = email_example # String | The email address of the recipient whose list will be modified. (default to null)
listname = listname_example # String | The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
item = item_example # String | The list entry which should be removed. (default to null)

try: 
    # Delete item from recipient list
    api_instance.users_email_lists_listname_delete(email, listname, item)
except ApiException as e:
    print("Exception when calling DefaultApi->usersEmailListsListnameDelete: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let email = email_example; // String
    let listname = listname_example; // String
    let item = item_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.usersEmailListsListnameDelete(email, listname, item, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
email*
String
The email address of the recipient whose list will be modified.
Required
listname*
String
The name of the list to remove an entry from. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required
Query parameters
Name Description
item*
String
The list entry which should be removed.
Required

Responses


usersEmailListsListnameGet

Get recipient list entries


/users/{email}/lists/{listname}

Usage and SDK Samples

curl -X GET -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/users/{email}/lists/{listname}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | The email address of the recipient whose list will be fetched.
        String listname = listname_example; // String | The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        try {
            array[ListItem] result = apiInstance.usersEmailListsListnameGet(email, listname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersEmailListsListnameGet");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | The email address of the recipient whose list will be fetched.
        String listname = listname_example; // String | The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        try {
            array[ListItem] result = apiInstance.usersEmailListsListnameGet(email, listname);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersEmailListsListnameGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *email = email_example; // The email address of the recipient whose list will be fetched. (default to null)
String *listname = listname_example; // The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get recipient list entries
[apiInstance usersEmailListsListnameGetWith:email
    listname:listname
              completionHandler: ^(array[ListItem] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var email = email_example; // {String} The email address of the recipient whose list will be fetched.
var listname = listname_example; // {String} The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersEmailListsListnameGet(email, listname, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class usersEmailListsListnameGetExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var email = email_example;  // String | The email address of the recipient whose list will be fetched. (default to null)
            var listname = listname_example;  // String | The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

            try
            {
                // Get recipient list entries
                array[ListItem] result = apiInstance.usersEmailListsListnameGet(email, listname);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.usersEmailListsListnameGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$email = email_example; // String | The email address of the recipient whose list will be fetched.
$listname = listname_example; // String | The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

try {
    $result = $api_instance->usersEmailListsListnameGet($email, $listname);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->usersEmailListsListnameGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $email = email_example; # String | The email address of the recipient whose list will be fetched.
my $listname = listname_example; # String | The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated

eval { 
    my $result = $api_instance->usersEmailListsListnameGet(email => $email, listname => $listname);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->usersEmailListsListnameGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
email = email_example # String | The email address of the recipient whose list will be fetched. (default to null)
listname = listname_example # String | The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)

try: 
    # Get recipient list entries
    api_response = api_instance.users_email_lists_listname_get(email, listname)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->usersEmailListsListnameGet: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let email = email_example; // String
    let listname = listname_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.usersEmailListsListnameGet(email, listname, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
email*
String
The email address of the recipient whose list will be fetched.
Required
listname*
String
The name of the list to fetch. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required

Responses


usersEmailListsListnamePost

Add item to recipient list


/users/{email}/lists/{listname}

Usage and SDK Samples

curl -X POST -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/users/{email}/lists/{listname}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | The email address of the recipient whose list will be modified.
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        ListPost item = ; // ListPost | 
        try {
            ListItem result = apiInstance.usersEmailListsListnamePost(email, listname, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersEmailListsListnamePost");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | The email address of the recipient whose list will be modified.
        String listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
        ListPost item = ; // ListPost | 
        try {
            ListItem result = apiInstance.usersEmailListsListnamePost(email, listname, item);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersEmailListsListnamePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *email = email_example; // The email address of the recipient whose list will be modified. (default to null)
String *listname = listname_example; // The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
ListPost *item = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Add item to recipient list
[apiInstance usersEmailListsListnamePostWith:email
    listname:listname
    item:item
              completionHandler: ^(ListItem output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var email = email_example; // {String} The email address of the recipient whose list will be modified.
var listname = listname_example; // {String} The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
var item = ; // {ListPost} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.usersEmailListsListnamePost(email, listname, item, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class usersEmailListsListnamePostExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var email = email_example;  // String | The email address of the recipient whose list will be modified. (default to null)
            var listname = listname_example;  // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
            var item = new ListPost(); // ListPost | 

            try
            {
                // Add item to recipient list
                ListItem result = apiInstance.usersEmailListsListnamePost(email, listname, item);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.usersEmailListsListnamePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$email = email_example; // String | The email address of the recipient whose list will be modified.
$listname = listname_example; // String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
$item = ; // ListPost | 

try {
    $result = $api_instance->usersEmailListsListnamePost($email, $listname, $item);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->usersEmailListsListnamePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $email = email_example; # String | The email address of the recipient whose list will be modified.
my $listname = listname_example; # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
my $item = WWW::OPenAPIClient::Object::ListPost->new(); # ListPost | 

eval { 
    my $result = $api_instance->usersEmailListsListnamePost(email => $email, listname => $listname, item => $item);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->usersEmailListsListnamePost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
email = email_example # String | The email address of the recipient whose list will be modified. (default to null)
listname = listname_example # String | The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated (default to null)
item =  # ListPost | 

try: 
    # Add item to recipient list
    api_response = api_instance.users_email_lists_listname_post(email, listname, item)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->usersEmailListsListnamePost: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let email = email_example; // String
    let listname = listname_example; // String
    let item = ; // ListPost

    let mut context = DefaultApi::Context::default();
    let result = client.usersEmailListsListnamePost(email, listname, item, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Path parameters
Name Description
email*
String
The email address of the recipient whose list will be modified.
Required
listname*
String
The name of the list to add an entry to. One of 'safelist' or 'blocklist'. 'whitelist' and 'blacklist' are deprecated
Required
Body parameters
Name Description
item *

Responses


usersPut

Create a recipient


/users

Usage and SDK Samples

curl -X PUT -H "X-API-Key: [[apiKey]]" "https://api.mailchannels.net/inbound/v1/users?email_address=&admin=&filter="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: APIKeyHeader
        ApiKeyAuth APIKeyHeader = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyHeader");
        APIKeyHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //APIKeyHeader.setApiKeyPrefix("Token");

        DefaultApi apiInstance = new DefaultApi();
        String emailAddress = emailAddress_example; // String | The email address of the user to add
        Boolean admin = true; // Boolean | Flag to indicate if the user is a domain admin or a regular user
        String filter = filter_example; // String | Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.

        InlineObject3 data = ; // InlineObject3 | 
        try {
            apiInstance.usersPut(emailAddress, admin, filter, data);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersPut");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String emailAddress = emailAddress_example; // String | The email address of the user to add
        Boolean admin = true; // Boolean | Flag to indicate if the user is a domain admin or a regular user
        String filter = filter_example; // String | Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.

        InlineObject3 data = ; // InlineObject3 | 
        try {
            apiInstance.usersPut(emailAddress, admin, filter, data);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#usersPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: APIKeyHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-Key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-Key"];

String *emailAddress = emailAddress_example; // The email address of the user to add (default to null)
Boolean *admin = true; // Flag to indicate if the user is a domain admin or a regular user (default to null)
String *filter = filter_example; // Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.
 (optional) (default to null)
InlineObject3 *data = ; //  (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Create a recipient
[apiInstance usersPutWith:emailAddress
    admin:admin
    filter:filter
    data:data
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var InboundApi = require('inbound_api');
var defaultClient = InboundApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-API-Key'] = "Token"

var api = new InboundApi.DefaultApi()
var emailAddress = emailAddress_example; // {String} The email address of the user to add
var admin = true; // {Boolean} Flag to indicate if the user is a domain admin or a regular user
var opts = {
  'filter': filter_example, // {String} Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.

  'data':  // {InlineObject3} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.usersPut(emailAddress, admin, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class usersPutExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("X-API-Key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-Key", "Bearer");

            var apiInstance = new DefaultApi();
            var emailAddress = emailAddress_example;  // String | The email address of the user to add (default to null)
            var admin = true;  // Boolean | Flag to indicate if the user is a domain admin or a regular user (default to null)
            var filter = filter_example;  // String | Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.
 (optional)  (default to null)
            var data = new InlineObject3(); // InlineObject3 |  (optional) 

            try
            {
                // Create a recipient
                apiInstance.usersPut(emailAddress, admin, filter, data);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.usersPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: APIKeyHeader
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$emailAddress = emailAddress_example; // String | The email address of the user to add
$admin = true; // Boolean | Flag to indicate if the user is a domain admin or a regular user
$filter = filter_example; // String | Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.

$data = ; // InlineObject3 | 

try {
    $api_instance->usersPut($emailAddress, $admin, $filter, $data);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->usersPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: APIKeyHeader
$WWW::OPenAPIClient::Configuration::api_key->{'X-API-Key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-API-Key'} = "Bearer";

my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $emailAddress = emailAddress_example; # String | The email address of the user to add
my $admin = true; # Boolean | Flag to indicate if the user is a domain admin or a regular user
my $filter = filter_example; # String | Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.

my $data = WWW::OPenAPIClient::Object::InlineObject3->new(); # InlineObject3 | 

eval { 
    $api_instance->usersPut(emailAddress => $emailAddress, admin => $admin, filter => $filter, data => $data);
};
if ($@) {
    warn "Exception when calling DefaultApi->usersPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: APIKeyHeader
openapi_client.configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = openapi_client.DefaultApi()
emailAddress = emailAddress_example # String | The email address of the user to add (default to null)
admin = true # Boolean | Flag to indicate if the user is a domain admin or a regular user (default to null)
filter = filter_example # String | Whether or not to filter mail for this recipient. There are three valid values.

* true - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, return an error.
* false - Filtering policy will not be applied to messages intended for this recipient.
* compute (default) - Filtering policy will be applied to messages intended for this recipient.
 If this would exceed the protected-addresses limit, filtering policy will
 not be applied, and no error will be returned.
 (optional) (default to null)
data =  # InlineObject3 |  (optional)

try: 
    # Create a recipient
    api_instance.users_put(emailAddress, admin, filter=filter, data=data)
except ApiException as e:
    print("Exception when calling DefaultApi->usersPut: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let emailAddress = emailAddress_example; // String
    let admin = true; // Boolean
    let filter = filter_example; // String
    let data = ; // InlineObject3

    let mut context = DefaultApi::Context::default();
    let result = client.usersPut(emailAddress, admin, filter, data, &context).wait();
    println!("{:?}", result);

}

Scopes

Parameters

Body parameters
Name Description
data

Query parameters
Name Description
email_address*
String
The email address of the user to add
Required
admin*
Boolean
Flag to indicate if the user is a domain admin or a regular user
Required
filter
String
Whether or not to filter mail for this recipient. There are three valid values. * true - Filtering policy will be applied to messages intended for this recipient. If this would exceed the protected-addresses limit, return an error. * false - Filtering policy will not be applied to messages intended for this recipient. * compute (default) - Filtering policy will be applied to messages intended for this recipient. If this would exceed the protected-addresses limit, filtering policy will not be applied, and no error will be returned.

Responses