Amazon Pinpoint Email Service
POST
CreateConfigurationSet
{{baseUrl}}/v1/email/configuration-sets
BODY json
{
"ConfigurationSetName": "",
"TrackingOptions": {
"CustomRedirectDomain": ""
},
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": {
"SendingEnabled": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/email/configuration-sets" {:content-type :json
:form-params {:ConfigurationSetName ""
:TrackingOptions {:CustomRedirectDomain ""}
:DeliveryOptions {:TlsPolicy ""
:SendingPoolName ""}
:ReputationOptions {:ReputationMetricsEnabled ""
:LastFreshStart ""}
:SendingOptions {:SendingEnabled ""}
:Tags [{:Key ""
:Value ""}]}})
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets"),
Content = new StringContent("{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets"
payload := strings.NewReader("{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/email/configuration-sets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 373
{
"ConfigurationSetName": "",
"TrackingOptions": {
"CustomRedirectDomain": ""
},
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": {
"SendingEnabled": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/email/configuration-sets")
.setHeader("content-type", "application/json")
.setBody("{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/email/configuration-sets")
.header("content-type", "application/json")
.body("{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
ConfigurationSetName: '',
TrackingOptions: {
CustomRedirectDomain: ''
},
DeliveryOptions: {
TlsPolicy: '',
SendingPoolName: ''
},
ReputationOptions: {
ReputationMetricsEnabled: '',
LastFreshStart: ''
},
SendingOptions: {
SendingEnabled: ''
},
Tags: [
{
Key: '',
Value: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/email/configuration-sets');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/configuration-sets',
headers: {'content-type': 'application/json'},
data: {
ConfigurationSetName: '',
TrackingOptions: {CustomRedirectDomain: ''},
DeliveryOptions: {TlsPolicy: '', SendingPoolName: ''},
ReputationOptions: {ReputationMetricsEnabled: '', LastFreshStart: ''},
SendingOptions: {SendingEnabled: ''},
Tags: [{Key: '', Value: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ConfigurationSetName":"","TrackingOptions":{"CustomRedirectDomain":""},"DeliveryOptions":{"TlsPolicy":"","SendingPoolName":""},"ReputationOptions":{"ReputationMetricsEnabled":"","LastFreshStart":""},"SendingOptions":{"SendingEnabled":""},"Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ConfigurationSetName": "",\n "TrackingOptions": {\n "CustomRedirectDomain": ""\n },\n "DeliveryOptions": {\n "TlsPolicy": "",\n "SendingPoolName": ""\n },\n "ReputationOptions": {\n "ReputationMetricsEnabled": "",\n "LastFreshStart": ""\n },\n "SendingOptions": {\n "SendingEnabled": ""\n },\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
ConfigurationSetName: '',
TrackingOptions: {CustomRedirectDomain: ''},
DeliveryOptions: {TlsPolicy: '', SendingPoolName: ''},
ReputationOptions: {ReputationMetricsEnabled: '', LastFreshStart: ''},
SendingOptions: {SendingEnabled: ''},
Tags: [{Key: '', Value: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/configuration-sets',
headers: {'content-type': 'application/json'},
body: {
ConfigurationSetName: '',
TrackingOptions: {CustomRedirectDomain: ''},
DeliveryOptions: {TlsPolicy: '', SendingPoolName: ''},
ReputationOptions: {ReputationMetricsEnabled: '', LastFreshStart: ''},
SendingOptions: {SendingEnabled: ''},
Tags: [{Key: '', Value: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/email/configuration-sets');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ConfigurationSetName: '',
TrackingOptions: {
CustomRedirectDomain: ''
},
DeliveryOptions: {
TlsPolicy: '',
SendingPoolName: ''
},
ReputationOptions: {
ReputationMetricsEnabled: '',
LastFreshStart: ''
},
SendingOptions: {
SendingEnabled: ''
},
Tags: [
{
Key: '',
Value: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/configuration-sets',
headers: {'content-type': 'application/json'},
data: {
ConfigurationSetName: '',
TrackingOptions: {CustomRedirectDomain: ''},
DeliveryOptions: {TlsPolicy: '', SendingPoolName: ''},
ReputationOptions: {ReputationMetricsEnabled: '', LastFreshStart: ''},
SendingOptions: {SendingEnabled: ''},
Tags: [{Key: '', Value: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ConfigurationSetName":"","TrackingOptions":{"CustomRedirectDomain":""},"DeliveryOptions":{"TlsPolicy":"","SendingPoolName":""},"ReputationOptions":{"ReputationMetricsEnabled":"","LastFreshStart":""},"SendingOptions":{"SendingEnabled":""},"Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ConfigurationSetName": @"",
@"TrackingOptions": @{ @"CustomRedirectDomain": @"" },
@"DeliveryOptions": @{ @"TlsPolicy": @"", @"SendingPoolName": @"" },
@"ReputationOptions": @{ @"ReputationMetricsEnabled": @"", @"LastFreshStart": @"" },
@"SendingOptions": @{ @"SendingEnabled": @"" },
@"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ConfigurationSetName' => '',
'TrackingOptions' => [
'CustomRedirectDomain' => ''
],
'DeliveryOptions' => [
'TlsPolicy' => '',
'SendingPoolName' => ''
],
'ReputationOptions' => [
'ReputationMetricsEnabled' => '',
'LastFreshStart' => ''
],
'SendingOptions' => [
'SendingEnabled' => ''
],
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/email/configuration-sets', [
'body' => '{
"ConfigurationSetName": "",
"TrackingOptions": {
"CustomRedirectDomain": ""
},
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": {
"SendingEnabled": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ConfigurationSetName' => '',
'TrackingOptions' => [
'CustomRedirectDomain' => ''
],
'DeliveryOptions' => [
'TlsPolicy' => '',
'SendingPoolName' => ''
],
'ReputationOptions' => [
'ReputationMetricsEnabled' => '',
'LastFreshStart' => ''
],
'SendingOptions' => [
'SendingEnabled' => ''
],
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ConfigurationSetName' => '',
'TrackingOptions' => [
'CustomRedirectDomain' => ''
],
'DeliveryOptions' => [
'TlsPolicy' => '',
'SendingPoolName' => ''
],
'ReputationOptions' => [
'ReputationMetricsEnabled' => '',
'LastFreshStart' => ''
],
'SendingOptions' => [
'SendingEnabled' => ''
],
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/configuration-sets');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ConfigurationSetName": "",
"TrackingOptions": {
"CustomRedirectDomain": ""
},
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": {
"SendingEnabled": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ConfigurationSetName": "",
"TrackingOptions": {
"CustomRedirectDomain": ""
},
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": {
"SendingEnabled": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/email/configuration-sets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets"
payload = {
"ConfigurationSetName": "",
"TrackingOptions": { "CustomRedirectDomain": "" },
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": { "SendingEnabled": "" },
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets"
payload <- "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/email/configuration-sets') do |req|
req.body = "{\n \"ConfigurationSetName\": \"\",\n \"TrackingOptions\": {\n \"CustomRedirectDomain\": \"\"\n },\n \"DeliveryOptions\": {\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n },\n \"ReputationOptions\": {\n \"ReputationMetricsEnabled\": \"\",\n \"LastFreshStart\": \"\"\n },\n \"SendingOptions\": {\n \"SendingEnabled\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets";
let payload = json!({
"ConfigurationSetName": "",
"TrackingOptions": json!({"CustomRedirectDomain": ""}),
"DeliveryOptions": json!({
"TlsPolicy": "",
"SendingPoolName": ""
}),
"ReputationOptions": json!({
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
}),
"SendingOptions": json!({"SendingEnabled": ""}),
"Tags": (
json!({
"Key": "",
"Value": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/email/configuration-sets \
--header 'content-type: application/json' \
--data '{
"ConfigurationSetName": "",
"TrackingOptions": {
"CustomRedirectDomain": ""
},
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": {
"SendingEnabled": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
echo '{
"ConfigurationSetName": "",
"TrackingOptions": {
"CustomRedirectDomain": ""
},
"DeliveryOptions": {
"TlsPolicy": "",
"SendingPoolName": ""
},
"ReputationOptions": {
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
},
"SendingOptions": {
"SendingEnabled": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}' | \
http POST {{baseUrl}}/v1/email/configuration-sets \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ConfigurationSetName": "",\n "TrackingOptions": {\n "CustomRedirectDomain": ""\n },\n "DeliveryOptions": {\n "TlsPolicy": "",\n "SendingPoolName": ""\n },\n "ReputationOptions": {\n "ReputationMetricsEnabled": "",\n "LastFreshStart": ""\n },\n "SendingOptions": {\n "SendingEnabled": ""\n },\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ConfigurationSetName": "",
"TrackingOptions": ["CustomRedirectDomain": ""],
"DeliveryOptions": [
"TlsPolicy": "",
"SendingPoolName": ""
],
"ReputationOptions": [
"ReputationMetricsEnabled": "",
"LastFreshStart": ""
],
"SendingOptions": ["SendingEnabled": ""],
"Tags": [
[
"Key": "",
"Value": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateConfigurationSetEventDestination
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations
QUERY PARAMS
ConfigurationSetName
BODY json
{
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations" {:content-type :json
:form-params {:EventDestinationName ""
:EventDestination {:Enabled ""
:MatchingEventTypes ""
:KinesisFirehoseDestination ""
:CloudWatchDestination ""
:SnsDestination ""
:PinpointDestination ""}}})
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"),
Content = new StringContent("{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
payload := strings.NewReader("{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 237
{
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.setHeader("content-type", "application/json")
.setBody("{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.header("content-type", "application/json")
.body("{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
EventDestinationName: '',
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations',
headers: {'content-type': 'application/json'},
data: {
EventDestinationName: '',
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"EventDestinationName":"","EventDestination":{"Enabled":"","MatchingEventTypes":"","KinesisFirehoseDestination":"","CloudWatchDestination":"","SnsDestination":"","PinpointDestination":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "EventDestinationName": "",\n "EventDestination": {\n "Enabled": "",\n "MatchingEventTypes": "",\n "KinesisFirehoseDestination": "",\n "CloudWatchDestination": "",\n "SnsDestination": "",\n "PinpointDestination": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
EventDestinationName: '',
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations',
headers: {'content-type': 'application/json'},
body: {
EventDestinationName: '',
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
EventDestinationName: '',
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations',
headers: {'content-type': 'application/json'},
data: {
EventDestinationName: '',
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"EventDestinationName":"","EventDestination":{"Enabled":"","MatchingEventTypes":"","KinesisFirehoseDestination":"","CloudWatchDestination":"","SnsDestination":"","PinpointDestination":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"EventDestinationName": @"",
@"EventDestination": @{ @"Enabled": @"", @"MatchingEventTypes": @"", @"KinesisFirehoseDestination": @"", @"CloudWatchDestination": @"", @"SnsDestination": @"", @"PinpointDestination": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'EventDestinationName' => '',
'EventDestination' => [
'Enabled' => '',
'MatchingEventTypes' => '',
'KinesisFirehoseDestination' => '',
'CloudWatchDestination' => '',
'SnsDestination' => '',
'PinpointDestination' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations', [
'body' => '{
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'EventDestinationName' => '',
'EventDestination' => [
'Enabled' => '',
'MatchingEventTypes' => '',
'KinesisFirehoseDestination' => '',
'CloudWatchDestination' => '',
'SnsDestination' => '',
'PinpointDestination' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'EventDestinationName' => '',
'EventDestination' => [
'Enabled' => '',
'MatchingEventTypes' => '',
'KinesisFirehoseDestination' => '',
'CloudWatchDestination' => '',
'SnsDestination' => '',
'PinpointDestination' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
payload = {
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
payload <- "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations') do |req|
req.body = "{\n \"EventDestinationName\": \"\",\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations";
let payload = json!({
"EventDestinationName": "",
"EventDestination": json!({
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations \
--header 'content-type: application/json' \
--data '{
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}'
echo '{
"EventDestinationName": "",
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}' | \
http POST {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "EventDestinationName": "",\n "EventDestination": {\n "Enabled": "",\n "MatchingEventTypes": "",\n "KinesisFirehoseDestination": "",\n "CloudWatchDestination": "",\n "SnsDestination": "",\n "PinpointDestination": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"EventDestinationName": "",
"EventDestination": [
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateDedicatedIpPool
{{baseUrl}}/v1/email/dedicated-ip-pools
BODY json
{
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/dedicated-ip-pools");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/email/dedicated-ip-pools" {:content-type :json
:form-params {:PoolName ""
:Tags [{:Key ""
:Value ""}]}})
require "http/client"
url = "{{baseUrl}}/v1/email/dedicated-ip-pools"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/email/dedicated-ip-pools"),
Content = new StringContent("{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/dedicated-ip-pools");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/dedicated-ip-pools"
payload := strings.NewReader("{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/email/dedicated-ip-pools HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/email/dedicated-ip-pools")
.setHeader("content-type", "application/json")
.setBody("{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/dedicated-ip-pools"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ip-pools")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/email/dedicated-ip-pools")
.header("content-type", "application/json")
.body("{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
PoolName: '',
Tags: [
{
Key: '',
Value: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/email/dedicated-ip-pools');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/dedicated-ip-pools',
headers: {'content-type': 'application/json'},
data: {PoolName: '', Tags: [{Key: '', Value: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/dedicated-ip-pools';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"PoolName":"","Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/dedicated-ip-pools',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "PoolName": "",\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ip-pools")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/dedicated-ip-pools',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({PoolName: '', Tags: [{Key: '', Value: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/dedicated-ip-pools',
headers: {'content-type': 'application/json'},
body: {PoolName: '', Tags: [{Key: '', Value: ''}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/email/dedicated-ip-pools');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
PoolName: '',
Tags: [
{
Key: '',
Value: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/dedicated-ip-pools',
headers: {'content-type': 'application/json'},
data: {PoolName: '', Tags: [{Key: '', Value: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/dedicated-ip-pools';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"PoolName":"","Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"PoolName": @"",
@"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/dedicated-ip-pools"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/dedicated-ip-pools" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/dedicated-ip-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'PoolName' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/email/dedicated-ip-pools', [
'body' => '{
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/dedicated-ip-pools');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'PoolName' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'PoolName' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/dedicated-ip-pools');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/dedicated-ip-pools' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/dedicated-ip-pools' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/email/dedicated-ip-pools", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/dedicated-ip-pools"
payload = {
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/dedicated-ip-pools"
payload <- "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/dedicated-ip-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/email/dedicated-ip-pools') do |req|
req.body = "{\n \"PoolName\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/dedicated-ip-pools";
let payload = json!({
"PoolName": "",
"Tags": (
json!({
"Key": "",
"Value": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/email/dedicated-ip-pools \
--header 'content-type: application/json' \
--data '{
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
echo '{
"PoolName": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}' | \
http POST {{baseUrl}}/v1/email/dedicated-ip-pools \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "PoolName": "",\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1/email/dedicated-ip-pools
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"PoolName": "",
"Tags": [
[
"Key": "",
"Value": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/dedicated-ip-pools")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateDeliverabilityTestReport
{{baseUrl}}/v1/email/deliverability-dashboard/test
BODY json
{
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard/test");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/email/deliverability-dashboard/test" {:content-type :json
:form-params {:ReportName ""
:FromEmailAddress ""
:Content {:Simple ""
:Raw ""
:Template ""}
:Tags [{:Key ""
:Value ""}]}})
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard/test"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard/test"),
Content = new StringContent("{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard/test");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard/test"
payload := strings.NewReader("{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/email/deliverability-dashboard/test HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 184
{
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/email/deliverability-dashboard/test")
.setHeader("content-type", "application/json")
.setBody("{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard/test"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/test")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/email/deliverability-dashboard/test")
.header("content-type", "application/json")
.body("{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
ReportName: '',
FromEmailAddress: '',
Content: {
Simple: '',
Raw: '',
Template: ''
},
Tags: [
{
Key: '',
Value: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/email/deliverability-dashboard/test');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test',
headers: {'content-type': 'application/json'},
data: {
ReportName: '',
FromEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
Tags: [{Key: '', Value: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/test';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ReportName":"","FromEmailAddress":"","Content":{"Simple":"","Raw":"","Template":""},"Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ReportName": "",\n "FromEmailAddress": "",\n "Content": {\n "Simple": "",\n "Raw": "",\n "Template": ""\n },\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/test")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard/test',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
ReportName: '',
FromEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
Tags: [{Key: '', Value: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test',
headers: {'content-type': 'application/json'},
body: {
ReportName: '',
FromEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
Tags: [{Key: '', Value: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/email/deliverability-dashboard/test');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ReportName: '',
FromEmailAddress: '',
Content: {
Simple: '',
Raw: '',
Template: ''
},
Tags: [
{
Key: '',
Value: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test',
headers: {'content-type': 'application/json'},
data: {
ReportName: '',
FromEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
Tags: [{Key: '', Value: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/test';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ReportName":"","FromEmailAddress":"","Content":{"Simple":"","Raw":"","Template":""},"Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ReportName": @"",
@"FromEmailAddress": @"",
@"Content": @{ @"Simple": @"", @"Raw": @"", @"Template": @"" },
@"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard/test"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard/test" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ReportName' => '',
'FromEmailAddress' => '',
'Content' => [
'Simple' => '',
'Raw' => '',
'Template' => ''
],
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/email/deliverability-dashboard/test', [
'body' => '{
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard/test');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ReportName' => '',
'FromEmailAddress' => '',
'Content' => [
'Simple' => '',
'Raw' => '',
'Template' => ''
],
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ReportName' => '',
'FromEmailAddress' => '',
'Content' => [
'Simple' => '',
'Raw' => '',
'Template' => ''
],
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard/test');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/test' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/test' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/email/deliverability-dashboard/test", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard/test"
payload = {
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard/test"
payload <- "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/email/deliverability-dashboard/test') do |req|
req.body = "{\n \"ReportName\": \"\",\n \"FromEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard/test";
let payload = json!({
"ReportName": "",
"FromEmailAddress": "",
"Content": json!({
"Simple": "",
"Raw": "",
"Template": ""
}),
"Tags": (
json!({
"Key": "",
"Value": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/email/deliverability-dashboard/test \
--header 'content-type: application/json' \
--data '{
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
echo '{
"ReportName": "",
"FromEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"Tags": [
{
"Key": "",
"Value": ""
}
]
}' | \
http POST {{baseUrl}}/v1/email/deliverability-dashboard/test \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ReportName": "",\n "FromEmailAddress": "",\n "Content": {\n "Simple": "",\n "Raw": "",\n "Template": ""\n },\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1/email/deliverability-dashboard/test
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ReportName": "",
"FromEmailAddress": "",
"Content": [
"Simple": "",
"Raw": "",
"Template": ""
],
"Tags": [
[
"Key": "",
"Value": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard/test")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateEmailIdentity
{{baseUrl}}/v1/email/identities
BODY json
{
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/identities");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/email/identities" {:content-type :json
:form-params {:EmailIdentity ""
:Tags [{:Key ""
:Value ""}]}})
require "http/client"
url = "{{baseUrl}}/v1/email/identities"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/email/identities"),
Content = new StringContent("{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/identities");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/identities"
payload := strings.NewReader("{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/email/identities HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 89
{
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/email/identities")
.setHeader("content-type", "application/json")
.setBody("{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/identities"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/identities")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/email/identities")
.header("content-type", "application/json")
.body("{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
EmailIdentity: '',
Tags: [
{
Key: '',
Value: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/email/identities');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/identities',
headers: {'content-type': 'application/json'},
data: {EmailIdentity: '', Tags: [{Key: '', Value: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/identities';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"EmailIdentity":"","Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/identities',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "EmailIdentity": "",\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/identities")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/identities',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({EmailIdentity: '', Tags: [{Key: '', Value: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/identities',
headers: {'content-type': 'application/json'},
body: {EmailIdentity: '', Tags: [{Key: '', Value: ''}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/email/identities');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
EmailIdentity: '',
Tags: [
{
Key: '',
Value: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/identities',
headers: {'content-type': 'application/json'},
data: {EmailIdentity: '', Tags: [{Key: '', Value: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/identities';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"EmailIdentity":"","Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"EmailIdentity": @"",
@"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/identities"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/identities" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/identities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'EmailIdentity' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/email/identities', [
'body' => '{
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/identities');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'EmailIdentity' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'EmailIdentity' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/identities');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/identities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/identities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/email/identities", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/identities"
payload = {
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/identities"
payload <- "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/identities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/email/identities') do |req|
req.body = "{\n \"EmailIdentity\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/identities";
let payload = json!({
"EmailIdentity": "",
"Tags": (
json!({
"Key": "",
"Value": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/email/identities \
--header 'content-type: application/json' \
--data '{
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
echo '{
"EmailIdentity": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}' | \
http POST {{baseUrl}}/v1/email/identities \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "EmailIdentity": "",\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1/email/identities
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"EmailIdentity": "",
"Tags": [
[
"Key": "",
"Value": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/identities")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteConfigurationSet
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
QUERY PARAMS
ConfigurationSetName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/email/configuration-sets/:ConfigurationSetName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
http DELETE {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteConfigurationSetEventDestination
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName
QUERY PARAMS
ConfigurationSetName
EventDestinationName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName
http DELETE {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteDedicatedIpPool
{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName
QUERY PARAMS
PoolName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName")
require "http/client"
url = "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/email/dedicated-ip-pools/:PoolName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/dedicated-ip-pools/:PoolName',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/email/dedicated-ip-pools/:PoolName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/email/dedicated-ip-pools/:PoolName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName
http DELETE {{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/dedicated-ip-pools/:PoolName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteEmailIdentity
{{baseUrl}}/v1/email/identities/:EmailIdentity
QUERY PARAMS
EmailIdentity
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/identities/:EmailIdentity");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/email/identities/:EmailIdentity")
require "http/client"
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/email/identities/:EmailIdentity"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/identities/:EmailIdentity");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/identities/:EmailIdentity"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/email/identities/:EmailIdentity HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/email/identities/:EmailIdentity")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/identities/:EmailIdentity"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/email/identities/:EmailIdentity")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/email/identities/:EmailIdentity');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/identities/:EmailIdentity',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/email/identities/:EmailIdentity');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/identities/:EmailIdentity"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/identities/:EmailIdentity" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/identities/:EmailIdentity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/email/identities/:EmailIdentity');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/email/identities/:EmailIdentity")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/identities/:EmailIdentity"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/identities/:EmailIdentity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/email/identities/:EmailIdentity') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/identities/:EmailIdentity";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/email/identities/:EmailIdentity
http DELETE {{baseUrl}}/v1/email/identities/:EmailIdentity
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/email/identities/:EmailIdentity
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/identities/:EmailIdentity")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetAccount
{{baseUrl}}/v1/email/account
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/account");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/account")
require "http/client"
url = "{{baseUrl}}/v1/email/account"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/account"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/account");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/account"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/account HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/account")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/account"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/account")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/account")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/account');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/account'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/account';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/account',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/account")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/account',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/account'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/account');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/account'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/account';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/account"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/account" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/account');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/account');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/account');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/account' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/account' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/account")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/account"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/account"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/account') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/account";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/account
http GET {{baseUrl}}/v1/email/account
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/account
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/account")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetBlacklistReports
{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames
QUERY PARAMS
BlacklistItemNames
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames" {:query-params {:BlacklistItemNames ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames',
params: {BlacklistItemNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames',
qs: {BlacklistItemNames: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames');
req.query({
BlacklistItemNames: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames',
params: {BlacklistItemNames: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'BlacklistItemNames' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'BlacklistItemNames' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames"
querystring = {"BlacklistItemNames":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames"
queryString <- list(BlacklistItemNames = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/deliverability-dashboard/blacklist-report') do |req|
req.params['BlacklistItemNames'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report#BlacklistItemNames";
let querystring = [
("BlacklistItemNames", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames'
http GET '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard/blacklist-report?BlacklistItemNames=#BlacklistItemNames")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetConfigurationSet
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
QUERY PARAMS
ConfigurationSetName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/configuration-sets/:ConfigurationSetName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
http GET {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetConfigurationSetEventDestinations
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations
QUERY PARAMS
ConfigurationSetName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations
http GET {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetDedicatedIp
{{baseUrl}}/v1/email/dedicated-ips/:IP
QUERY PARAMS
IP
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/dedicated-ips/:IP");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/dedicated-ips/:IP")
require "http/client"
url = "{{baseUrl}}/v1/email/dedicated-ips/:IP"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/dedicated-ips/:IP"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/dedicated-ips/:IP");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/dedicated-ips/:IP"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/dedicated-ips/:IP HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/dedicated-ips/:IP")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/dedicated-ips/:IP"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips/:IP")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/dedicated-ips/:IP")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/dedicated-ips/:IP');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ips/:IP'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/dedicated-ips/:IP';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips/:IP")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/dedicated-ips/:IP',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ips/:IP'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/dedicated-ips/:IP');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ips/:IP'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/dedicated-ips/:IP';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/dedicated-ips/:IP"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/dedicated-ips/:IP" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/dedicated-ips/:IP",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/dedicated-ips/:IP');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/dedicated-ips/:IP');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/dedicated-ips/:IP');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/dedicated-ips/:IP' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/dedicated-ips/:IP' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/dedicated-ips/:IP")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/dedicated-ips/:IP"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/dedicated-ips/:IP"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/dedicated-ips/:IP")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/dedicated-ips/:IP') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/dedicated-ips/:IP";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/dedicated-ips/:IP
http GET {{baseUrl}}/v1/email/dedicated-ips/:IP
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/dedicated-ips/:IP
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/dedicated-ips/:IP")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetDedicatedIps
{{baseUrl}}/v1/email/dedicated-ips
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/dedicated-ips");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/dedicated-ips")
require "http/client"
url = "{{baseUrl}}/v1/email/dedicated-ips"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/dedicated-ips"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/dedicated-ips");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/dedicated-ips"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/dedicated-ips HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/dedicated-ips")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/dedicated-ips"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/dedicated-ips")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/dedicated-ips');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ips'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/dedicated-ips';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/dedicated-ips',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/dedicated-ips',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ips'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/dedicated-ips');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ips'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/dedicated-ips';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/dedicated-ips"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/dedicated-ips" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/dedicated-ips",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/dedicated-ips');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/dedicated-ips');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/dedicated-ips');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/dedicated-ips' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/dedicated-ips' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/dedicated-ips")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/dedicated-ips"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/dedicated-ips"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/dedicated-ips")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/dedicated-ips') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/dedicated-ips";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/dedicated-ips
http GET {{baseUrl}}/v1/email/dedicated-ips
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/dedicated-ips
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/dedicated-ips")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetDeliverabilityDashboardOptions
{{baseUrl}}/v1/email/deliverability-dashboard
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/deliverability-dashboard")
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/deliverability-dashboard HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/deliverability-dashboard")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/deliverability-dashboard")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/deliverability-dashboard');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/deliverability-dashboard');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/deliverability-dashboard');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/deliverability-dashboard")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/deliverability-dashboard') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/deliverability-dashboard
http GET {{baseUrl}}/v1/email/deliverability-dashboard
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/deliverability-dashboard
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetDeliverabilityTestReport
{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId
QUERY PARAMS
ReportId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId")
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/deliverability-dashboard/test-reports/:ReportId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard/test-reports/:ReportId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/deliverability-dashboard/test-reports/:ReportId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/deliverability-dashboard/test-reports/:ReportId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId
http GET {{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports/:ReportId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetDomainDeliverabilityCampaign
{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId
QUERY PARAMS
CampaignId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId")
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/deliverability-dashboard/campaigns/:CampaignId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard/campaigns/:CampaignId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/deliverability-dashboard/campaigns/:CampaignId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/deliverability-dashboard/campaigns/:CampaignId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId
http GET {{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard/campaigns/:CampaignId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetDomainStatisticsReport
{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate
QUERY PARAMS
StartDate
EndDate
Domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate" {:query-params {:StartDate ""
:EndDate ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate',
params: {StartDate: '', EndDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate',
qs: {StartDate: '', EndDate: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate');
req.query({
StartDate: '',
EndDate: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate',
params: {StartDate: '', EndDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'StartDate' => '',
'EndDate' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'StartDate' => '',
'EndDate' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate"
querystring = {"StartDate":"","EndDate":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate"
queryString <- list(
StartDate = "",
EndDate = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/deliverability-dashboard/statistics-report/:Domain') do |req|
req.params['StartDate'] = ''
req.params['EndDate'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain#StartDate&EndDate";
let querystring = [
("StartDate", ""),
("EndDate", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate'
http GET '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard/statistics-report/:Domain?StartDate=&EndDate=#StartDate&EndDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetEmailIdentity
{{baseUrl}}/v1/email/identities/:EmailIdentity
QUERY PARAMS
EmailIdentity
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/identities/:EmailIdentity");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/identities/:EmailIdentity")
require "http/client"
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/identities/:EmailIdentity"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/identities/:EmailIdentity");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/identities/:EmailIdentity"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/identities/:EmailIdentity HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/identities/:EmailIdentity")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/identities/:EmailIdentity"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/identities/:EmailIdentity")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/identities/:EmailIdentity');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/identities/:EmailIdentity',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/identities/:EmailIdentity');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/identities/:EmailIdentity"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/identities/:EmailIdentity" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/identities/:EmailIdentity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/identities/:EmailIdentity');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/identities/:EmailIdentity")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/identities/:EmailIdentity"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/identities/:EmailIdentity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/identities/:EmailIdentity') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/identities/:EmailIdentity";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/identities/:EmailIdentity
http GET {{baseUrl}}/v1/email/identities/:EmailIdentity
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/identities/:EmailIdentity
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/identities/:EmailIdentity")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListConfigurationSets
{{baseUrl}}/v1/email/configuration-sets
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/configuration-sets")
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/configuration-sets HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/configuration-sets")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/configuration-sets")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/configuration-sets');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/configuration-sets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/configuration-sets'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/configuration-sets');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/configuration-sets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/configuration-sets');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/configuration-sets');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/configuration-sets")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/configuration-sets') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/configuration-sets
http GET {{baseUrl}}/v1/email/configuration-sets
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListDedicatedIpPools
{{baseUrl}}/v1/email/dedicated-ip-pools
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/dedicated-ip-pools");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/dedicated-ip-pools")
require "http/client"
url = "{{baseUrl}}/v1/email/dedicated-ip-pools"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/dedicated-ip-pools"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/dedicated-ip-pools");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/dedicated-ip-pools"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/dedicated-ip-pools HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/dedicated-ip-pools")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/dedicated-ip-pools"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ip-pools")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/dedicated-ip-pools")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/dedicated-ip-pools');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ip-pools'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/dedicated-ip-pools';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/dedicated-ip-pools',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ip-pools")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/dedicated-ip-pools',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ip-pools'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/dedicated-ip-pools');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/dedicated-ip-pools'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/dedicated-ip-pools';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/dedicated-ip-pools"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/dedicated-ip-pools" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/dedicated-ip-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/dedicated-ip-pools');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/dedicated-ip-pools');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/dedicated-ip-pools');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/dedicated-ip-pools' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/dedicated-ip-pools' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/dedicated-ip-pools")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/dedicated-ip-pools"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/dedicated-ip-pools"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/dedicated-ip-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/dedicated-ip-pools') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/dedicated-ip-pools";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/dedicated-ip-pools
http GET {{baseUrl}}/v1/email/dedicated-ip-pools
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/dedicated-ip-pools
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/dedicated-ip-pools")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListDeliverabilityTestReports
{{baseUrl}}/v1/email/deliverability-dashboard/test-reports
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports")
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/deliverability-dashboard/test-reports HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard/test-reports',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard/test-reports"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard/test-reports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard/test-reports');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard/test-reports');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/test-reports' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/deliverability-dashboard/test-reports")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard/test-reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/deliverability-dashboard/test-reports') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/deliverability-dashboard/test-reports
http GET {{baseUrl}}/v1/email/deliverability-dashboard/test-reports
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/deliverability-dashboard/test-reports
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard/test-reports")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListDomainDeliverabilityCampaigns
{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate
QUERY PARAMS
StartDate
EndDate
SubscribedDomain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate" {:query-params {:StartDate ""
:EndDate ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate',
params: {StartDate: '', EndDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate',
qs: {StartDate: '', EndDate: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate');
req.query({
StartDate: '',
EndDate: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate',
params: {StartDate: '', EndDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'StartDate' => '',
'EndDate' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'StartDate' => '',
'EndDate' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate"
querystring = {"StartDate":"","EndDate":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate"
queryString <- list(
StartDate = "",
EndDate = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns') do |req|
req.params['StartDate'] = ''
req.params['EndDate'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns#StartDate&EndDate";
let querystring = [
("StartDate", ""),
("EndDate", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate'
http GET '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard/domains/:SubscribedDomain/campaigns?StartDate=&EndDate=#StartDate&EndDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListEmailIdentities
{{baseUrl}}/v1/email/identities
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/identities");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/identities")
require "http/client"
url = "{{baseUrl}}/v1/email/identities"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/identities"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/identities");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/identities"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/identities HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/identities")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/identities"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/identities")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/identities")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/identities');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/identities'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/identities';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/identities',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/identities")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/identities',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/identities'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/identities');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/email/identities'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/identities';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/identities"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/identities" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/identities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/identities');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/identities');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/identities');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/identities' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/identities' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/identities")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/identities"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/identities"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/identities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/identities') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/identities";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/email/identities
http GET {{baseUrl}}/v1/email/identities
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/email/identities
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/identities")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListTagsForResource
{{baseUrl}}/v1/email/tags#ResourceArn
QUERY PARAMS
ResourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/email/tags#ResourceArn" {:query-params {:ResourceArn ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/email/tags?ResourceArn= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/tags#ResourceArn',
params: {ResourceArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/tags?ResourceArn=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/tags#ResourceArn',
qs: {ResourceArn: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/email/tags#ResourceArn');
req.query({
ResourceArn: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/email/tags#ResourceArn',
params: {ResourceArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/tags#ResourceArn');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'ResourceArn' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/tags#ResourceArn');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'ResourceArn' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/email/tags?ResourceArn=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/tags#ResourceArn"
querystring = {"ResourceArn":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/tags#ResourceArn"
queryString <- list(ResourceArn = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/email/tags') do |req|
req.params['ResourceArn'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/tags#ResourceArn";
let querystring = [
("ResourceArn", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn'
http GET '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/tags?ResourceArn=#ResourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutAccountDedicatedIpWarmupAttributes
{{baseUrl}}/v1/email/account/dedicated-ips/warmup
BODY json
{
"AutoWarmupEnabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/account/dedicated-ips/warmup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AutoWarmupEnabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/account/dedicated-ips/warmup" {:content-type :json
:form-params {:AutoWarmupEnabled false}})
require "http/client"
url = "{{baseUrl}}/v1/email/account/dedicated-ips/warmup"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AutoWarmupEnabled\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/account/dedicated-ips/warmup"),
Content = new StringContent("{\n \"AutoWarmupEnabled\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/account/dedicated-ips/warmup");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AutoWarmupEnabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/account/dedicated-ips/warmup"
payload := strings.NewReader("{\n \"AutoWarmupEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/account/dedicated-ips/warmup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 32
{
"AutoWarmupEnabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/account/dedicated-ips/warmup")
.setHeader("content-type", "application/json")
.setBody("{\n \"AutoWarmupEnabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/account/dedicated-ips/warmup"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"AutoWarmupEnabled\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"AutoWarmupEnabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/account/dedicated-ips/warmup")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/account/dedicated-ips/warmup")
.header("content-type", "application/json")
.body("{\n \"AutoWarmupEnabled\": false\n}")
.asString();
const data = JSON.stringify({
AutoWarmupEnabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/account/dedicated-ips/warmup');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/account/dedicated-ips/warmup',
headers: {'content-type': 'application/json'},
data: {AutoWarmupEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/account/dedicated-ips/warmup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AutoWarmupEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/account/dedicated-ips/warmup',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AutoWarmupEnabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AutoWarmupEnabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/account/dedicated-ips/warmup")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/account/dedicated-ips/warmup',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({AutoWarmupEnabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/account/dedicated-ips/warmup',
headers: {'content-type': 'application/json'},
body: {AutoWarmupEnabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/account/dedicated-ips/warmup');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AutoWarmupEnabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/account/dedicated-ips/warmup',
headers: {'content-type': 'application/json'},
data: {AutoWarmupEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/account/dedicated-ips/warmup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AutoWarmupEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AutoWarmupEnabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/account/dedicated-ips/warmup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/account/dedicated-ips/warmup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AutoWarmupEnabled\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/account/dedicated-ips/warmup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'AutoWarmupEnabled' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/account/dedicated-ips/warmup', [
'body' => '{
"AutoWarmupEnabled": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/account/dedicated-ips/warmup');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AutoWarmupEnabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AutoWarmupEnabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/account/dedicated-ips/warmup');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/account/dedicated-ips/warmup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AutoWarmupEnabled": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/account/dedicated-ips/warmup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AutoWarmupEnabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AutoWarmupEnabled\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/account/dedicated-ips/warmup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/account/dedicated-ips/warmup"
payload = { "AutoWarmupEnabled": False }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/account/dedicated-ips/warmup"
payload <- "{\n \"AutoWarmupEnabled\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/account/dedicated-ips/warmup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"AutoWarmupEnabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/account/dedicated-ips/warmup') do |req|
req.body = "{\n \"AutoWarmupEnabled\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/account/dedicated-ips/warmup";
let payload = json!({"AutoWarmupEnabled": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/account/dedicated-ips/warmup \
--header 'content-type: application/json' \
--data '{
"AutoWarmupEnabled": false
}'
echo '{
"AutoWarmupEnabled": false
}' | \
http PUT {{baseUrl}}/v1/email/account/dedicated-ips/warmup \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "AutoWarmupEnabled": false\n}' \
--output-document \
- {{baseUrl}}/v1/email/account/dedicated-ips/warmup
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["AutoWarmupEnabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/account/dedicated-ips/warmup")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutAccountSendingAttributes
{{baseUrl}}/v1/email/account/sending
BODY json
{
"SendingEnabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/account/sending");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"SendingEnabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/account/sending" {:content-type :json
:form-params {:SendingEnabled false}})
require "http/client"
url = "{{baseUrl}}/v1/email/account/sending"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"SendingEnabled\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/account/sending"),
Content = new StringContent("{\n \"SendingEnabled\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/account/sending");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"SendingEnabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/account/sending"
payload := strings.NewReader("{\n \"SendingEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/account/sending HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 29
{
"SendingEnabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/account/sending")
.setHeader("content-type", "application/json")
.setBody("{\n \"SendingEnabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/account/sending"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"SendingEnabled\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"SendingEnabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/account/sending")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/account/sending")
.header("content-type", "application/json")
.body("{\n \"SendingEnabled\": false\n}")
.asString();
const data = JSON.stringify({
SendingEnabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/account/sending');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/account/sending',
headers: {'content-type': 'application/json'},
data: {SendingEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/account/sending';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"SendingEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/account/sending',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "SendingEnabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"SendingEnabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/account/sending")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/account/sending',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({SendingEnabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/account/sending',
headers: {'content-type': 'application/json'},
body: {SendingEnabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/account/sending');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
SendingEnabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/account/sending',
headers: {'content-type': 'application/json'},
data: {SendingEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/account/sending';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"SendingEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"SendingEnabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/account/sending"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/account/sending" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"SendingEnabled\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/account/sending",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'SendingEnabled' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/account/sending', [
'body' => '{
"SendingEnabled": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/account/sending');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'SendingEnabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'SendingEnabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/account/sending');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/account/sending' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"SendingEnabled": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/account/sending' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"SendingEnabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"SendingEnabled\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/account/sending", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/account/sending"
payload = { "SendingEnabled": False }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/account/sending"
payload <- "{\n \"SendingEnabled\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/account/sending")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"SendingEnabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/account/sending') do |req|
req.body = "{\n \"SendingEnabled\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/account/sending";
let payload = json!({"SendingEnabled": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/account/sending \
--header 'content-type: application/json' \
--data '{
"SendingEnabled": false
}'
echo '{
"SendingEnabled": false
}' | \
http PUT {{baseUrl}}/v1/email/account/sending \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "SendingEnabled": false\n}' \
--output-document \
- {{baseUrl}}/v1/email/account/sending
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["SendingEnabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/account/sending")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutConfigurationSetDeliveryOptions
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options
QUERY PARAMS
ConfigurationSetName
BODY json
{
"TlsPolicy": "",
"SendingPoolName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options" {:content-type :json
:form-params {:TlsPolicy ""
:SendingPoolName ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options"),
Content = new StringContent("{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options"
payload := strings.NewReader("{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/delivery-options HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"TlsPolicy": "",
"SendingPoolName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options")
.setHeader("content-type", "application/json")
.setBody("{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options")
.header("content-type", "application/json")
.body("{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}")
.asString();
const data = JSON.stringify({
TlsPolicy: '',
SendingPoolName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options',
headers: {'content-type': 'application/json'},
data: {TlsPolicy: '', SendingPoolName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"TlsPolicy":"","SendingPoolName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "TlsPolicy": "",\n "SendingPoolName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/delivery-options',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({TlsPolicy: '', SendingPoolName: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options',
headers: {'content-type': 'application/json'},
body: {TlsPolicy: '', SendingPoolName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
TlsPolicy: '',
SendingPoolName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options',
headers: {'content-type': 'application/json'},
data: {TlsPolicy: '', SendingPoolName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"TlsPolicy":"","SendingPoolName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"TlsPolicy": @"",
@"SendingPoolName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'TlsPolicy' => '',
'SendingPoolName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options', [
'body' => '{
"TlsPolicy": "",
"SendingPoolName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'TlsPolicy' => '',
'SendingPoolName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'TlsPolicy' => '',
'SendingPoolName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"TlsPolicy": "",
"SendingPoolName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"TlsPolicy": "",
"SendingPoolName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/delivery-options", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options"
payload = {
"TlsPolicy": "",
"SendingPoolName": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options"
payload <- "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/delivery-options') do |req|
req.body = "{\n \"TlsPolicy\": \"\",\n \"SendingPoolName\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options";
let payload = json!({
"TlsPolicy": "",
"SendingPoolName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options \
--header 'content-type: application/json' \
--data '{
"TlsPolicy": "",
"SendingPoolName": ""
}'
echo '{
"TlsPolicy": "",
"SendingPoolName": ""
}' | \
http PUT {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "TlsPolicy": "",\n "SendingPoolName": ""\n}' \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"TlsPolicy": "",
"SendingPoolName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/delivery-options")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutConfigurationSetReputationOptions
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options
QUERY PARAMS
ConfigurationSetName
BODY json
{
"ReputationMetricsEnabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ReputationMetricsEnabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options" {:content-type :json
:form-params {:ReputationMetricsEnabled false}})
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ReputationMetricsEnabled\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options"),
Content = new StringContent("{\n \"ReputationMetricsEnabled\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ReputationMetricsEnabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options"
payload := strings.NewReader("{\n \"ReputationMetricsEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/reputation-options HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39
{
"ReputationMetricsEnabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options")
.setHeader("content-type", "application/json")
.setBody("{\n \"ReputationMetricsEnabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"ReputationMetricsEnabled\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ReputationMetricsEnabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options")
.header("content-type", "application/json")
.body("{\n \"ReputationMetricsEnabled\": false\n}")
.asString();
const data = JSON.stringify({
ReputationMetricsEnabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options',
headers: {'content-type': 'application/json'},
data: {ReputationMetricsEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"ReputationMetricsEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ReputationMetricsEnabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ReputationMetricsEnabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/reputation-options',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ReputationMetricsEnabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options',
headers: {'content-type': 'application/json'},
body: {ReputationMetricsEnabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ReputationMetricsEnabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options',
headers: {'content-type': 'application/json'},
data: {ReputationMetricsEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"ReputationMetricsEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ReputationMetricsEnabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ReputationMetricsEnabled\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'ReputationMetricsEnabled' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options', [
'body' => '{
"ReputationMetricsEnabled": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ReputationMetricsEnabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ReputationMetricsEnabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"ReputationMetricsEnabled": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"ReputationMetricsEnabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ReputationMetricsEnabled\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/reputation-options", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options"
payload = { "ReputationMetricsEnabled": False }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options"
payload <- "{\n \"ReputationMetricsEnabled\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"ReputationMetricsEnabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/reputation-options') do |req|
req.body = "{\n \"ReputationMetricsEnabled\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options";
let payload = json!({"ReputationMetricsEnabled": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options \
--header 'content-type: application/json' \
--data '{
"ReputationMetricsEnabled": false
}'
echo '{
"ReputationMetricsEnabled": false
}' | \
http PUT {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "ReputationMetricsEnabled": false\n}' \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["ReputationMetricsEnabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/reputation-options")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutConfigurationSetSendingOptions
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending
QUERY PARAMS
ConfigurationSetName
BODY json
{
"SendingEnabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"SendingEnabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending" {:content-type :json
:form-params {:SendingEnabled false}})
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"SendingEnabled\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending"),
Content = new StringContent("{\n \"SendingEnabled\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"SendingEnabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending"
payload := strings.NewReader("{\n \"SendingEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/sending HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 29
{
"SendingEnabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending")
.setHeader("content-type", "application/json")
.setBody("{\n \"SendingEnabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"SendingEnabled\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"SendingEnabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending")
.header("content-type", "application/json")
.body("{\n \"SendingEnabled\": false\n}")
.asString();
const data = JSON.stringify({
SendingEnabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending',
headers: {'content-type': 'application/json'},
data: {SendingEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"SendingEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "SendingEnabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"SendingEnabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/sending',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({SendingEnabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending',
headers: {'content-type': 'application/json'},
body: {SendingEnabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
SendingEnabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending',
headers: {'content-type': 'application/json'},
data: {SendingEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"SendingEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"SendingEnabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"SendingEnabled\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'SendingEnabled' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending', [
'body' => '{
"SendingEnabled": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'SendingEnabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'SendingEnabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"SendingEnabled": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"SendingEnabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"SendingEnabled\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/sending", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending"
payload = { "SendingEnabled": False }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending"
payload <- "{\n \"SendingEnabled\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"SendingEnabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/sending') do |req|
req.body = "{\n \"SendingEnabled\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending";
let payload = json!({"SendingEnabled": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending \
--header 'content-type: application/json' \
--data '{
"SendingEnabled": false
}'
echo '{
"SendingEnabled": false
}' | \
http PUT {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "SendingEnabled": false\n}' \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["SendingEnabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/sending")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutConfigurationSetTrackingOptions
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options
QUERY PARAMS
ConfigurationSetName
BODY json
{
"CustomRedirectDomain": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"CustomRedirectDomain\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options" {:content-type :json
:form-params {:CustomRedirectDomain ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"CustomRedirectDomain\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options"),
Content = new StringContent("{\n \"CustomRedirectDomain\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CustomRedirectDomain\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options"
payload := strings.NewReader("{\n \"CustomRedirectDomain\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/tracking-options HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 32
{
"CustomRedirectDomain": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options")
.setHeader("content-type", "application/json")
.setBody("{\n \"CustomRedirectDomain\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"CustomRedirectDomain\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"CustomRedirectDomain\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options")
.header("content-type", "application/json")
.body("{\n \"CustomRedirectDomain\": \"\"\n}")
.asString();
const data = JSON.stringify({
CustomRedirectDomain: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options',
headers: {'content-type': 'application/json'},
data: {CustomRedirectDomain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"CustomRedirectDomain":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "CustomRedirectDomain": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CustomRedirectDomain\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/tracking-options',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({CustomRedirectDomain: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options',
headers: {'content-type': 'application/json'},
body: {CustomRedirectDomain: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
CustomRedirectDomain: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options',
headers: {'content-type': 'application/json'},
data: {CustomRedirectDomain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"CustomRedirectDomain":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"CustomRedirectDomain": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"CustomRedirectDomain\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'CustomRedirectDomain' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options', [
'body' => '{
"CustomRedirectDomain": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CustomRedirectDomain' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CustomRedirectDomain' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"CustomRedirectDomain": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"CustomRedirectDomain": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CustomRedirectDomain\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/tracking-options", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options"
payload = { "CustomRedirectDomain": "" }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options"
payload <- "{\n \"CustomRedirectDomain\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"CustomRedirectDomain\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/tracking-options') do |req|
req.body = "{\n \"CustomRedirectDomain\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options";
let payload = json!({"CustomRedirectDomain": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options \
--header 'content-type: application/json' \
--data '{
"CustomRedirectDomain": ""
}'
echo '{
"CustomRedirectDomain": ""
}' | \
http PUT {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "CustomRedirectDomain": ""\n}' \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["CustomRedirectDomain": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/tracking-options")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutDedicatedIpInPool
{{baseUrl}}/v1/email/dedicated-ips/:IP/pool
QUERY PARAMS
IP
BODY json
{
"DestinationPoolName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DestinationPoolName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool" {:content-type :json
:form-params {:DestinationPoolName ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"DestinationPoolName\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/dedicated-ips/:IP/pool"),
Content = new StringContent("{\n \"DestinationPoolName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/dedicated-ips/:IP/pool");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DestinationPoolName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool"
payload := strings.NewReader("{\n \"DestinationPoolName\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/dedicated-ips/:IP/pool HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 31
{
"DestinationPoolName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool")
.setHeader("content-type", "application/json")
.setBody("{\n \"DestinationPoolName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/dedicated-ips/:IP/pool"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"DestinationPoolName\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DestinationPoolName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips/:IP/pool")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/dedicated-ips/:IP/pool")
.header("content-type", "application/json")
.body("{\n \"DestinationPoolName\": \"\"\n}")
.asString();
const data = JSON.stringify({
DestinationPoolName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool',
headers: {'content-type': 'application/json'},
data: {DestinationPoolName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"DestinationPoolName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "DestinationPoolName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DestinationPoolName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips/:IP/pool")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/dedicated-ips/:IP/pool',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({DestinationPoolName: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool',
headers: {'content-type': 'application/json'},
body: {DestinationPoolName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
DestinationPoolName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool',
headers: {'content-type': 'application/json'},
data: {DestinationPoolName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"DestinationPoolName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DestinationPoolName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/dedicated-ips/:IP/pool"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"DestinationPoolName\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/dedicated-ips/:IP/pool",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'DestinationPoolName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool', [
'body' => '{
"DestinationPoolName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/dedicated-ips/:IP/pool');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DestinationPoolName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DestinationPoolName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/dedicated-ips/:IP/pool');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"DestinationPoolName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/dedicated-ips/:IP/pool' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"DestinationPoolName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DestinationPoolName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/dedicated-ips/:IP/pool", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool"
payload = { "DestinationPoolName": "" }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool"
payload <- "{\n \"DestinationPoolName\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/dedicated-ips/:IP/pool")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"DestinationPoolName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/dedicated-ips/:IP/pool') do |req|
req.body = "{\n \"DestinationPoolName\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool";
let payload = json!({"DestinationPoolName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/dedicated-ips/:IP/pool \
--header 'content-type: application/json' \
--data '{
"DestinationPoolName": ""
}'
echo '{
"DestinationPoolName": ""
}' | \
http PUT {{baseUrl}}/v1/email/dedicated-ips/:IP/pool \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "DestinationPoolName": ""\n}' \
--output-document \
- {{baseUrl}}/v1/email/dedicated-ips/:IP/pool
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["DestinationPoolName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/dedicated-ips/:IP/pool")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutDedicatedIpWarmupAttributes
{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup
QUERY PARAMS
IP
BODY json
{
"WarmupPercentage": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"WarmupPercentage\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup" {:content-type :json
:form-params {:WarmupPercentage 0}})
require "http/client"
url = "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"WarmupPercentage\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup"),
Content = new StringContent("{\n \"WarmupPercentage\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"WarmupPercentage\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup"
payload := strings.NewReader("{\n \"WarmupPercentage\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/dedicated-ips/:IP/warmup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 27
{
"WarmupPercentage": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup")
.setHeader("content-type", "application/json")
.setBody("{\n \"WarmupPercentage\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"WarmupPercentage\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"WarmupPercentage\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup")
.header("content-type", "application/json")
.body("{\n \"WarmupPercentage\": 0\n}")
.asString();
const data = JSON.stringify({
WarmupPercentage: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup',
headers: {'content-type': 'application/json'},
data: {WarmupPercentage: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"WarmupPercentage":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "WarmupPercentage": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"WarmupPercentage\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/dedicated-ips/:IP/warmup',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({WarmupPercentage: 0}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup',
headers: {'content-type': 'application/json'},
body: {WarmupPercentage: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
WarmupPercentage: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup',
headers: {'content-type': 'application/json'},
data: {WarmupPercentage: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"WarmupPercentage":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"WarmupPercentage": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"WarmupPercentage\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'WarmupPercentage' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup', [
'body' => '{
"WarmupPercentage": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'WarmupPercentage' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'WarmupPercentage' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"WarmupPercentage": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"WarmupPercentage": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"WarmupPercentage\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/dedicated-ips/:IP/warmup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup"
payload = { "WarmupPercentage": 0 }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup"
payload <- "{\n \"WarmupPercentage\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"WarmupPercentage\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/dedicated-ips/:IP/warmup') do |req|
req.body = "{\n \"WarmupPercentage\": 0\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup";
let payload = json!({"WarmupPercentage": 0});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/dedicated-ips/:IP/warmup \
--header 'content-type: application/json' \
--data '{
"WarmupPercentage": 0
}'
echo '{
"WarmupPercentage": 0
}' | \
http PUT {{baseUrl}}/v1/email/dedicated-ips/:IP/warmup \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "WarmupPercentage": 0\n}' \
--output-document \
- {{baseUrl}}/v1/email/dedicated-ips/:IP/warmup
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["WarmupPercentage": 0] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/dedicated-ips/:IP/warmup")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutDeliverabilityDashboardOption
{{baseUrl}}/v1/email/deliverability-dashboard
BODY json
{
"DashboardEnabled": false,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/deliverability-dashboard");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/deliverability-dashboard" {:content-type :json
:form-params {:DashboardEnabled false
:SubscribedDomains [{:Domain ""
:SubscriptionStartDate ""
:InboxPlacementTrackingOption ""}]}})
require "http/client"
url = "{{baseUrl}}/v1/email/deliverability-dashboard"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/deliverability-dashboard"),
Content = new StringContent("{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/deliverability-dashboard");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/deliverability-dashboard"
payload := strings.NewReader("{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/deliverability-dashboard HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 169
{
"DashboardEnabled": false,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/deliverability-dashboard")
.setHeader("content-type", "application/json")
.setBody("{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/deliverability-dashboard"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/deliverability-dashboard")
.header("content-type", "application/json")
.body("{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
DashboardEnabled: false,
SubscribedDomains: [
{
Domain: '',
SubscriptionStartDate: '',
InboxPlacementTrackingOption: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/deliverability-dashboard');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/deliverability-dashboard',
headers: {'content-type': 'application/json'},
data: {
DashboardEnabled: false,
SubscribedDomains: [{Domain: '', SubscriptionStartDate: '', InboxPlacementTrackingOption: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/deliverability-dashboard';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"DashboardEnabled":false,"SubscribedDomains":[{"Domain":"","SubscriptionStartDate":"","InboxPlacementTrackingOption":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/deliverability-dashboard',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "DashboardEnabled": false,\n "SubscribedDomains": [\n {\n "Domain": "",\n "SubscriptionStartDate": "",\n "InboxPlacementTrackingOption": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/deliverability-dashboard")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/deliverability-dashboard',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
DashboardEnabled: false,
SubscribedDomains: [{Domain: '', SubscriptionStartDate: '', InboxPlacementTrackingOption: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/deliverability-dashboard',
headers: {'content-type': 'application/json'},
body: {
DashboardEnabled: false,
SubscribedDomains: [{Domain: '', SubscriptionStartDate: '', InboxPlacementTrackingOption: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/deliverability-dashboard');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
DashboardEnabled: false,
SubscribedDomains: [
{
Domain: '',
SubscriptionStartDate: '',
InboxPlacementTrackingOption: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/deliverability-dashboard',
headers: {'content-type': 'application/json'},
data: {
DashboardEnabled: false,
SubscribedDomains: [{Domain: '', SubscriptionStartDate: '', InboxPlacementTrackingOption: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/deliverability-dashboard';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"DashboardEnabled":false,"SubscribedDomains":[{"Domain":"","SubscriptionStartDate":"","InboxPlacementTrackingOption":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"DashboardEnabled": @NO,
@"SubscribedDomains": @[ @{ @"Domain": @"", @"SubscriptionStartDate": @"", @"InboxPlacementTrackingOption": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/deliverability-dashboard"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/deliverability-dashboard" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/deliverability-dashboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'DashboardEnabled' => null,
'SubscribedDomains' => [
[
'Domain' => '',
'SubscriptionStartDate' => '',
'InboxPlacementTrackingOption' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/deliverability-dashboard', [
'body' => '{
"DashboardEnabled": false,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/deliverability-dashboard');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DashboardEnabled' => null,
'SubscribedDomains' => [
[
'Domain' => '',
'SubscriptionStartDate' => '',
'InboxPlacementTrackingOption' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DashboardEnabled' => null,
'SubscribedDomains' => [
[
'Domain' => '',
'SubscriptionStartDate' => '',
'InboxPlacementTrackingOption' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/deliverability-dashboard');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/deliverability-dashboard' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"DashboardEnabled": false,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/deliverability-dashboard' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"DashboardEnabled": false,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/deliverability-dashboard", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/deliverability-dashboard"
payload = {
"DashboardEnabled": False,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/deliverability-dashboard"
payload <- "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/deliverability-dashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/deliverability-dashboard') do |req|
req.body = "{\n \"DashboardEnabled\": false,\n \"SubscribedDomains\": [\n {\n \"Domain\": \"\",\n \"SubscriptionStartDate\": \"\",\n \"InboxPlacementTrackingOption\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/deliverability-dashboard";
let payload = json!({
"DashboardEnabled": false,
"SubscribedDomains": (
json!({
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/deliverability-dashboard \
--header 'content-type: application/json' \
--data '{
"DashboardEnabled": false,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}'
echo '{
"DashboardEnabled": false,
"SubscribedDomains": [
{
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
}
]
}' | \
http PUT {{baseUrl}}/v1/email/deliverability-dashboard \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "DashboardEnabled": false,\n "SubscribedDomains": [\n {\n "Domain": "",\n "SubscriptionStartDate": "",\n "InboxPlacementTrackingOption": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1/email/deliverability-dashboard
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"DashboardEnabled": false,
"SubscribedDomains": [
[
"Domain": "",
"SubscriptionStartDate": "",
"InboxPlacementTrackingOption": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/deliverability-dashboard")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutEmailIdentityDkimAttributes
{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim
QUERY PARAMS
EmailIdentity
BODY json
{
"SigningEnabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"SigningEnabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim" {:content-type :json
:form-params {:SigningEnabled false}})
require "http/client"
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"SigningEnabled\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim"),
Content = new StringContent("{\n \"SigningEnabled\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"SigningEnabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim"
payload := strings.NewReader("{\n \"SigningEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/identities/:EmailIdentity/dkim HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 29
{
"SigningEnabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim")
.setHeader("content-type", "application/json")
.setBody("{\n \"SigningEnabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"SigningEnabled\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"SigningEnabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim")
.header("content-type", "application/json")
.body("{\n \"SigningEnabled\": false\n}")
.asString();
const data = JSON.stringify({
SigningEnabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim',
headers: {'content-type': 'application/json'},
data: {SigningEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"SigningEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "SigningEnabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"SigningEnabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/identities/:EmailIdentity/dkim',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({SigningEnabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim',
headers: {'content-type': 'application/json'},
body: {SigningEnabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
SigningEnabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim',
headers: {'content-type': 'application/json'},
data: {SigningEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"SigningEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"SigningEnabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"SigningEnabled\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'SigningEnabled' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim', [
'body' => '{
"SigningEnabled": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'SigningEnabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'SigningEnabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"SigningEnabled": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"SigningEnabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"SigningEnabled\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/identities/:EmailIdentity/dkim", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim"
payload = { "SigningEnabled": False }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim"
payload <- "{\n \"SigningEnabled\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"SigningEnabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/identities/:EmailIdentity/dkim') do |req|
req.body = "{\n \"SigningEnabled\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim";
let payload = json!({"SigningEnabled": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/identities/:EmailIdentity/dkim \
--header 'content-type: application/json' \
--data '{
"SigningEnabled": false
}'
echo '{
"SigningEnabled": false
}' | \
http PUT {{baseUrl}}/v1/email/identities/:EmailIdentity/dkim \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "SigningEnabled": false\n}' \
--output-document \
- {{baseUrl}}/v1/email/identities/:EmailIdentity/dkim
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["SigningEnabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/identities/:EmailIdentity/dkim")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutEmailIdentityFeedbackAttributes
{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback
QUERY PARAMS
EmailIdentity
BODY json
{
"EmailForwardingEnabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"EmailForwardingEnabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback" {:content-type :json
:form-params {:EmailForwardingEnabled false}})
require "http/client"
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"EmailForwardingEnabled\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback"),
Content = new StringContent("{\n \"EmailForwardingEnabled\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"EmailForwardingEnabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback"
payload := strings.NewReader("{\n \"EmailForwardingEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/identities/:EmailIdentity/feedback HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"EmailForwardingEnabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback")
.setHeader("content-type", "application/json")
.setBody("{\n \"EmailForwardingEnabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"EmailForwardingEnabled\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"EmailForwardingEnabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback")
.header("content-type", "application/json")
.body("{\n \"EmailForwardingEnabled\": false\n}")
.asString();
const data = JSON.stringify({
EmailForwardingEnabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback',
headers: {'content-type': 'application/json'},
data: {EmailForwardingEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"EmailForwardingEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "EmailForwardingEnabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"EmailForwardingEnabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/identities/:EmailIdentity/feedback',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({EmailForwardingEnabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback',
headers: {'content-type': 'application/json'},
body: {EmailForwardingEnabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
EmailForwardingEnabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback',
headers: {'content-type': 'application/json'},
data: {EmailForwardingEnabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"EmailForwardingEnabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"EmailForwardingEnabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"EmailForwardingEnabled\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'EmailForwardingEnabled' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback', [
'body' => '{
"EmailForwardingEnabled": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'EmailForwardingEnabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'EmailForwardingEnabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"EmailForwardingEnabled": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"EmailForwardingEnabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"EmailForwardingEnabled\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/identities/:EmailIdentity/feedback", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback"
payload = { "EmailForwardingEnabled": False }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback"
payload <- "{\n \"EmailForwardingEnabled\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"EmailForwardingEnabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/identities/:EmailIdentity/feedback') do |req|
req.body = "{\n \"EmailForwardingEnabled\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback";
let payload = json!({"EmailForwardingEnabled": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/identities/:EmailIdentity/feedback \
--header 'content-type: application/json' \
--data '{
"EmailForwardingEnabled": false
}'
echo '{
"EmailForwardingEnabled": false
}' | \
http PUT {{baseUrl}}/v1/email/identities/:EmailIdentity/feedback \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "EmailForwardingEnabled": false\n}' \
--output-document \
- {{baseUrl}}/v1/email/identities/:EmailIdentity/feedback
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["EmailForwardingEnabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/identities/:EmailIdentity/feedback")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
PutEmailIdentityMailFromAttributes
{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from
QUERY PARAMS
EmailIdentity
BODY json
{
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from" {:content-type :json
:form-params {:MailFromDomain ""
:BehaviorOnMxFailure ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from"),
Content = new StringContent("{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from"
payload := strings.NewReader("{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/identities/:EmailIdentity/mail-from HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from")
.setHeader("content-type", "application/json")
.setBody("{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from")
.header("content-type", "application/json")
.body("{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}")
.asString();
const data = JSON.stringify({
MailFromDomain: '',
BehaviorOnMxFailure: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from',
headers: {'content-type': 'application/json'},
data: {MailFromDomain: '', BehaviorOnMxFailure: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"MailFromDomain":"","BehaviorOnMxFailure":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "MailFromDomain": "",\n "BehaviorOnMxFailure": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/identities/:EmailIdentity/mail-from',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({MailFromDomain: '', BehaviorOnMxFailure: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from',
headers: {'content-type': 'application/json'},
body: {MailFromDomain: '', BehaviorOnMxFailure: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
MailFromDomain: '',
BehaviorOnMxFailure: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from',
headers: {'content-type': 'application/json'},
data: {MailFromDomain: '', BehaviorOnMxFailure: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"MailFromDomain":"","BehaviorOnMxFailure":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"MailFromDomain": @"",
@"BehaviorOnMxFailure": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'MailFromDomain' => '',
'BehaviorOnMxFailure' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from', [
'body' => '{
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'MailFromDomain' => '',
'BehaviorOnMxFailure' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'MailFromDomain' => '',
'BehaviorOnMxFailure' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/identities/:EmailIdentity/mail-from", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from"
payload = {
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from"
payload <- "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/identities/:EmailIdentity/mail-from') do |req|
req.body = "{\n \"MailFromDomain\": \"\",\n \"BehaviorOnMxFailure\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from";
let payload = json!({
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from \
--header 'content-type: application/json' \
--data '{
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}'
echo '{
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
}' | \
http PUT {{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "MailFromDomain": "",\n "BehaviorOnMxFailure": ""\n}' \
--output-document \
- {{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"MailFromDomain": "",
"BehaviorOnMxFailure": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/identities/:EmailIdentity/mail-from")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
SendEmail
{{baseUrl}}/v1/email/outbound-emails
BODY json
{
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/outbound-emails");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/email/outbound-emails" {:content-type :json
:form-params {:FromEmailAddress ""
:Destination {:ToAddresses ""
:CcAddresses ""
:BccAddresses ""}
:ReplyToAddresses []
:FeedbackForwardingEmailAddress ""
:Content {:Simple ""
:Raw ""
:Template ""}
:EmailTags [{:Name ""
:Value ""}]
:ConfigurationSetName ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/outbound-emails"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/email/outbound-emails"),
Content = new StringContent("{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/outbound-emails");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/outbound-emails"
payload := strings.NewReader("{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/email/outbound-emails HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 359
{
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/email/outbound-emails")
.setHeader("content-type", "application/json")
.setBody("{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/outbound-emails"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/outbound-emails")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/email/outbound-emails")
.header("content-type", "application/json")
.body("{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}")
.asString();
const data = JSON.stringify({
FromEmailAddress: '',
Destination: {
ToAddresses: '',
CcAddresses: '',
BccAddresses: ''
},
ReplyToAddresses: [],
FeedbackForwardingEmailAddress: '',
Content: {
Simple: '',
Raw: '',
Template: ''
},
EmailTags: [
{
Name: '',
Value: ''
}
],
ConfigurationSetName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/email/outbound-emails');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/outbound-emails',
headers: {'content-type': 'application/json'},
data: {
FromEmailAddress: '',
Destination: {ToAddresses: '', CcAddresses: '', BccAddresses: ''},
ReplyToAddresses: [],
FeedbackForwardingEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
EmailTags: [{Name: '', Value: ''}],
ConfigurationSetName: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/outbound-emails';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"FromEmailAddress":"","Destination":{"ToAddresses":"","CcAddresses":"","BccAddresses":""},"ReplyToAddresses":[],"FeedbackForwardingEmailAddress":"","Content":{"Simple":"","Raw":"","Template":""},"EmailTags":[{"Name":"","Value":""}],"ConfigurationSetName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/outbound-emails',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "FromEmailAddress": "",\n "Destination": {\n "ToAddresses": "",\n "CcAddresses": "",\n "BccAddresses": ""\n },\n "ReplyToAddresses": [],\n "FeedbackForwardingEmailAddress": "",\n "Content": {\n "Simple": "",\n "Raw": "",\n "Template": ""\n },\n "EmailTags": [\n {\n "Name": "",\n "Value": ""\n }\n ],\n "ConfigurationSetName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/outbound-emails")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/outbound-emails',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
FromEmailAddress: '',
Destination: {ToAddresses: '', CcAddresses: '', BccAddresses: ''},
ReplyToAddresses: [],
FeedbackForwardingEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
EmailTags: [{Name: '', Value: ''}],
ConfigurationSetName: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/outbound-emails',
headers: {'content-type': 'application/json'},
body: {
FromEmailAddress: '',
Destination: {ToAddresses: '', CcAddresses: '', BccAddresses: ''},
ReplyToAddresses: [],
FeedbackForwardingEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
EmailTags: [{Name: '', Value: ''}],
ConfigurationSetName: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/email/outbound-emails');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
FromEmailAddress: '',
Destination: {
ToAddresses: '',
CcAddresses: '',
BccAddresses: ''
},
ReplyToAddresses: [],
FeedbackForwardingEmailAddress: '',
Content: {
Simple: '',
Raw: '',
Template: ''
},
EmailTags: [
{
Name: '',
Value: ''
}
],
ConfigurationSetName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/outbound-emails',
headers: {'content-type': 'application/json'},
data: {
FromEmailAddress: '',
Destination: {ToAddresses: '', CcAddresses: '', BccAddresses: ''},
ReplyToAddresses: [],
FeedbackForwardingEmailAddress: '',
Content: {Simple: '', Raw: '', Template: ''},
EmailTags: [{Name: '', Value: ''}],
ConfigurationSetName: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/outbound-emails';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"FromEmailAddress":"","Destination":{"ToAddresses":"","CcAddresses":"","BccAddresses":""},"ReplyToAddresses":[],"FeedbackForwardingEmailAddress":"","Content":{"Simple":"","Raw":"","Template":""},"EmailTags":[{"Name":"","Value":""}],"ConfigurationSetName":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"FromEmailAddress": @"",
@"Destination": @{ @"ToAddresses": @"", @"CcAddresses": @"", @"BccAddresses": @"" },
@"ReplyToAddresses": @[ ],
@"FeedbackForwardingEmailAddress": @"",
@"Content": @{ @"Simple": @"", @"Raw": @"", @"Template": @"" },
@"EmailTags": @[ @{ @"Name": @"", @"Value": @"" } ],
@"ConfigurationSetName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/outbound-emails"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/outbound-emails" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/outbound-emails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'FromEmailAddress' => '',
'Destination' => [
'ToAddresses' => '',
'CcAddresses' => '',
'BccAddresses' => ''
],
'ReplyToAddresses' => [
],
'FeedbackForwardingEmailAddress' => '',
'Content' => [
'Simple' => '',
'Raw' => '',
'Template' => ''
],
'EmailTags' => [
[
'Name' => '',
'Value' => ''
]
],
'ConfigurationSetName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/email/outbound-emails', [
'body' => '{
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/outbound-emails');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'FromEmailAddress' => '',
'Destination' => [
'ToAddresses' => '',
'CcAddresses' => '',
'BccAddresses' => ''
],
'ReplyToAddresses' => [
],
'FeedbackForwardingEmailAddress' => '',
'Content' => [
'Simple' => '',
'Raw' => '',
'Template' => ''
],
'EmailTags' => [
[
'Name' => '',
'Value' => ''
]
],
'ConfigurationSetName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'FromEmailAddress' => '',
'Destination' => [
'ToAddresses' => '',
'CcAddresses' => '',
'BccAddresses' => ''
],
'ReplyToAddresses' => [
],
'FeedbackForwardingEmailAddress' => '',
'Content' => [
'Simple' => '',
'Raw' => '',
'Template' => ''
],
'EmailTags' => [
[
'Name' => '',
'Value' => ''
]
],
'ConfigurationSetName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/outbound-emails');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/outbound-emails' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/outbound-emails' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/email/outbound-emails", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/outbound-emails"
payload = {
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/outbound-emails"
payload <- "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/outbound-emails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/email/outbound-emails') do |req|
req.body = "{\n \"FromEmailAddress\": \"\",\n \"Destination\": {\n \"ToAddresses\": \"\",\n \"CcAddresses\": \"\",\n \"BccAddresses\": \"\"\n },\n \"ReplyToAddresses\": [],\n \"FeedbackForwardingEmailAddress\": \"\",\n \"Content\": {\n \"Simple\": \"\",\n \"Raw\": \"\",\n \"Template\": \"\"\n },\n \"EmailTags\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"ConfigurationSetName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/outbound-emails";
let payload = json!({
"FromEmailAddress": "",
"Destination": json!({
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
}),
"ReplyToAddresses": (),
"FeedbackForwardingEmailAddress": "",
"Content": json!({
"Simple": "",
"Raw": "",
"Template": ""
}),
"EmailTags": (
json!({
"Name": "",
"Value": ""
})
),
"ConfigurationSetName": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/email/outbound-emails \
--header 'content-type: application/json' \
--data '{
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}'
echo '{
"FromEmailAddress": "",
"Destination": {
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
},
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": {
"Simple": "",
"Raw": "",
"Template": ""
},
"EmailTags": [
{
"Name": "",
"Value": ""
}
],
"ConfigurationSetName": ""
}' | \
http POST {{baseUrl}}/v1/email/outbound-emails \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "FromEmailAddress": "",\n "Destination": {\n "ToAddresses": "",\n "CcAddresses": "",\n "BccAddresses": ""\n },\n "ReplyToAddresses": [],\n "FeedbackForwardingEmailAddress": "",\n "Content": {\n "Simple": "",\n "Raw": "",\n "Template": ""\n },\n "EmailTags": [\n {\n "Name": "",\n "Value": ""\n }\n ],\n "ConfigurationSetName": ""\n}' \
--output-document \
- {{baseUrl}}/v1/email/outbound-emails
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"FromEmailAddress": "",
"Destination": [
"ToAddresses": "",
"CcAddresses": "",
"BccAddresses": ""
],
"ReplyToAddresses": [],
"FeedbackForwardingEmailAddress": "",
"Content": [
"Simple": "",
"Raw": "",
"Template": ""
],
"EmailTags": [
[
"Name": "",
"Value": ""
]
],
"ConfigurationSetName": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/outbound-emails")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TagResource
{{baseUrl}}/v1/email/tags
BODY json
{
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/tags");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/email/tags" {:content-type :json
:form-params {:ResourceArn ""
:Tags [{:Key ""
:Value ""}]}})
require "http/client"
url = "{{baseUrl}}/v1/email/tags"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/email/tags"),
Content = new StringContent("{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/tags");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/tags"
payload := strings.NewReader("{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/email/tags HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 87
{
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/email/tags")
.setHeader("content-type", "application/json")
.setBody("{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/tags"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/tags")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/email/tags")
.header("content-type", "application/json")
.body("{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
ResourceArn: '',
Tags: [
{
Key: '',
Value: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/email/tags');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/tags',
headers: {'content-type': 'application/json'},
data: {ResourceArn: '', Tags: [{Key: '', Value: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/tags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ResourceArn":"","Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/tags',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ResourceArn": "",\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/tags")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/tags',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ResourceArn: '', Tags: [{Key: '', Value: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/tags',
headers: {'content-type': 'application/json'},
body: {ResourceArn: '', Tags: [{Key: '', Value: ''}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/email/tags');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ResourceArn: '',
Tags: [
{
Key: '',
Value: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/email/tags',
headers: {'content-type': 'application/json'},
data: {ResourceArn: '', Tags: [{Key: '', Value: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/tags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ResourceArn":"","Tags":[{"Key":"","Value":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ResourceArn": @"",
@"Tags": @[ @{ @"Key": @"", @"Value": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/tags"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/tags" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ResourceArn' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/email/tags', [
'body' => '{
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/tags');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ResourceArn' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ResourceArn' => '',
'Tags' => [
[
'Key' => '',
'Value' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/tags');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/email/tags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/tags"
payload = {
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/tags"
payload <- "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/email/tags') do |req|
req.body = "{\n \"ResourceArn\": \"\",\n \"Tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/tags";
let payload = json!({
"ResourceArn": "",
"Tags": (
json!({
"Key": "",
"Value": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/email/tags \
--header 'content-type: application/json' \
--data '{
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}'
echo '{
"ResourceArn": "",
"Tags": [
{
"Key": "",
"Value": ""
}
]
}' | \
http POST {{baseUrl}}/v1/email/tags \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ResourceArn": "",\n "Tags": [\n {\n "Key": "",\n "Value": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1/email/tags
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ResourceArn": "",
"Tags": [
[
"Key": "",
"Value": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/tags")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
UntagResource
{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys
QUERY PARAMS
ResourceArn
TagKeys
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys" {:query-params {:ResourceArn ""
:TagKeys ""}})
require "http/client"
url = "{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/email/tags?ResourceArn=&TagKeys= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys',
params: {ResourceArn: '', TagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/tags?ResourceArn=&TagKeys=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys',
qs: {ResourceArn: '', TagKeys: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys');
req.query({
ResourceArn: '',
TagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys',
params: {ResourceArn: '', TagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'ResourceArn' => '',
'TagKeys' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'ResourceArn' => '',
'TagKeys' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/email/tags?ResourceArn=&TagKeys=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys"
querystring = {"ResourceArn":"","TagKeys":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys"
queryString <- list(
ResourceArn = "",
TagKeys = ""
)
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/email/tags') do |req|
req.params['ResourceArn'] = ''
req.params['TagKeys'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/tags#ResourceArn&TagKeys";
let querystring = [
("ResourceArn", ""),
("TagKeys", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys'
http DELETE '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys'
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/tags?ResourceArn=&TagKeys=#ResourceArn&TagKeys")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateConfigurationSetEventDestination
{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName
QUERY PARAMS
ConfigurationSetName
EventDestinationName
BODY json
{
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName" {:content-type :json
:form-params {:EventDestination {:Enabled ""
:MatchingEventTypes ""
:KinesisFirehoseDestination ""
:CloudWatchDestination ""
:SnsDestination ""
:PinpointDestination ""}}})
require "http/client"
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"),
Content = new StringContent("{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
payload := strings.NewReader("{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 207
{
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.setHeader("content-type", "application/json")
.setBody("{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.header("content-type", "application/json")
.body("{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName',
headers: {'content-type': 'application/json'},
data: {
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"EventDestination":{"Enabled":"","MatchingEventTypes":"","KinesisFirehoseDestination":"","CloudWatchDestination":"","SnsDestination":"","PinpointDestination":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "EventDestination": {\n "Enabled": "",\n "MatchingEventTypes": "",\n "KinesisFirehoseDestination": "",\n "CloudWatchDestination": "",\n "SnsDestination": "",\n "PinpointDestination": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName',
headers: {'content-type': 'application/json'},
body: {
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName',
headers: {'content-type': 'application/json'},
data: {
EventDestination: {
Enabled: '',
MatchingEventTypes: '',
KinesisFirehoseDestination: '',
CloudWatchDestination: '',
SnsDestination: '',
PinpointDestination: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"EventDestination":{"Enabled":"","MatchingEventTypes":"","KinesisFirehoseDestination":"","CloudWatchDestination":"","SnsDestination":"","PinpointDestination":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"EventDestination": @{ @"Enabled": @"", @"MatchingEventTypes": @"", @"KinesisFirehoseDestination": @"", @"CloudWatchDestination": @"", @"SnsDestination": @"", @"PinpointDestination": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'EventDestination' => [
'Enabled' => '',
'MatchingEventTypes' => '',
'KinesisFirehoseDestination' => '',
'CloudWatchDestination' => '',
'SnsDestination' => '',
'PinpointDestination' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName', [
'body' => '{
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'EventDestination' => [
'Enabled' => '',
'MatchingEventTypes' => '',
'KinesisFirehoseDestination' => '',
'CloudWatchDestination' => '',
'SnsDestination' => '',
'PinpointDestination' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'EventDestination' => [
'Enabled' => '',
'MatchingEventTypes' => '',
'KinesisFirehoseDestination' => '',
'CloudWatchDestination' => '',
'SnsDestination' => '',
'PinpointDestination' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
payload = { "EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
} }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName"
payload <- "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName') do |req|
req.body = "{\n \"EventDestination\": {\n \"Enabled\": \"\",\n \"MatchingEventTypes\": \"\",\n \"KinesisFirehoseDestination\": \"\",\n \"CloudWatchDestination\": \"\",\n \"SnsDestination\": \"\",\n \"PinpointDestination\": \"\"\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName";
let payload = json!({"EventDestination": json!({
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName \
--header 'content-type: application/json' \
--data '{
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}'
echo '{
"EventDestination": {
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
}
}' | \
http PUT {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "EventDestination": {\n "Enabled": "",\n "MatchingEventTypes": "",\n "KinesisFirehoseDestination": "",\n "CloudWatchDestination": "",\n "SnsDestination": "",\n "PinpointDestination": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["EventDestination": [
"Enabled": "",
"MatchingEventTypes": "",
"KinesisFirehoseDestination": "",
"CloudWatchDestination": "",
"SnsDestination": "",
"PinpointDestination": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/email/configuration-sets/:ConfigurationSetName/event-destinations/:EventDestinationName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()