Skip to content

Latest commit

 

History

History
318 lines (213 loc) · 8.02 KB

InboundRouteApi.md

File metadata and controls

318 lines (213 loc) · 8.02 KB

ElasticEmail.InboundRouteApi

All URIs are relative to https://api.elasticemail.com/v4

Method HTTP request Description
inboundrouteByIdDelete DELETE /inboundroute/{id} Delete Route
inboundrouteByIdGet GET /inboundroute/{id} Get Route
inboundrouteByIdPut PUT /inboundroute/{id} Update Route
inboundrouteGet GET /inboundroute Get Routes
inboundrouteOrderPut PUT /inboundroute/order Update Sorting
inboundroutePost POST /inboundroute Create Route

inboundrouteByIdDelete

inboundrouteByIdDelete(id)

Delete Route

Deletes the Inbound Route. Required Access Level: ModifySettings

Example

import ElasticEmail from '@elasticemail/elasticemail-client';
let defaultClient = ElasticEmail.ApiClient.instance;
// Configure API key authorization: apikey
let apikey = defaultClient.authentications['apikey'];
apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix = 'Token';

let apiInstance = new ElasticEmail.InboundRouteApi();
let id = "id_example"; // String | 
apiInstance.inboundrouteByIdDelete(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
id String

Return type

null (empty response body)

Authorization

apikey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

inboundrouteByIdGet

InboundRoute inboundrouteByIdGet(id)

Get Route

Load an Inbound Route. Required Access Level: ViewSettings

Example

import ElasticEmail from '@elasticemail/elasticemail-client';
let defaultClient = ElasticEmail.ApiClient.instance;
// Configure API key authorization: apikey
let apikey = defaultClient.authentications['apikey'];
apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix = 'Token';

let apiInstance = new ElasticEmail.InboundRouteApi();
let id = "123456"; // String | ID number of your attachment
apiInstance.inboundrouteByIdGet(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String ID number of your attachment

Return type

InboundRoute

Authorization

apikey

HTTP request headers

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

inboundrouteByIdPut

InboundRoute inboundrouteByIdPut(id, inboundPayload)

Update Route

Update the Inbound Route. Required Access Level: ModifySettings

Example

import ElasticEmail from '@elasticemail/elasticemail-client';
let defaultClient = ElasticEmail.ApiClient.instance;
// Configure API key authorization: apikey
let apikey = defaultClient.authentications['apikey'];
apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix = 'Token';

let apiInstance = new ElasticEmail.InboundRouteApi();
let id = "id_example"; // String | 
let inboundPayload = new ElasticEmail.InboundPayload(); // InboundPayload | 
apiInstance.inboundrouteByIdPut(id, inboundPayload, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String
inboundPayload InboundPayload

Return type

InboundRoute

Authorization

apikey

HTTP request headers

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

inboundrouteGet

[InboundRoute] inboundrouteGet()

Get Routes

Get all your Inbound Routes. Required Access Level: ViewSettings

Example

import ElasticEmail from '@elasticemail/elasticemail-client';
let defaultClient = ElasticEmail.ApiClient.instance;
// Configure API key authorization: apikey
let apikey = defaultClient.authentications['apikey'];
apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix = 'Token';

let apiInstance = new ElasticEmail.InboundRouteApi();
apiInstance.inboundrouteGet((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

[InboundRoute]

Authorization

apikey

HTTP request headers

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

inboundrouteOrderPut

[InboundRoute] inboundrouteOrderPut(sortOrderItem)

Update Sorting

Required Access Level: ViewSettings

Example

import ElasticEmail from '@elasticemail/elasticemail-client';
let defaultClient = ElasticEmail.ApiClient.instance;
// Configure API key authorization: apikey
let apikey = defaultClient.authentications['apikey'];
apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix = 'Token';

let apiInstance = new ElasticEmail.InboundRouteApi();
let sortOrderItem = [new ElasticEmail.SortOrderItem()]; // [SortOrderItem] | Change the ordering of inbound routes for when matching the inbound
apiInstance.inboundrouteOrderPut(sortOrderItem, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
sortOrderItem [SortOrderItem] Change the ordering of inbound routes for when matching the inbound

Return type

[InboundRoute]

Authorization

apikey

HTTP request headers

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

inboundroutePost

InboundRoute inboundroutePost(inboundPayload)

Create Route

Create new Inbound Route. Required Access Level: ModifySettings

Example

import ElasticEmail from '@elasticemail/elasticemail-client';
let defaultClient = ElasticEmail.ApiClient.instance;
// Configure API key authorization: apikey
let apikey = defaultClient.authentications['apikey'];
apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.apiKeyPrefix = 'Token';

let apiInstance = new ElasticEmail.InboundRouteApi();
let inboundPayload = new ElasticEmail.InboundPayload(); // InboundPayload | 
apiInstance.inboundroutePost(inboundPayload, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
inboundPayload InboundPayload

Return type

InboundRoute

Authorization

apikey

HTTP request headers

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